From 0e3a501db3ab360babf9197453d71bb3751efcc8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:01:51 +0000 Subject: [PATCH 001/257] Update dependencies from https://github.com/dotnet/source-build-externals build 20240528.2 (#56037) [main] Update dependencies from dotnet/source-build-externals --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 295416a435f1..9080d04b7708 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -368,9 +368,9 @@ 745230568e52639e229dcc24c98fe0dbb4c1641d - + https://github.com/dotnet/source-build-externals - 59204e5b14e6e197b3c942f992f6e3ec9196e50b + f1b44a365df0b8dbc38403ee8696adc25fbdd76a diff --git a/eng/Versions.props b/eng/Versions.props index c65b00fd2b72..fe971a973904 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -165,7 +165,7 @@ 9.0.0-beta.24272.5 9.0.0-beta.24272.5 - 9.0.0-alpha.1.24263.2 + 9.0.0-alpha.1.24278.2 9.0.0-alpha.1.24278.2 From 1daeea6499b579a725fc05fbe69e2b574f8663b7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:09:33 +0000 Subject: [PATCH 002/257] Update dependencies from https://github.com/dotnet/winforms build 20240602.1 (#56040) [main] Update dependencies from dotnet/winforms --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9080d04b7708..9063e19083d6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -380,9 +380,9 @@ https://github.com/dotnet/runtime 745230568e52639e229dcc24c98fe0dbb4c1641d - + https://github.com/dotnet/winforms - b546fbde291f4562dd1c0ab30f6dc39f8fa0253d + 9f9d572dd4fdf6e55cf91548ab8ee18c8f003990 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index fe971a973904..0f1ef2535cb4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,7 +171,7 @@ 2.1.0-beta.24208.1 - 9.0.0-preview.6.24275.1 + 9.0.0-preview.6.24302.1 9.0.0-preview.24277.2 9.0.0-preview.24277.2 From 0ffc29649a8047ad969445fd185450892b3fc75b Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Mon, 3 Jun 2024 22:16:50 +0100 Subject: [PATCH 003/257] Bump update-dotnet-sdk action (#56010) Bump the update-dotnet-sdk action to 3.2.3 to handle upcoming changes from the merging of the installer and sdk repos. --- .github/workflows/update-sdk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-sdk.yml b/.github/workflows/update-sdk.yml index 4f2f798fe1b1..c96f6b550c5c 100644 --- a/.github/workflows/update-sdk.yml +++ b/.github/workflows/update-sdk.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: martincostello/update-dotnet-sdk@9d42ad9bcbd97a74394c7273c9c616b4bf136b53 # v3.1.3 + - uses: martincostello/update-dotnet-sdk@67d6e2b14939c06978a7f80444157296c3defe14 # v3.2.3 with: quality: 'daily' repo-token: ${{ secrets.GITHUB_TOKEN }} From b8566e110b1d3918b5f7319db463aa69dbb0c183 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:02:53 +0000 Subject: [PATCH 004/257] Update dependencies from https://github.com/dotnet/extensions build 20240601.1 (#56038) [main] Update dependencies from dotnet/extensions --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9063e19083d6..04668f67ffca 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -410,13 +410,13 @@ https://github.com/dotnet/arcade 2001d73c8ff942331a73300ba61fa6164805b231 - + https://github.com/dotnet/extensions - 5dfd054e528f38926ad2c137896bd86036ad07b0 + 74a55056def261bb3b433ceb040dc4134a35f63e - + https://github.com/dotnet/extensions - 5dfd054e528f38926ad2c137896bd86036ad07b0 + 74a55056def261bb3b433ceb040dc4134a35f63e https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index 0f1ef2535cb4..ca14ce40594a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,8 +137,8 @@ 9.0.0-preview.5.24272.1 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24273.3 - 9.0.0-preview.5.24273.3 + 9.0.0-preview.5.24301.1 + 9.0.0-preview.5.24301.1 9.0.0-preview.5.24271.1 9.0.0-preview.5.24271.1 From afa0b365a9bc4a45e3b245903ce3eacfe2658d40 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Mon, 3 Jun 2024 16:41:45 -0700 Subject: [PATCH 005/257] Add test coverage for generic types (#55940) --- .../src/Schemas/OpenApiJsonSchema.Helpers.cs | 8 ++ .../src/Schemas/OpenApiSchemaKeywords.cs | 1 + ...OpenApiComponentService.ResponseSchemas.cs | 136 ++++++++++++++++++ src/OpenApi/test/SharedTypes.cs | 9 ++ 4 files changed, 154 insertions(+) diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index e76fdc8811dd..7493f4313732 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -265,6 +265,11 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, var props = ReadDictionary(ref reader); schema.Properties = props?.ToDictionary(p => p.Key, p => p.Value.Schema); break; + case OpenApiSchemaKeywords.AdditionalPropertiesKeyword: + reader.Read(); + var additionalPropsConverter = (JsonConverter)options.GetTypeInfo(typeof(OpenApiJsonSchema)).Converter; + schema.AdditionalProperties = additionalPropsConverter.Read(ref reader, typeof(OpenApiJsonSchema), options)?.Schema; + break; case OpenApiSchemaKeywords.AnyOfKeyword: reader.Read(); schema.Type = "object"; @@ -284,6 +289,9 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, var mappings = ReadDictionary(ref reader); schema.Discriminator.Mapping = mappings; break; + default: + reader.Skip(); + break; } } } diff --git a/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs b/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs index 063569ea270f..69ba96d77016 100644 --- a/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs +++ b/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs @@ -7,6 +7,7 @@ internal class OpenApiSchemaKeywords public const string FormatKeyword = "format"; public const string ItemsKeyword = "items"; public const string PropertiesKeyword = "properties"; + public const string AdditionalPropertiesKeyword = "additionalProperties"; public const string RequiredKeyword = "required"; public const string AnyOfKeyword = "anyOf"; public const string EnumKeyword = "enum"; diff --git a/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ResponseSchemas.cs index 4a1eb57f7162..c9edafae041d 100644 --- a/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ResponseSchemas.cs @@ -393,4 +393,140 @@ await VerifyOpenApiDocument(builder, document => }); }); } + + [Fact] + public async Task GetOpenApiResponse_HandlesGenericType() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/", () => TypedResults.Ok>(new(0, 1, 5, 50, [new Todo(1, "Test Title", true, DateTime.Now), new Todo(2, "Test Title 2", false, DateTime.Now)]))); + + // Assert that the response schema is correctly generated. For now, generics are inlined + // in the generated OpenAPI schema since OpenAPI supports generics via dynamic references as of + // OpenAPI 3.1.0. + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Get]; + var responses = Assert.Single(operation.Responses); + var response = responses.Value; + Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); + Assert.Equal("object", mediaType.Schema.Type); + Assert.Collection(mediaType.Schema.Properties, + property => + { + Assert.Equal("pageIndex", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int32", property.Value.Format); + }, + property => + { + Assert.Equal("pageSize", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int32", property.Value.Format); + }, + property => + { + Assert.Equal("totalItems", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int64", property.Value.Format); + }, + property => + { + Assert.Equal("totalPages", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int32", property.Value.Format); + }, + property => + { + Assert.Equal("items", property.Key); + Assert.Equal("array", property.Value.Type); + Assert.NotNull(property.Value.Items); + Assert.Equal("object", property.Value.Items.Type); + Assert.Collection(property.Value.Items.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int32", property.Value.Format); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("completed", property.Key); + Assert.Equal("boolean", property.Value.Type); + }, + property => + { + Assert.Equal("createdAt", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + }); + }); + }); + } + + [Fact] + public async Task GetOpenApiResponse_HandlesValidationProblem() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/", () => TypedResults.ValidationProblem(new Dictionary + { + ["Name"] = ["Name is required"] + })); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Get]; + var responses = Assert.Single(operation.Responses); + var response = responses.Value; + Assert.True(response.Content.TryGetValue("application/problem+json", out var mediaType)); + Assert.Equal("object", mediaType.Schema.Type); + Assert.Collection(mediaType.Schema.Properties, + property => + { + Assert.Equal("type", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("status", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int32", property.Value.Format); + }, + property => + { + Assert.Equal("detail", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("instance", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("errors", property.Key); + Assert.Equal("object", property.Value.Type); + // The errors object is a dictionary of string[]. Use `additionalProperties` + // to indicate that the payload can be arbitrary keys with string[] values. + Assert.Equal("array", property.Value.AdditionalProperties.Type); + Assert.Equal("string", property.Value.AdditionalProperties.Items.Type); + }); + }); + } } diff --git a/src/OpenApi/test/SharedTypes.cs b/src/OpenApi/test/SharedTypes.cs index c691f54acd30..edf8f45c29b5 100644 --- a/src/OpenApi/test/SharedTypes.cs +++ b/src/OpenApi/test/SharedTypes.cs @@ -63,3 +63,12 @@ internal class Proposal public required Proposal ProposalElement { get; set; } public required Stream Stream { get; set; } } + +internal class PaginatedItems(int pageIndex, int pageSize, long totalItems, int totalPages, IEnumerable items) where T : class +{ + public int PageIndex { get; set; } = pageIndex; + public int PageSize { get; set; } = pageSize; + public long TotalItems { get; set; } = totalItems; + public int TotalPages { get; set; } = totalPages; + public IEnumerable Items { get; set; } = items; +} From 31ff604dd6c9917e20af2b10c7fad1afccba9a12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:09:24 -0700 Subject: [PATCH 006/257] [main] (deps): Bump src/submodules/googletest (#55995) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `9b4993c` to `a7f443b`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/9b4993ca7d1279dec5c5d41ba327cb11a77bdc00...a7f443b80b105f940225332ed3c31f2790092f47) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 9b4993ca7d12..a7f443b80b10 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 9b4993ca7d1279dec5c5d41ba327cb11a77bdc00 +Subproject commit a7f443b80b105f940225332ed3c31f2790092f47 From 54e37afd64fdf166ad5310cea062158dbe2cf5c1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:19:04 -0700 Subject: [PATCH 007/257] Update dependencies from https://github.com/dotnet/xdt build 20240603.1 (#56066) Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24277.2 -> To Version 9.0.0-preview.24303.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 04668f67ffca..b95d02a9e892 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -325,14 +325,14 @@ https://github.com/dotnet/runtime 745230568e52639e229dcc24c98fe0dbb4c1641d - + https://github.com/dotnet/xdt - 7e5dc8069868619c4d90b96f4e57bdef9b16c8e0 + b1d534fe8831bbf62dc4356a7e611befee6ece33 - + https://github.com/dotnet/xdt - 7e5dc8069868619c4d90b96f4e57bdef9b16c8e0 + b1d534fe8831bbf62dc4356a7e611befee6ece33 diff --git a/eng/Versions.props b/eng/Versions.props index ca14ce40594a..1f3037b5a204 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -173,8 +173,8 @@ 9.0.0-preview.6.24302.1 - 9.0.0-preview.24277.2 - 9.0.0-preview.24277.2 + 9.0.0-preview.24303.1 + 9.0.0-preview.24303.1 diff --git a/eng/Versions.props b/eng/Versions.props index 1f3037b5a204..9ac12ed5af9f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -167,7 +167,7 @@ 9.0.0-alpha.1.24278.2 - 9.0.0-alpha.1.24278.2 + 9.0.0-alpha.1.24303.1 2.1.0-beta.24208.1 From 228900c8b3692f8684f4dc9c7cd5d9d53a276a8e Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Tue, 4 Jun 2024 14:38:20 -0700 Subject: [PATCH 009/257] Update Selenium dependencies (#56070) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 9ac12ed5af9f..2ade8626acc2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -318,8 +318,8 @@ 1.28.0 3.0.0 7.2.4 - 4.20.0 - 4.20.0 + 4.21.0 + 4.21.0 1.4.0 4.0.0 2.7.27 From 197c491b0f098d5dfa7645f30d30a1bdf56d1433 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Tue, 4 Jun 2024 16:19:39 -0700 Subject: [PATCH 010/257] Fix milestones for July servicing (#56078) --- .github/policies/resourceManagement.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index 0459bbb84f56..2eaec4a1df83 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -670,7 +670,7 @@ configuration: then: - removeMilestone - addMilestone: - milestone: 6.0.31 + milestone: 6.0.32 description: '[Milestone Assignments] Assign Milestone to PRs merged to release/6.0 branch' - if: - payloadType: Pull_Request @@ -681,7 +681,7 @@ configuration: then: - removeMilestone - addMilestone: - milestone: 8.0.6 + milestone: 8.0.7 description: '[Milestone Assignments] Assign Milestone to PRs merged to release/8.0 branch' - if: - payloadType: Issues From d831a501a36b4ee6f4f177e7cd86a2f6e2b36df4 Mon Sep 17 00:00:00 2001 From: Matthias Huygelen Date: Wed, 5 Jun 2024 18:41:04 +0200 Subject: [PATCH 011/257] Fix SetLockoutEnabledAsync comments (#56062) --- src/Identity/Extensions.Core/src/UserManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Identity/Extensions.Core/src/UserManager.cs b/src/Identity/Extensions.Core/src/UserManager.cs index 33c5eaaf62bd..cca2005d10d0 100644 --- a/src/Identity/Extensions.Core/src/UserManager.cs +++ b/src/Identity/Extensions.Core/src/UserManager.cs @@ -1735,11 +1735,11 @@ public virtual async Task IsLockedOutAsync(TUser user) } /// - /// Sets a flag indicating whether the specified is locked out, + /// Sets a flag indicating whether the specified can be locked out, /// as an asynchronous operation. /// /// The user whose locked out status should be set. - /// Flag indicating whether the user is locked out or not. + /// Flag indicating whether the user can be locked out or not. /// /// The that represents the asynchronous operation, the of the operation /// From 8adff2c3cf5a5f08ff8cf7715af7b3f540339c12 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Wed, 5 Jun 2024 11:14:34 -0700 Subject: [PATCH 012/257] Move schema store into service and add schema keys (#56084) --- .../OpenApiServiceCollectionExtensions.cs | 3 +- .../src/Services/OpenApiDocumentService.cs | 2 +- .../src/Services/Schemas/OpenApiSchemaKey.cs | 12 ++++++ .../OpenApiSchemaService.cs} | 25 +++--------- .../Services/Schemas/OpenApiSchemaStore.cs | 40 +++++++++++++++++++ ...OpenApiServiceCollectionExtensionsTests.cs | 12 +++--- .../OpenApiDocumentServiceTestsBase.cs | 35 +++++++++------- ...penApiComponentService.ParameterSchemas.cs | 0 ...nApiComponentService.RequestBodySchemas.cs | 0 ...OpenApiComponentService.ResponseSchemas.cs | 0 10 files changed, 88 insertions(+), 41 deletions(-) create mode 100644 src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs rename src/OpenApi/src/Services/{OpenApiComponentService.cs => Schemas/OpenApiSchemaService.cs} (75%) create mode 100644 src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs rename src/OpenApi/test/Services/{OpenApiComponentService => OpenApiSchemaService}/OpenApiComponentService.ParameterSchemas.cs (100%) rename src/OpenApi/test/Services/{OpenApiComponentService => OpenApiSchemaService}/OpenApiComponentService.RequestBodySchemas.cs (100%) rename src/OpenApi/test/Services/{OpenApiComponentService => OpenApiSchemaService}/OpenApiComponentService.ResponseSchemas.cs (100%) diff --git a/src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs b/src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs index 20573f1e3ff9..aef8d1794616 100644 --- a/src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs @@ -64,7 +64,8 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services) private static IServiceCollection AddOpenApiCore(this IServiceCollection services, string documentName) { services.AddEndpointsApiExplorer(); - services.AddKeyedSingleton(documentName); + services.AddKeyedSingleton(documentName); + services.AddKeyedSingleton(documentName); services.AddKeyedSingleton(documentName); // Required for build-time generation services.AddSingleton(); diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index 8a2d6090c1ff..04402b16b459 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -30,7 +30,7 @@ internal sealed class OpenApiDocumentService( IServiceProvider serviceProvider) { private readonly OpenApiOptions _options = optionsMonitor.Get(documentName); - private readonly OpenApiComponentService _componentService = serviceProvider.GetRequiredKeyedService(documentName); + private readonly OpenApiSchemaService _componentService = serviceProvider.GetRequiredKeyedService(documentName); private readonly IOpenApiDocumentTransformer _scrubExtensionsTransformer = new ScrubExtensionsTransformer(); private static readonly OpenApiEncoding _defaultFormEncoding = new OpenApiEncoding { Style = ParameterStyle.Form, Explode = true }; diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs new file mode 100644 index 000000000000..7286ce119d0a --- /dev/null +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Reflection; + +namespace Microsoft.AspNetCore.OpenApi; + +/// +/// Represents a unique identifier that is used to store and retrieve +/// JSON schemas associated with a given property. +/// +internal record struct OpenApiSchemaKey(Type Type, ParameterInfo? ParameterInfo); diff --git a/src/OpenApi/src/Services/OpenApiComponentService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs similarity index 75% rename from src/OpenApi/src/Services/OpenApiComponentService.cs rename to src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index f1314797e165..119634e4f9f0 100644 --- a/src/OpenApi/src/Services/OpenApiComponentService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -1,10 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Concurrent; using System.ComponentModel.DataAnnotations; using System.IO.Pipelines; -using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; using JsonSchemaMapper; @@ -12,6 +10,7 @@ using Microsoft.AspNetCore.Http.Json; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Infrastructure; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.OpenApi.Models; @@ -22,21 +21,9 @@ namespace Microsoft.AspNetCore.OpenApi; /// an OpenAPI document. In particular, this is the API that is used to /// interact with the JSON schemas that are managed by a given OpenAPI document. /// -internal sealed class OpenApiComponentService(IOptions jsonOptions) +internal sealed class OpenApiSchemaService([ServiceKey] string documentName, IOptions jsonOptions, IServiceProvider serviceProvider) { - private readonly ConcurrentDictionary<(Type, ParameterInfo?), JsonObject> _schemas = new() - { - // Pre-populate OpenAPI schemas for well-defined types in ASP.NET Core. - [(typeof(IFormFile), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, - [(typeof(IFormFileCollection), null)] = new JsonObject - { - ["type"] = "array", - ["items"] = new JsonObject { ["type"] = "string", ["format"] = "binary" } - }, - [(typeof(Stream), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, - [(typeof(PipeReader), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, - }; - + private readonly OpenApiSchemaStore _schemaStore = serviceProvider.GetRequiredKeyedService(documentName); private readonly JsonSerializerOptions _jsonSerializerOptions = jsonOptions.Value.SerializerOptions; private readonly JsonSchemaMapperConfiguration _configuration = new() { @@ -74,8 +61,8 @@ internal OpenApiSchema GetOrCreateSchema(Type type, ApiParameterDescription? par { var key = parameterDescription?.ParameterDescriptor is IParameterInfoParameterDescriptor parameterInfoDescription && parameterDescription.ModelMetadata.PropertyName is null - ? (type, parameterInfoDescription.ParameterInfo) : (type, null); - var schemaAsJsonObject = _schemas.GetOrAdd(key, CreateSchema); + ? new OpenApiSchemaKey(type, parameterInfoDescription.ParameterInfo) : new OpenApiSchemaKey(type, null); + var schemaAsJsonObject = _schemaStore.GetOrAdd(key, CreateSchema); if (parameterDescription is not null) { schemaAsJsonObject.ApplyParameterInfo(parameterDescription); @@ -84,7 +71,7 @@ internal OpenApiSchema GetOrCreateSchema(Type type, ApiParameterDescription? par return deserializedSchema != null ? deserializedSchema.Schema : new OpenApiSchema(); } - private JsonObject CreateSchema((Type Type, ParameterInfo? ParameterInfo) key) + private JsonObject CreateSchema(OpenApiSchemaKey key) => key.ParameterInfo is not null ? JsonSchemaMapper.JsonSchemaMapper.GetJsonSchema(_jsonSerializerOptions, key.ParameterInfo, _configuration) : JsonSchemaMapper.JsonSchemaMapper.GetJsonSchema(_jsonSerializerOptions, key.Type, _configuration); diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs new file mode 100644 index 000000000000..b37466ad0bae --- /dev/null +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Concurrent; +using System.IO.Pipelines; +using System.Text.Json.Nodes; +using Microsoft.AspNetCore.Http; + +namespace Microsoft.AspNetCore.OpenApi; + +/// +/// Stores schemas generated by the JsonSchemaMapper for a +/// given OpenAPI document for later resolution. +/// +internal sealed class OpenApiSchemaStore +{ + private readonly ConcurrentDictionary _schemas = new() + { + // Pre-populate OpenAPI schemas for well-defined types in ASP.NET Core. + [new OpenApiSchemaKey(typeof(IFormFile), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, + [new OpenApiSchemaKey(typeof(IFormFileCollection), null)] = new JsonObject + { + ["type"] = "array", + ["items"] = new JsonObject { ["type"] = "string", ["format"] = "binary" } + }, + [new OpenApiSchemaKey(typeof(Stream), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, + [new OpenApiSchemaKey(typeof(PipeReader), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, + }; + + /// + /// Resolves the JSON schema for the given type and parameter description. + /// + /// The key associated with the generated schema. + /// A function used to generated the JSON object representing the schema. + /// A representing the JSON schema associated with the key. + public JsonObject GetOrAdd(OpenApiSchemaKey key, Func valueFactory) + { + return _schemas.GetOrAdd(key, valueFactory); + } +} diff --git a/src/OpenApi/test/Extensions/OpenApiServiceCollectionExtensionsTests.cs b/src/OpenApi/test/Extensions/OpenApiServiceCollectionExtensionsTests.cs index d113642181ef..57e177605258 100644 --- a/src/OpenApi/test/Extensions/OpenApiServiceCollectionExtensionsTests.cs +++ b/src/OpenApi/test/Extensions/OpenApiServiceCollectionExtensionsTests.cs @@ -35,7 +35,7 @@ public void AddOpenApi_WithDocumentName_RegistersServices() var serviceProvider = services.BuildServiceProvider(); // Assert - Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiComponentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); + Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton); var options = serviceProvider.GetRequiredService>(); @@ -69,7 +69,7 @@ public void AddOpenApi_WithDocumentNameAndConfigureOptions_RegistersServices() var serviceProvider = services.BuildServiceProvider(); // Assert - Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiComponentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); + Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton); var options = serviceProvider.GetRequiredService>(); @@ -102,7 +102,7 @@ public void AddOpenApi_WithoutDocumentName_RegistersServices() var serviceProvider = services.BuildServiceProvider(); // Assert - Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiComponentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); + Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton); var options = serviceProvider.GetRequiredService>(); @@ -135,7 +135,7 @@ public void AddOpenApi_WithConfigureOptions_RegistersServices() var serviceProvider = services.BuildServiceProvider(); // Assert - Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiComponentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); + Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton); var options = serviceProvider.GetRequiredService>(); @@ -157,7 +157,7 @@ public void AddOpenApi_WithDuplicateDocumentNames_UsesLastRegistration() var serviceProvider = services.BuildServiceProvider(); // Assert - Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiComponentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); + Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton); var options = serviceProvider.GetRequiredService>(); @@ -181,7 +181,7 @@ public void AddOpenApi_WithDuplicateDocumentNames_UsesLastRegistration_ValidateO var serviceProvider = services.BuildServiceProvider(); // Assert - Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiComponentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); + Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiSchemaService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(OpenApiDocumentService) && sd.Lifetime == ServiceLifetime.Singleton && (string)sd.ServiceKey == documentName); Assert.Contains(services, sd => sd.ServiceType == typeof(IDocumentProvider) && sd.Lifetime == ServiceLifetime.Singleton); var options = serviceProvider.GetRequiredService>(); diff --git a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs index bb400c6e5790..f6a2d749294e 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Reflection; -using System.Text.Json; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Json; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; @@ -18,7 +15,6 @@ using Microsoft.AspNetCore.Routing.Constraints; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; using Moq; using static Microsoft.AspNetCore.OpenApi.Tests.OpenApiOperationGeneratorTests; @@ -217,27 +213,38 @@ private class TestServiceProvider : IServiceProvider, IKeyedServiceProvider public static TestServiceProvider Instance { get; } = new TestServiceProvider(); private IKeyedServiceProvider _serviceProvider; internal OpenApiDocumentService TestDocumentService { get; set; } - internal OpenApiComponentService TestComponentService { get; set; } = new OpenApiComponentService(Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions())); + internal OpenApiSchemaStore TestSchemaStoreService { get; } = new OpenApiSchemaStore(); + private OpenApiSchemaService _testSchemaService; public void SetInternalServiceProvider(IServiceCollection serviceCollection) { + serviceCollection.AddKeyedSingleton("Test"); _serviceProvider = serviceCollection.BuildServiceProvider(); + _testSchemaService = new OpenApiSchemaService( + "Test", + Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), + _serviceProvider + ); } public object GetKeyedService(Type serviceType, object serviceKey) { + if (serviceType == typeof(OpenApiDocumentService)) { return TestDocumentService; } - if (serviceType == typeof(OpenApiComponentService)) + if (serviceType == typeof(OpenApiSchemaService)) { - return TestComponentService; + return _testSchemaService; } - - if (serviceType == typeof(OpenApiComponentService)) + if (serviceType == typeof(OpenApiSchemaService)) + { + return _testSchemaService; + } + if (serviceType == typeof(OpenApiSchemaStore)) { - return TestComponentService; + return TestSchemaStoreService; } return _serviceProvider.GetKeyedService(serviceType, serviceKey); @@ -249,14 +256,14 @@ public object GetRequiredKeyedService(Type serviceType, object serviceKey) { return TestDocumentService; } - if (serviceType == typeof(OpenApiComponentService)) + if (serviceType == typeof(OpenApiSchemaService)) { - return TestComponentService; + return _testSchemaService; } - if (serviceType == typeof(OpenApiComponentService)) + if (serviceType == typeof(OpenApiSchemaService)) { - return TestComponentService; + return _testSchemaService; } return _serviceProvider.GetRequiredKeyedService(serviceType, serviceKey); diff --git a/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ParameterSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs similarity index 100% rename from src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ParameterSchemas.cs rename to src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs diff --git a/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs similarity index 100% rename from src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.RequestBodySchemas.cs rename to src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs diff --git a/src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs similarity index 100% rename from src/OpenApi/test/Services/OpenApiComponentService/OpenApiComponentService.ResponseSchemas.cs rename to src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs From 0780e765e46787278a37208f432e287b7e83a83f Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 5 Jun 2024 14:31:48 -0700 Subject: [PATCH 013/257] Quarantine the flakiest IIS tests (#55938) There's already a bulk retry for IIS tests, but these are still failing often enough to be irritating. Part of #55936 and #55937 --- src/Servers/IIS/IIS/test/Common.LongTests/ShutdownTests.cs | 1 + src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Servers/IIS/IIS/test/Common.LongTests/ShutdownTests.cs b/src/Servers/IIS/IIS/test/Common.LongTests/ShutdownTests.cs index 5d82142bcddd..875e8898d4c3 100644 --- a/src/Servers/IIS/IIS/test/Common.LongTests/ShutdownTests.cs +++ b/src/Servers/IIS/IIS/test/Common.LongTests/ShutdownTests.cs @@ -537,6 +537,7 @@ public async Task ConfigurationChangeCanBeIgnoredOutOfProcess() await deploymentResult.HttpClient.RetryRequestAsync("/ProcessId", async r => await r.Content.ReadAsStringAsync() == processBefore); } + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55937")] [ConditionalFact] public async Task OutOfProcessToInProcessHostingModelSwitchWorks() { diff --git a/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs b/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs index e71bb522f53c..eace234e8f98 100644 --- a/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs +++ b/src/Servers/IIS/IIS/test/IIS.Tests/ClientDisconnectTests.cs @@ -225,6 +225,7 @@ public async Task ReaderThrowsCanceledException() } } + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55936")] [ConditionalFact] public async Task ReaderThrowsResetExceptionOnInvalidBody() { From 8e74eef13de251e4db180ac2e98b83f8afb25811 Mon Sep 17 00:00:00 2001 From: Ken Dale Date: Wed, 5 Jun 2024 19:40:24 -0400 Subject: [PATCH 014/257] Update AuthenticationSchemeProvider.cs public constructor summary punctuation (#55919) --- .../Authentication.Core/src/AuthenticationSchemeProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Authentication.Core/src/AuthenticationSchemeProvider.cs b/src/Http/Authentication.Core/src/AuthenticationSchemeProvider.cs index e2e1585376f3..a24b8785e889 100644 --- a/src/Http/Authentication.Core/src/AuthenticationSchemeProvider.cs +++ b/src/Http/Authentication.Core/src/AuthenticationSchemeProvider.cs @@ -14,7 +14,7 @@ public class AuthenticationSchemeProvider : IAuthenticationSchemeProvider { /// /// Creates an instance of - /// using the specified , + /// using the specified . /// /// The options. public AuthenticationSchemeProvider(IOptions options) From f244d1d5dd72525e0f679870ce592284d03b358a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:43:45 -0700 Subject: [PATCH 015/257] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240604.1 (#56083) Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24303.1 -> To Version 9.0.0-alpha.1.24304.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index eb76a50e90bb..5039a14f48f6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -335,9 +335,9 @@ b1d534fe8831bbf62dc4356a7e611befee6ece33 - + https://github.com/dotnet/source-build-reference-packages - 92f050c4768a6a8da3f79eba6dca60effd9c20fa + 9ae78a4e6412926d19ba97cfed159bf9de70b538 diff --git a/eng/Versions.props b/eng/Versions.props index 2ade8626acc2..4c1a5e7dfe92 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -167,7 +167,7 @@ 9.0.0-alpha.1.24278.2 - 9.0.0-alpha.1.24303.1 + 9.0.0-alpha.1.24304.1 2.1.0-beta.24208.1 From 3612a9f261c696447844eb748a545bd062beeab4 Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Wed, 5 Jun 2024 18:26:37 -0700 Subject: [PATCH 016/257] Unquarantine `HeartbeatLoopRunsWithSpecifiedInterval` (#56091) --- src/Servers/Kestrel/Core/test/HeartbeatTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Servers/Kestrel/Core/test/HeartbeatTests.cs b/src/Servers/Kestrel/Core/test/HeartbeatTests.cs index 02062e71f00b..5d027529f53c 100644 --- a/src/Servers/Kestrel/Core/test/HeartbeatTests.cs +++ b/src/Servers/Kestrel/Core/test/HeartbeatTests.cs @@ -20,7 +20,6 @@ public void HeartbeatIntervalIsOneSecond() } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55297")] public async void HeartbeatLoopRunsWithSpecifiedInterval() { var heartbeatCallCount = 0; From 73067c12a90dae337dff1cf3584f660f516c84dc Mon Sep 17 00:00:00 2001 From: ladeak Date: Thu, 6 Jun 2024 17:55:50 +0200 Subject: [PATCH 017/257] Allow HTTP2 encoder to split headers across frames (#55322) * Initial implementation * Review feedback * Updating a comment * Minor perf opt when all headers fit in a single header frame. * Adding MaxResponseHeadersLimit to H2 framewriter * Protect against overflow * Validating the header length in HPackHeaderWriter * Removing a test file commented out and adding more tests. * Review feedback * Removing header limits related code because it is up to the service owner to not to ddos itself * A test for 1MB header value * Review comments - removing an unneeded if condition * Sketch * using arraypool instead of arraybufferwriter * Re-using the rented buffers * Preserving the size of the temporary larger buffer within the framewriter. This way if the same large header is written multiple times over the lifespan of a connection, it does not need to go through the loops of increasing the headers repetitively. * Adjusting the logic of UpdateMaxFrameSize for setting a new _headersEncodingLargeBufferSize * Adjusting the logic of _headersEncodingLargeBufferSize to avoid 0 values. * Extenting Benachmark with headers sized 0, 10KB and 20KB * Remove int.Max on header size increase and using checked arithmetic instead. * Tests * Update src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs Co-authored-by: James Newton-King * Review feedback: HeaderWriteResult not an inner type, adding comments on size increase * Update src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs Co-authored-by: Andrew Casey * - Moving comments around for _headersEncodingLargeBufferSize - Rename splitting method to SplitHeaderAcrossFrames * Merging the implementation of BeginEncodeHeaders and RetryBeginEncodeHeaders * Apply suggestions from code review Co-authored-by: James Newton-King --------- Co-authored-by: ladeak Co-authored-by: James Newton-King Co-authored-by: Andrew Casey --- .../src/Internal/Http2/Http2Connection.cs | 6 +- .../src/Internal/Http2/Http2FrameWriter.cs | 135 +++- .../Core/test/HPackHeaderWriterTests.cs | 199 ------ .../Core/test/Http2/Http2FrameWriterTests.cs | 15 +- .../Core/test/Http2/Http2HPackEncoderTests.cs | 106 ++- .../Http2/HPackHeaderWriterBenchmark.cs | 4 - .../Http2/Http2FrameWriterBenchmark.cs | 23 +- .../Kestrel/shared/HPackHeaderWriter.cs | 59 +- .../test/PipeWriterHttp2FrameExtensions.cs | 7 +- .../Http2/Http2StreamTests.cs | 623 +++++++++++++++++- .../Http2/Http2TestBase.cs | 8 +- .../Http2/Http2RequestTests.cs | 40 ++ .../Interop.FunctionalTests/HttpHelpers.cs | 7 +- 13 files changed, 908 insertions(+), 324 deletions(-) delete mode 100644 src/Servers/Kestrel/Core/test/HPackHeaderWriterTests.cs diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index 44fd7ad794b8..890cf2aed347 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -938,7 +938,9 @@ private Task ProcessSettingsFrameAsync(in ReadOnlySequence payload) if (_clientSettings.MaxFrameSize != previousMaxFrameSize) { // Don't let the client choose an arbitrarily large size, this will be used for response buffers. - _frameWriter.UpdateMaxFrameSize(Math.Min(_clientSettings.MaxFrameSize, _serverSettings.MaxFrameSize)); + // Safe cast, MaxFrameSize is limited to 2^24-1 bytes by the protocol and by Http2PeerSettings. + // Ref: https://datatracker.ietf.org/doc/html/rfc7540#section-4.2 + _frameWriter.UpdateMaxFrameSize((int)Math.Min(_clientSettings.MaxFrameSize, _serverSettings.MaxFrameSize)); } // This difference can be negative. @@ -1829,4 +1831,4 @@ private static class GracefulCloseInitiator public const int Server = 1; public const int Client = 2; } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs index 802c68c4126f..b799ef02797c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs @@ -29,6 +29,8 @@ internal sealed class Http2FrameWriter /// TODO (https://github.com/dotnet/aspnetcore/issues/51309): eliminate this limit. private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize"; + private const int HeaderBufferSizeMultiplier = 2; + private static readonly int? AppContextMaximumFlowControlQueueSize = GetAppContextMaximumFlowControlQueueSize(); private static int? GetAppContextMaximumFlowControlQueueSize() @@ -71,8 +73,12 @@ internal sealed class Http2FrameWriter // This is only set to true by tests. private readonly bool _scheduleInline; - private uint _maxFrameSize = Http2PeerSettings.MinAllowedMaxFrameSize; + private int _maxFrameSize = Http2PeerSettings.MinAllowedMaxFrameSize; private byte[] _headerEncodingBuffer; + + // Keep track of the high-water mark of _headerEncodingBuffer's size so we don't have to grow + // through intermediate sizes repeatedly. + private int _headersEncodingLargeBufferSize = Http2PeerSettings.MinAllowedMaxFrameSize * HeaderBufferSizeMultiplier; private long _unflushedBytes; private bool _completed; @@ -110,7 +116,6 @@ public Http2FrameWriter( _headerEncodingBuffer = new byte[_maxFrameSize]; _scheduleInline = serviceContext.Scheduler == PipeScheduler.Inline; - _hpackEncoder = new DynamicHPackEncoder(serviceContext.ServerOptions.AllowResponseHeaderCompression); _maximumFlowControlQueueSize = AppContextMaximumFlowControlQueueSize is null @@ -367,12 +372,15 @@ public void UpdateMaxHeaderTableSize(uint maxHeaderTableSize) } } - public void UpdateMaxFrameSize(uint maxFrameSize) + public void UpdateMaxFrameSize(int maxFrameSize) { lock (_writeLock) { if (_maxFrameSize != maxFrameSize) { + // Safe multiply, MaxFrameSize is limited to 2^24-1 bytes by the protocol and by Http2PeerSettings. + // Ref: https://datatracker.ietf.org/doc/html/rfc7540#section-4.2 + _headersEncodingLargeBufferSize = int.Max(_headersEncodingLargeBufferSize, maxFrameSize * HeaderBufferSizeMultiplier); _maxFrameSize = maxFrameSize; _headerEncodingBuffer = new byte[_maxFrameSize]; } @@ -507,11 +515,12 @@ private void WriteResponseHeadersUnsynchronized(int streamId, int statusCode, Ht { try { + // In the case of the headers, there is always a status header to be returned, so BeginEncodeHeaders will not return BufferTooSmall. _headersEnumerator.Initialize(headers); _outgoingFrame.PrepareHeaders(headerFrameFlags, streamId); - var buffer = _headerEncodingBuffer.AsSpan(); - var done = HPackHeaderWriter.BeginEncodeHeaders(statusCode, _hpackEncoder, _headersEnumerator, buffer, out var payloadLength); - FinishWritingHeadersUnsynchronized(streamId, payloadLength, done); + var writeResult = HPackHeaderWriter.BeginEncodeHeaders(statusCode, _hpackEncoder, _headersEnumerator, _headerEncodingBuffer, out var payloadLength); + Debug.Assert(writeResult != HeaderWriteResult.BufferTooSmall, "This always writes the status as the first header, and it should never be an over the buffer size."); + FinishWritingHeadersUnsynchronized(streamId, payloadLength, writeResult); } // Any exception from the HPack encoder can leave the dynamic table in a corrupt state. // Since we allow custom header encoders we don't know what type of exceptions to expect. @@ -548,11 +557,11 @@ private ValueTask WriteDataAndTrailersAsync(Http2Stream stream, in try { - _headersEnumerator.Initialize(headers); + // In the case of the trailers, there is no status header to be written, so even the first call to BeginEncodeHeaders can return BufferTooSmall. _outgoingFrame.PrepareHeaders(Http2HeadersFrameFlags.END_STREAM, streamId); - var buffer = _headerEncodingBuffer.AsSpan(); - var done = HPackHeaderWriter.BeginEncodeHeaders(_hpackEncoder, _headersEnumerator, buffer, out var payloadLength); - FinishWritingHeadersUnsynchronized(streamId, payloadLength, done); + _headersEnumerator.Initialize(headers); + var writeResult = HPackHeaderWriter.BeginEncodeHeaders(_hpackEncoder, _headersEnumerator, _headerEncodingBuffer, out var payloadLength); + FinishWritingHeadersUnsynchronized(streamId, payloadLength, writeResult); } // Any exception from the HPack encoder can leave the dynamic table in a corrupt state. // Since we allow custom header encoders we don't know what type of exceptions to expect. @@ -566,32 +575,102 @@ private ValueTask WriteDataAndTrailersAsync(Http2Stream stream, in } } - private void FinishWritingHeadersUnsynchronized(int streamId, int payloadLength, bool done) + private void SplitHeaderAcrossFrames(int streamId, ReadOnlySpan dataToFrame, bool endOfHeaders, bool isFramePrepared) { - var buffer = _headerEncodingBuffer.AsSpan(); - _outgoingFrame.PayloadLength = payloadLength; - if (done) + var shouldPrepareFrame = !isFramePrepared; + while (dataToFrame.Length > 0) { - _outgoingFrame.HeadersFlags |= Http2HeadersFrameFlags.END_HEADERS; - } + if (shouldPrepareFrame) + { + _outgoingFrame.PrepareContinuation(Http2ContinuationFrameFlags.NONE, streamId); + } - WriteHeaderUnsynchronized(); - _outputWriter.Write(buffer.Slice(0, payloadLength)); + // Should prepare continuation frames. + shouldPrepareFrame = true; + var currentSize = Math.Min(dataToFrame.Length, _maxFrameSize); + _outgoingFrame.PayloadLength = currentSize; + if (endOfHeaders && dataToFrame.Length == currentSize) + { + _outgoingFrame.HeadersFlags |= Http2HeadersFrameFlags.END_HEADERS; + } - while (!done) - { - _outgoingFrame.PrepareContinuation(Http2ContinuationFrameFlags.NONE, streamId); + WriteHeaderUnsynchronized(); + _outputWriter.Write(dataToFrame[..currentSize]); + dataToFrame = dataToFrame.Slice(currentSize); + } + } - done = HPackHeaderWriter.ContinueEncodeHeaders(_hpackEncoder, _headersEnumerator, buffer, out payloadLength); + private void FinishWritingHeadersUnsynchronized(int streamId, int payloadLength, HeaderWriteResult writeResult) + { + Debug.Assert(payloadLength <= _maxFrameSize, "The initial payload lengths is written to _headerEncodingBuffer with size of _maxFrameSize"); + byte[]? largeHeaderBuffer = null; + Span buffer; + if (writeResult == HeaderWriteResult.Done) + { + // Fast path, only a single HEADER frame. _outgoingFrame.PayloadLength = payloadLength; - - if (done) + _outgoingFrame.HeadersFlags |= Http2HeadersFrameFlags.END_HEADERS; + WriteHeaderUnsynchronized(); + _outputWriter.Write(_headerEncodingBuffer.AsSpan(0, payloadLength)); + return; + } + else if (writeResult == HeaderWriteResult.MoreHeaders) + { + _outgoingFrame.PayloadLength = payloadLength; + WriteHeaderUnsynchronized(); + _outputWriter.Write(_headerEncodingBuffer.AsSpan(0, payloadLength)); + } + else + { + // This may happen in case of the TRAILERS after the initial encode operation. + // The _maxFrameSize sized _headerEncodingBuffer was too small. + while (writeResult == HeaderWriteResult.BufferTooSmall) + { + Debug.Assert(payloadLength == 0, "Payload written even though buffer is too small"); + largeHeaderBuffer = ArrayPool.Shared.Rent(_headersEncodingLargeBufferSize); + buffer = largeHeaderBuffer.AsSpan(0, _headersEncodingLargeBufferSize); + writeResult = HPackHeaderWriter.RetryBeginEncodeHeaders(_hpackEncoder, _headersEnumerator, buffer, out payloadLength); + if (writeResult != HeaderWriteResult.BufferTooSmall) + { + SplitHeaderAcrossFrames(streamId, buffer[..payloadLength], endOfHeaders: writeResult == HeaderWriteResult.Done, isFramePrepared: true); + } + else + { + _headersEncodingLargeBufferSize = checked(_headersEncodingLargeBufferSize * HeaderBufferSizeMultiplier); + } + ArrayPool.Shared.Return(largeHeaderBuffer); + largeHeaderBuffer = null; + } + if (writeResult == HeaderWriteResult.Done) { - _outgoingFrame.ContinuationFlags = Http2ContinuationFrameFlags.END_HEADERS; + return; } + } - WriteHeaderUnsynchronized(); - _outputWriter.Write(buffer.Slice(0, payloadLength)); + // HEADERS and zero or more CONTINUATIONS sent - all subsequent frames are (unprepared) CONTINUATIONs + buffer = _headerEncodingBuffer; + while (writeResult != HeaderWriteResult.Done) + { + writeResult = HPackHeaderWriter.ContinueEncodeHeaders(_hpackEncoder, _headersEnumerator, buffer, out payloadLength); + if (writeResult == HeaderWriteResult.BufferTooSmall) + { + if (largeHeaderBuffer != null) + { + ArrayPool.Shared.Return(largeHeaderBuffer); + _headersEncodingLargeBufferSize = checked(_headersEncodingLargeBufferSize * HeaderBufferSizeMultiplier); + } + largeHeaderBuffer = ArrayPool.Shared.Rent(_headersEncodingLargeBufferSize); + buffer = largeHeaderBuffer.AsSpan(0, _headersEncodingLargeBufferSize); + } + else + { + // In case of Done or MoreHeaders: write to output. + SplitHeaderAcrossFrames(streamId, buffer[..payloadLength], endOfHeaders: writeResult == HeaderWriteResult.Done, isFramePrepared: false); + } + } + if (largeHeaderBuffer != null) + { + ArrayPool.Shared.Return(largeHeaderBuffer); } } @@ -1023,4 +1102,4 @@ private void EnqueueWaitingForMoreConnectionWindow(Http2OutputProducer producer) _http2Connection.Abort(new ConnectionAbortedException("HTTP/2 connection exceeded the outgoing flow control maximum queue size.")); } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Core/test/HPackHeaderWriterTests.cs b/src/Servers/Kestrel/Core/test/HPackHeaderWriterTests.cs deleted file mode 100644 index cc6d85be4950..000000000000 --- a/src/Servers/Kestrel/Core/test/HPackHeaderWriterTests.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; -//using Microsoft.Extensions.Primitives; -//using Xunit; - -//namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests -//{ -// public class HPackHeaderWriterTests -// { -// public static TheoryData[], byte[], int?> SinglePayloadData -// { -// get -// { -// var data = new TheoryData[], byte[], int?>(); - -// // Lowercase header name letters only -// data.Add( -// new[] -// { -// new KeyValuePair("CustomHeader", "CustomValue"), -// }, -// new byte[] -// { -// // 0 12 c u s t o m -// 0x00, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, -// // h e a d e r 11 C -// 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x0b, 0x43, -// // u s t o m V a l -// 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x61, 0x6c, -// // u e -// 0x75, 0x65 -// }, -// null); -// // Lowercase header name letters only -// data.Add( -// new[] -// { -// new KeyValuePair("CustomHeader!#$%&'*+-.^_`|~", "CustomValue"), -// }, -// new byte[] -// { -// // 0 27 c u s t o m -// 0x00, 0x1b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, -// // h e a d e r ! # -// 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x21, 0x23, -// // $ % & ' * + - . -// 0x24, 0x25, 0x26, 0x27, 0x2a, 0x2b, 0x2d, 0x2e, -// // ^ _ ` | ~ 11 C u -// 0x5e, 0x5f, 0x60, 0x7c, 0x7e, 0x0b, 0x43, 0x75, -// // s t o m V a l u -// 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, -// // e -// 0x65 -// }, -// null); -// // Single Payload -// data.Add( -// new[] -// { -// new KeyValuePair("date", "Mon, 24 Jul 2017 19:22:30 GMT"), -// new KeyValuePair("content-type", "text/html; charset=utf-8"), -// new KeyValuePair("server", "Kestrel") -// }, -// new byte[] -// { -// 0x88, 0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x1d, -// 0x4d, 0x6f, 0x6e, 0x2c, 0x20, 0x32, 0x34, 0x20, -// 0x4a, 0x75, 0x6c, 0x20, 0x32, 0x30, 0x31, 0x37, -// 0x20, 0x31, 0x39, 0x3a, 0x32, 0x32, 0x3a, 0x33, -// 0x30, 0x20, 0x47, 0x4d, 0x54, 0x00, 0x0c, 0x63, -// 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, -// 0x79, 0x70, 0x65, 0x18, 0x74, 0x65, 0x78, 0x74, -// 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x20, 0x63, -// 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, -// 0x74, 0x66, 0x2d, 0x38, 0x00, 0x06, 0x73, 0x65, -// 0x72, 0x76, 0x65, 0x72, 0x07, 0x4b, 0x65, 0x73, -// 0x74, 0x72, 0x65, 0x6c -// }, -// 200); - -// return data; -// } -// } - -// [Theory] -// [MemberData(nameof(SinglePayloadData))] -// public void EncodesHeadersInSinglePayloadWhenSpaceAvailable(KeyValuePair[] headers, byte[] expectedPayload, int? statusCode) -// { -// var payload = new byte[1024]; -// var length = 0; -// if (statusCode.HasValue) -// { -// Assert.True(HPackHeaderWriter.BeginEncodeHeaders(statusCode.Value, GetHeadersEnumerator(headers), payload, out length)); -// } -// else -// { -// Assert.True(HPackHeaderWriter.BeginEncodeHeaders(GetHeadersEnumerator(headers), payload, out length)); -// } -// Assert.Equal(expectedPayload.Length, length); - -// for (var i = 0; i < length; i++) -// { -// Assert.True(expectedPayload[i] == payload[i], $"{expectedPayload[i]} != {payload[i]} at {i} (len {length})"); -// } - -// Assert.Equal(expectedPayload, new ArraySegment(payload, 0, length)); -// } - -// [Theory] -// [InlineData(true)] -// [InlineData(false)] -// public void EncodesHeadersInMultiplePayloadsWhenSpaceNotAvailable(bool exactSize) -// { -// var statusCode = 200; -// var headers = new[] -// { -// new KeyValuePair("date", "Mon, 24 Jul 2017 19:22:30 GMT"), -// new KeyValuePair("content-type", "text/html; charset=utf-8"), -// new KeyValuePair("server", "Kestrel") -// }; - -// var expectedStatusCodePayload = new byte[] -// { -// 0x88 -// }; - -// var expectedDateHeaderPayload = new byte[] -// { -// 0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x1d, 0x4d, -// 0x6f, 0x6e, 0x2c, 0x20, 0x32, 0x34, 0x20, 0x4a, -// 0x75, 0x6c, 0x20, 0x32, 0x30, 0x31, 0x37, 0x20, -// 0x31, 0x39, 0x3a, 0x32, 0x32, 0x3a, 0x33, 0x30, -// 0x20, 0x47, 0x4d, 0x54 -// }; - -// var expectedContentTypeHeaderPayload = new byte[] -// { -// 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, -// 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x18, 0x74, -// 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, -// 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, -// 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38 -// }; - -// var expectedServerHeaderPayload = new byte[] -// { -// 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, -// 0x07, 0x4b, 0x65, 0x73, 0x74, 0x72, 0x65, 0x6c -// }; - -// Span payload = new byte[1024]; -// var offset = 0; -// var headerEnumerator = GetHeadersEnumerator(headers); - -// // When !exactSize, slices are one byte short of fitting the next header -// var sliceLength = expectedStatusCodePayload.Length + (exactSize ? 0 : expectedDateHeaderPayload.Length - 1); -// Assert.False(HPackHeaderWriter.BeginEncodeHeaders(statusCode, headerEnumerator, payload.Slice(offset, sliceLength), out var length)); -// Assert.Equal(expectedStatusCodePayload.Length, length); -// Assert.Equal(expectedStatusCodePayload, payload.Slice(0, length).ToArray()); - -// offset += length; - -// sliceLength = expectedDateHeaderPayload.Length + (exactSize ? 0 : expectedContentTypeHeaderPayload.Length - 1); -// Assert.False(HPackHeaderWriter.ContinueEncodeHeaders(headerEnumerator, payload.Slice(offset, sliceLength), out length)); -// Assert.Equal(expectedDateHeaderPayload.Length, length); -// Assert.Equal(expectedDateHeaderPayload, payload.Slice(offset, length).ToArray()); - -// offset += length; - -// sliceLength = expectedContentTypeHeaderPayload.Length + (exactSize ? 0 : expectedServerHeaderPayload.Length - 1); -// Assert.False(HPackHeaderWriter.ContinueEncodeHeaders(headerEnumerator, payload.Slice(offset, sliceLength), out length)); -// Assert.Equal(expectedContentTypeHeaderPayload.Length, length); -// Assert.Equal(expectedContentTypeHeaderPayload, payload.Slice(offset, length).ToArray()); - -// offset += length; - -// sliceLength = expectedServerHeaderPayload.Length; -// Assert.True(HPackHeaderWriter.ContinueEncodeHeaders(headerEnumerator, payload.Slice(offset, sliceLength), out length)); -// Assert.Equal(expectedServerHeaderPayload.Length, length); -// Assert.Equal(expectedServerHeaderPayload, payload.Slice(offset, length).ToArray()); -// } - -// private static Http2HeadersEnumerator GetHeadersEnumerator(IEnumerable> headers) -// { -// var groupedHeaders = headers -// .GroupBy(k => k.Key) -// .ToDictionary(g => g.Key, g => new StringValues(g.Select(gg => gg.Value).ToArray())); - -// var enumerator = new Http2HeadersEnumerator(); -// enumerator.Initialize(groupedHeaders); -// return enumerator; -// } -// } -//} diff --git a/src/Servers/Kestrel/Core/test/Http2/Http2FrameWriterTests.cs b/src/Servers/Kestrel/Core/test/Http2/Http2FrameWriterTests.cs index cafd8a98a0f2..ea2ec9ba5609 100644 --- a/src/Servers/Kestrel/Core/test/Http2/Http2FrameWriterTests.cs +++ b/src/Servers/Kestrel/Core/test/Http2/Http2FrameWriterTests.cs @@ -1,17 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Buffers; using System.IO.Pipelines; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Moq; -using Xunit; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests; @@ -92,6 +86,13 @@ public async Task WriteHeader_UnsetsReservedBit() Assert.Equal(new byte[] { 0x00, 0x00, 0x00, 0x00 }, payload.Skip(5).Take(4).ToArray()); } + + [Fact] + public void UpdateMaxFrameSize_To_ProtocolMaximum() + { + var sut = CreateFrameWriter(new Pipe()); + sut.UpdateMaxFrameSize((int)Math.Pow(2, 24) - 1); + } } public static class PipeReaderExtensions diff --git a/src/Servers/Kestrel/Core/test/Http2/Http2HPackEncoderTests.cs b/src/Servers/Kestrel/Core/test/Http2/Http2HPackEncoderTests.cs index e65d33eaf0fd..2edf4628129e 100644 --- a/src/Servers/Kestrel/Core/test/Http2/Http2HPackEncoderTests.cs +++ b/src/Servers/Kestrel/Core/test/Http2/Http2HPackEncoderTests.cs @@ -1,19 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Http.HPack; using System.Text; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Microsoft.Extensions.Primitives; -using Microsoft.Net.Http.Headers; - -using Xunit; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests; @@ -29,7 +22,7 @@ public void BeginEncodeHeaders_Status302_NewIndexValue() enumerator.Initialize(headers); var hpackEncoder = new DynamicHPackEncoder(); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); var result = buffer.Slice(0, length).ToArray(); var hex = BitConverter.ToString(result); @@ -52,7 +45,7 @@ public void BeginEncodeHeaders_CacheControlPrivate_NewIndexValue() enumerator.Initialize(headers); var hpackEncoder = new DynamicHPackEncoder(); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); var result = buffer.Slice(5, length - 5).ToArray(); var hex = BitConverter.ToString(result); @@ -67,7 +60,6 @@ public void BeginEncodeHeaders_CacheControlPrivate_NewIndexValue() public void BeginEncodeHeaders_MaxHeaderTableSizeExceeded_EvictionsToFit() { // Test follows example https://tools.ietf.org/html/rfc7541#appendix-C.5 - Span buffer = new byte[1024 * 16]; var headers = (IHeaderDictionary)new HttpResponseHeaders(); @@ -81,7 +73,7 @@ public void BeginEncodeHeaders_MaxHeaderTableSizeExceeded_EvictionsToFit() // First response enumerator.Initialize(headers); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); var result = buffer.Slice(0, length).ToArray(); var hex = BitConverter.ToString(result); @@ -123,7 +115,7 @@ public void BeginEncodeHeaders_MaxHeaderTableSizeExceeded_EvictionsToFit() // Second response enumerator.Initialize(headers); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(307, hpackEncoder, enumerator, buffer, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(307, hpackEncoder, enumerator, buffer, out length)); result = buffer.Slice(0, length).ToArray(); hex = BitConverter.ToString(result); @@ -164,7 +156,7 @@ public void BeginEncodeHeaders_MaxHeaderTableSizeExceeded_EvictionsToFit() headers.SetCookie = "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"; enumerator.Initialize(headers); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out length)); result = buffer.Slice(0, length).ToArray(); hex = BitConverter.ToString(result); @@ -225,7 +217,7 @@ public void BeginEncodeHeadersCustomEncoding_MaxHeaderTableSizeExceeded_Eviction // First response enumerator.Initialize((HttpResponseHeaders)headers); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length)); var result = buffer.Slice(0, length).ToArray(); var hex = BitConverter.ToString(result); @@ -267,7 +259,7 @@ public void BeginEncodeHeadersCustomEncoding_MaxHeaderTableSizeExceeded_Eviction // Second response enumerator.Initialize(headers); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(307, hpackEncoder, enumerator, buffer, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(307, hpackEncoder, enumerator, buffer, out length)); result = buffer.Slice(0, length).ToArray(); hex = BitConverter.ToString(result); @@ -308,7 +300,7 @@ public void BeginEncodeHeadersCustomEncoding_MaxHeaderTableSizeExceeded_Eviction headers.SetCookie = "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"; enumerator.Initialize(headers); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out length)); result = buffer.Slice(0, length).ToArray(); hex = BitConverter.ToString(result); @@ -366,7 +358,7 @@ public void BeginEncodeHeaders_ExcludedHeaders_NotAddedToTable(string headerName enumerator.Initialize(headers); var hpackEncoder = new DynamicHPackEncoder(maxHeaderTableSize: Http2PeerSettings.DefaultHeaderTableSize); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out _)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out _)); if (neverIndex) { @@ -392,7 +384,7 @@ public void BeginEncodeHeaders_HeaderExceedHeaderTableSize_NoIndexAndNoHeaderEnt enumerator.Initialize(headers); var hpackEncoder = new DynamicHPackEncoder(); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length)); Assert.Empty(GetHeaderEntries(hpackEncoder)); } @@ -477,16 +469,15 @@ public void BeginEncodeHeaders_HeaderExceedHeaderTableSize_NoIndexAndNoHeaderEnt public void EncodesHeadersInSinglePayloadWhenSpaceAvailable(KeyValuePair[] headers, byte[] expectedPayload, int? statusCode) { var hpackEncoder = new DynamicHPackEncoder(); - var payload = new byte[1024]; var length = 0; if (statusCode.HasValue) { - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(statusCode.Value, hpackEncoder, GetHeadersEnumerator(headers), payload, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(statusCode.Value, hpackEncoder, GetHeadersEnumerator(headers), payload, out length)); } else { - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, GetHeadersEnumerator(headers), payload, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, GetHeadersEnumerator(headers), payload, out length)); } Assert.Equal(expectedPayload.Length, length); @@ -548,28 +539,28 @@ public void EncodesHeadersInMultiplePayloadsWhenSpaceNotAvailable(bool exactSize // When !exactSize, slices are one byte short of fitting the next header var sliceLength = expectedStatusCodePayload.Length + (exactSize ? 0 : expectedDateHeaderPayload.Length - 1); - Assert.False(HPackHeaderWriter.BeginEncodeHeaders(statusCode, hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out var length)); + Assert.Equal(HeaderWriteResult.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(statusCode, hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out var length)); Assert.Equal(expectedStatusCodePayload.Length, length); Assert.Equal(expectedStatusCodePayload, payload.Slice(0, length).ToArray()); offset += length; sliceLength = expectedDateHeaderPayload.Length + (exactSize ? 0 : expectedContentTypeHeaderPayload.Length - 1); - Assert.False(HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length)); + Assert.Equal(HeaderWriteResult.MoreHeaders, HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length)); Assert.Equal(expectedDateHeaderPayload.Length, length); Assert.Equal(expectedDateHeaderPayload, payload.Slice(offset, length).ToArray()); offset += length; sliceLength = expectedContentTypeHeaderPayload.Length + (exactSize ? 0 : expectedServerHeaderPayload.Length - 1); - Assert.False(HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length)); + Assert.Equal(HeaderWriteResult.MoreHeaders, HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length)); Assert.Equal(expectedContentTypeHeaderPayload.Length, length); Assert.Equal(expectedContentTypeHeaderPayload, payload.Slice(offset, length).ToArray()); offset += length; sliceLength = expectedServerHeaderPayload.Length; - Assert.True(HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length)); Assert.Equal(expectedServerHeaderPayload.Length, length); Assert.Equal(expectedServerHeaderPayload, payload.Slice(offset, length).ToArray()); } @@ -586,7 +577,7 @@ public void BeginEncodeHeaders_MaxHeaderTableSizeUpdated_SizeUpdateInHeaders() // First request enumerator.Initialize(new Dictionary()); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length)); Assert.Equal(2, length); @@ -600,11 +591,72 @@ public void BeginEncodeHeaders_MaxHeaderTableSizeUpdated_SizeUpdateInHeaders() // Second request enumerator.Initialize(new Dictionary()); - Assert.True(HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out length)); + Assert.Equal(HeaderWriteResult.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out length)); + + Assert.Equal(0, length); + } + + [Fact] + public void WithStatusCode_TooLargeHeader_ReturnsMoreHeaders() + { + Span buffer = new byte[1024 * 16]; + + IHeaderDictionary headers = new HttpResponseHeaders(); + headers.Cookie = new string('a', buffer.Length + 1); + var enumerator = new Http2HeadersEnumerator(); + enumerator.Initialize(headers); + + var hpackEncoder = new DynamicHPackEncoder(); + Assert.Equal(HeaderWriteResult.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(1, length); + } + + [Fact] + public void NoStatusCodeLargeHeader_ReturnsOversized() + { + Span buffer = new byte[1024 * 16]; + + IHeaderDictionary headers = new HttpResponseHeaders(); + headers.Cookie = new string('a', buffer.Length + 1); + var enumerator = new Http2HeadersEnumerator(); + enumerator.Initialize(headers); + var hpackEncoder = new DynamicHPackEncoder(); + Assert.Equal(HeaderWriteResult.BufferTooSmall, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length)); Assert.Equal(0, length); } + [Fact] + public void WithStatusCode_JustFittingHeaderNoSpace_ReturnsMoreHeaders() + { + Span buffer = new byte[1024 * 16]; + + IHeaderDictionary headers = new HttpResponseHeaders(); + headers.Cookie = new string('a', buffer.Length - 1); + var enumerator = new Http2HeadersEnumerator(); + enumerator.Initialize(headers); + + var hpackEncoder = new DynamicHPackEncoder(); + Assert.Equal(HeaderWriteResult.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(1, length); + } + + [Fact] + public void NoStatusCode_JustFittingHeaderNoSpace_ReturnsMoreHeaders() + { + Span buffer = new byte[1024 * 16]; + + IHeaderDictionary headers = new HttpResponseHeaders(); + headers.Accept = "application/json;"; + headers.Cookie = new string('a', buffer.Length - 1); + var enumerator = new Http2HeadersEnumerator(); + enumerator.Initialize(headers); + + var hpackEncoder = new DynamicHPackEncoder(); + Assert.Equal(HeaderWriteResult.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length)); + Assert.Equal(26, length); + } + private static Http2HeadersEnumerator GetHeadersEnumerator(IEnumerable> headers) { var groupedHeaders = headers diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Http2/HPackHeaderWriterBenchmark.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Http2/HPackHeaderWriterBenchmark.cs index cff79ef3dd96..cff2aa9bed9d 100644 --- a/src/Servers/Kestrel/perf/Microbenchmarks/Http2/HPackHeaderWriterBenchmark.cs +++ b/src/Servers/Kestrel/perf/Microbenchmarks/Http2/HPackHeaderWriterBenchmark.cs @@ -1,16 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Linq; using System.Net.Http.HPack; using System.Text; -using System.Threading.Tasks; using BenchmarkDotNet.Attributes; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; -using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks; diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs index 9fe40252d54f..03589ed07b77 100644 --- a/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs +++ b/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs @@ -44,11 +44,26 @@ public void GlobalSetup() "TestConnectionId", _memoryPool, serviceContext); + } + + private int _largeHeaderSize; - _responseHeaders = new HttpResponseHeaders(); - var headers = (IHeaderDictionary)_responseHeaders; - headers.ContentType = "application/json"; - headers.ContentLength = 1024; + [Params(0, 10, 20)] + public int LargeHeaderSize + { + get => _largeHeaderSize; + set + { + _largeHeaderSize = value; + _responseHeaders = new HttpResponseHeaders(); + var headers = (IHeaderDictionary)_responseHeaders; + headers.ContentType = "application/json"; + headers.ContentLength = 1024; + if (value > 0) + { + headers.Add("my", new string('a', value * 1024)); + } + } } [Benchmark] diff --git a/src/Servers/Kestrel/shared/HPackHeaderWriter.cs b/src/Servers/Kestrel/shared/HPackHeaderWriter.cs index 22cf2256cd53..454346e86c70 100644 --- a/src/Servers/Kestrel/shared/HPackHeaderWriter.cs +++ b/src/Servers/Kestrel/shared/HPackHeaderWriter.cs @@ -10,6 +10,18 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests; #endif +internal enum HeaderWriteResult : byte +{ + // Not all headers written. + MoreHeaders = 0, + + // All headers written. + Done = 1, + + // Oversized header for the given buffer. + BufferTooSmall = 2, +} + // This file is used by Kestrel to write response headers and tests to write request headers. // To avoid adding test code to Kestrel this file is shared. Test specifc code is excluded from Kestrel by ifdefs. internal static class HPackHeaderWriter @@ -17,7 +29,7 @@ internal static class HPackHeaderWriter /// /// Begin encoding headers in the first HEADERS frame. /// - public static bool BeginEncodeHeaders(int statusCode, DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) + public static HeaderWriteResult BeginEncodeHeaders(int statusCode, DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) { length = 0; @@ -35,12 +47,12 @@ public static bool BeginEncodeHeaders(int statusCode, DynamicHPackEncoder hpackE if (!headersEnumerator.MoveNext()) { - return true; + return HeaderWriteResult.Done; } - // We're ok with not throwing if no headers were encoded because we've already encoded the status. + // Since we've already encoded the status, we know we didn't start with an empty buffer. We don't need to increase it immediately because // There is a small chance that the header will encode if there is no other content in the next HEADERS frame. - var done = EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer.Slice(length), throwIfNoneEncoded: false, out var headersLength); + var done = EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer.Slice(length), canRequestLargerBuffer: false, out var headersLength); length += headersLength; return done; } @@ -48,7 +60,19 @@ public static bool BeginEncodeHeaders(int statusCode, DynamicHPackEncoder hpackE /// /// Begin encoding headers in the first HEADERS frame. /// - public static bool BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) + public static HeaderWriteResult BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) => + BeginEncodeHeaders(hpackEncoder, headersEnumerator, buffer, iterateBeforeFirstElement: true, out length); + + /// + /// Begin encoding headers in the first HEADERS frame without stepping the iterator. + /// + public static HeaderWriteResult RetryBeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) => + BeginEncodeHeaders(hpackEncoder, headersEnumerator, buffer, iterateBeforeFirstElement: false, out length); + + /// + /// Begin encoding headers in the first HEADERS frame. + /// + private static HeaderWriteResult BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, bool iterateBeforeFirstElement, out int length) { length = 0; @@ -58,12 +82,12 @@ public static bool BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2Hea } length += sizeUpdateLength; - if (!headersEnumerator.MoveNext()) + if (iterateBeforeFirstElement && !headersEnumerator.MoveNext()) { - return true; + return HeaderWriteResult.Done; } - var done = EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer.Slice(length), throwIfNoneEncoded: true, out var headersLength); + var done = EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer.Slice(length), canRequestLargerBuffer: true, out var headersLength); length += headersLength; return done; } @@ -71,9 +95,9 @@ public static bool BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2Hea /// /// Continue encoding headers in the next HEADERS frame. The enumerator should already have a current value. /// - public static bool ContinueEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) + public static HeaderWriteResult ContinueEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, out int length) { - return EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer, throwIfNoneEncoded: true, out length); + return EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer, canRequestLargerBuffer: true, out length); } private static bool EncodeStatusHeader(int statusCode, DynamicHPackEncoder hpackEncoder, Span buffer, out int length) @@ -91,7 +115,7 @@ private static bool EncodeStatusHeader(int statusCode, DynamicHPackEncoder hpack } } - private static bool EncodeHeadersCore(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, bool throwIfNoneEncoded, out int length) + private static HeaderWriteResult EncodeHeadersCore(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span buffer, bool canRequestLargerBuffer, out int length) { var currentLength = 0; do @@ -115,22 +139,21 @@ private static bool EncodeHeadersCore(DynamicHPackEncoder hpackEncoder, Http2Hea out var headerLength)) { // If the header wasn't written, and no headers have been written, then the header is too large. - // Throw an error to avoid an infinite loop of attempting to write large header. - if (currentLength == 0 && throwIfNoneEncoded) + // Request for a larger buffer to write large header. + if (currentLength == 0 && canRequestLargerBuffer) { - throw new HPackEncodingException(SR.net_http_hpack_encode_failure); + length = 0; + return HeaderWriteResult.BufferTooSmall; } - length = currentLength; - return false; + return HeaderWriteResult.MoreHeaders; } currentLength += headerLength; } while (headersEnumerator.MoveNext()); - length = currentLength; - return true; + return HeaderWriteResult.Done; } private static HeaderEncodingHint ResolveHeaderEncodingHint(int staticTableId, string name) diff --git a/src/Servers/Kestrel/shared/test/PipeWriterHttp2FrameExtensions.cs b/src/Servers/Kestrel/shared/test/PipeWriterHttp2FrameExtensions.cs index 84ead387bc89..4480a06271a4 100644 --- a/src/Servers/Kestrel/shared/test/PipeWriterHttp2FrameExtensions.cs +++ b/src/Servers/Kestrel/shared/test/PipeWriterHttp2FrameExtensions.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Http2HeadersEnumerator = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http2HeadersEnumerator; using HPackHeaderWriter = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.HPackHeaderWriter; +using HeaderWriteResult = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.HeaderWriteResult; namespace Microsoft.AspNetCore.InternalTesting; @@ -36,7 +37,7 @@ public static void WriteStartStream(this PipeWriter writer, int streamId, Dynami var done = HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, headers, buffer, out var length); frame.PayloadLength = length; - if (done) + if (done == HeaderWriteResult.Done) { frame.HeadersFlags = Http2HeadersFrameFlags.END_HEADERS; } @@ -49,14 +50,14 @@ public static void WriteStartStream(this PipeWriter writer, int streamId, Dynami Http2FrameWriter.WriteHeader(frame, writer); writer.Write(buffer.Slice(0, length)); - while (!done) + while (done != HeaderWriteResult.Done) { frame.PrepareContinuation(Http2ContinuationFrameFlags.NONE, streamId); done = HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headers, buffer, out length); frame.PayloadLength = length; - if (done) + if (done == HeaderWriteResult.Done) { frame.ContinuationFlags = Http2ContinuationFrameFlags.END_HEADERS; } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs index 1e5fb54fa0de..8628af4117d9 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs @@ -1,27 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Buffers; -using System.Collections.Generic; using System.Globalization; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Net.Http.HPack; using System.Runtime.ExceptionServices; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Server.Kestrel.Core.Features; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; -using Xunit; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests; @@ -2593,17 +2584,18 @@ await ExpectAsync(Http2FrameType.DATA, } [Fact] - public async Task ResponseTrailers_TooLong_Throws() + public async Task ResponseTrailers_SingleLong_SplitsTrailersToContinuationFrames() { + var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); await InitializeConnectionAsync(async context => { await context.Response.WriteAsync("Hello World"); - context.Response.AppendTrailer("too_long", new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize)); + context.Response.AppendTrailer("too_long", trailerValue); }); await StartStreamAsync(1, _browserRequestHeaders, endStream: true); - var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + await ExpectAsync(Http2FrameType.HEADERS, withLength: 32, withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, withStreamId: 1); @@ -2613,18 +2605,361 @@ await ExpectAsync(Http2FrameType.DATA, withFlags: (byte)Http2DataFrameFlags.NONE, withStreamId: 1); - var goAway = await ExpectAsync(Http2FrameType.GOAWAY, - withLength: 8, + var trailerFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 1); + + var trailierContinuation = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 13, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false).DefaultTimeout(); + + var buffer = new byte[trailerFrame.PayloadLength + trailierContinuation.PayloadLength]; + trailerFrame.PayloadSequence.CopyTo(buffer); + trailierContinuation.PayloadSequence.CopyTo(buffer.AsSpan(trailerFrame.PayloadLength)); + _hpackDecoder.Decode(buffer, endHeaders: true, handler: this); + Assert.Single(_decodedHeaders); + Assert.Equal(trailerValue, _decodedHeaders["too_long"]); + } + + [Fact] + public async Task ResponseTrailers_ShortHeadersBeforeSingleLong_MultipleRequests_ShortHeadersInDynamicTable() + { + var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + await InitializeConnectionAsync(async context => + { + await context.Response.WriteAsync("Hello World"); + context.Response.AppendTrailer("a-key", "a-value"); + context.Response.AppendTrailer("b-key", "b-value"); + context.Response.AppendTrailer("too_long", trailerValue); + }); + + // Request 1 + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await ExpectAsync(Http2FrameType.DATA, + withLength: 11, withFlags: (byte)Http2DataFrameFlags.NONE, - withStreamId: 0); + withStreamId: 1); + + var request1TrailerFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 30, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 1); + + var request1TrailierContinuation1 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + + var request1TrailierContinuation2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 13, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + _hpackDecoder.Decode(request1TrailerFrame.PayloadSequence, endHeaders: false, handler: this); + Assert.Equal("a-value", _decodedHeaders["a-key"]); + Assert.Equal("b-value", _decodedHeaders["b-key"]); + + _decodedHeaders.Clear(); + _hpackDecoder.Decode(request1TrailierContinuation1.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + _hpackDecoder.Decode(request1TrailierContinuation2.PayloadSequence, endHeaders: true, handler: this); + Assert.Equal(trailerValue, _decodedHeaders["too_long"]); + + // Request 2 + await StartStreamAsync(3, _browserRequestHeaders, endStream: true); + + await ExpectAsync(Http2FrameType.HEADERS, + withLength: 2, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 3); + + await ExpectAsync(Http2FrameType.DATA, + withLength: 11, + withFlags: (byte)Http2DataFrameFlags.NONE, + withStreamId: 3); + + var request2TrailerFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 2, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 3); + + var request2TrailierContinuation1 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 3); + + var request2TrailierContinuation2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 13, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 3); + + _hpackDecoder.Decode(request2TrailerFrame.PayloadSequence, endHeaders: false, handler: this); + Assert.Equal("a-value", _decodedHeaders["a-key"]); + Assert.Equal("b-value", _decodedHeaders["b-key"]); + + _decodedHeaders.Clear(); + _hpackDecoder.Decode(request2TrailierContinuation1.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + _hpackDecoder.Decode(request2TrailierContinuation2.PayloadSequence, endHeaders: true, handler: this); + Assert.Equal(trailerValue, _decodedHeaders["too_long"]); + + await StopConnectionAsync(expectedLastStreamId: 3, ignoreNonGoAwayFrames: false).DefaultTimeout(); + } + + [Fact] + public async Task ResponseTrailers_DoubleLong_SplitsTrailersToContinuationFrames() + { + var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + await InitializeConnectionAsync(async context => + { + await context.Response.WriteAsync("Hello World"); + context.Response.AppendTrailer("too_long", trailerValue); + context.Response.AppendTrailer("too_long2", trailerValue); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await ExpectAsync(Http2FrameType.DATA, + withLength: 11, + withFlags: (byte)Http2DataFrameFlags.NONE, + withStreamId: 1); + + var frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 13, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Equal(trailerValue, _decodedHeaders["too_long"]); + _decodedHeaders.Clear(); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 14, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: true, handler: this); + Assert.Equal(trailerValue, _decodedHeaders["too_long2"]); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false).DefaultTimeout(); + } + + [Fact] + public async Task ResponseTrailers_ShortThenLongThenShort_SplitsTrailers() + { + var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + string shortValue = "testValue"; + await InitializeConnectionAsync(async context => + { + await context.Response.WriteAsync("Hello World"); + context.Response.AppendTrailer("short", shortValue); + context.Response.AppendTrailer("long", trailerValue); + context.Response.AppendTrailer("short2", shortValue); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await ExpectAsync(Http2FrameType.DATA, + withLength: 11, + withFlags: (byte)Http2DataFrameFlags.NONE, + withStreamId: 1); + + var trailerFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 17, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 1); + + _hpackDecoder.Decode(trailerFrame.PayloadSequence, endHeaders: false, handler: this); + Assert.Single(_decodedHeaders); + Assert.Equal(shortValue, _decodedHeaders["short"]); + _decodedHeaders.Clear(); + + var trailierContinuation1 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + + _hpackDecoder.Decode(trailierContinuation1.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + var trailierContinuation2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 27, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + _hpackDecoder.Decode(trailierContinuation2.PayloadSequence, endHeaders: true, handler: this); + Assert.Equal(trailerValue, _decodedHeaders["long"]); + Assert.Equal(shortValue, _decodedHeaders["short2"]); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false).DefaultTimeout(); + } + + [Fact] + public async Task LongResponseHeader_FollowedBy_LongResponseTrailer_SplitsTrailersToContinuationFrames() + { + var value = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + await InitializeConnectionAsync(async context => + { + context.Response.Headers["too_long_header"] = value; + await context.Response.WriteAsync("Hello World"); + context.Response.AppendTrailer("too_long_trailer", value); + }); + + // Stream 1 + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + // Response headers + var frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Equal(2, _decodedHeaders.Count); + Assert.Equal("200", _decodedHeaders[":status"]); + Assert.Equal("Sat, 01 Jan 2000 00:00:00 GMT", _decodedHeaders["date"]); + _decodedHeaders.Clear(); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 20, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: true, handler: this); + Assert.Single(_decodedHeaders); + Assert.Equal(value, _decodedHeaders["too_long_header"]); + _decodedHeaders.Clear(); + + // Data + await ExpectAsync(Http2FrameType.DATA, + withLength: 11, + withFlags: (byte)Http2DataFrameFlags.NONE, + withStreamId: 1); + + // Trailers + frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 1); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 21, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); - VerifyGoAway(goAway, int.MaxValue, Http2ErrorCode.INTERNAL_ERROR); + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: true, handler: this); + Assert.Single(_decodedHeaders); + Assert.Equal(value, _decodedHeaders["too_long_trailer"]); + _decodedHeaders.Clear(); - _pair.Application.Output.Complete(); - await _connectionTask; + // Stream 3 + await StartStreamAsync(3, _browserRequestHeaders, endStream: true); - var message = Assert.Single(LogMessages, m => m.Exception is HPackEncodingException); - Assert.Contains(SR.net_http_hpack_encode_failure, message.Exception.Message); + // Response headers + frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 2, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 3); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Equal(2, _decodedHeaders.Count); + Assert.Equal("200", _decodedHeaders[":status"]); + Assert.Equal("Sat, 01 Jan 2000 00:00:00 GMT", _decodedHeaders["date"]); + _decodedHeaders.Clear(); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 3); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 20, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 3); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: true, handler: this); + Assert.Single(_decodedHeaders); + Assert.Equal(value, _decodedHeaders["too_long_header"]); + _decodedHeaders.Clear(); + + // Data + await ExpectAsync(Http2FrameType.DATA, + withLength: 11, + withFlags: (byte)Http2DataFrameFlags.NONE, + withStreamId: 3); + + // Trailers + frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.END_STREAM, + withStreamId: 3); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: false, handler: this); + Assert.Empty(_decodedHeaders); + + frame = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 21, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 3); + + _hpackDecoder.Decode(frame.PayloadSequence, endHeaders: true, handler: this); + Assert.Single(_decodedHeaders); + Assert.Equal(value, _decodedHeaders["too_long_trailer"]); + _decodedHeaders.Clear(); + + await StopConnectionAsync(expectedLastStreamId: 3, ignoreNonGoAwayFrames: false).DefaultTimeout(); } [Fact] @@ -3183,13 +3518,237 @@ await ExpectAsync(Http2FrameType.DATA, } [Fact] - public async Task ResponseWithHeadersTooLarge_AbortsConnection() + public async Task ResponseWithHeaderValueTooLarge_SplitsHeaderToContinuationFrames() { - var appFinished = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await InitializeConnectionAsync(async context => + { + context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + await context.Response.WriteAsync("Hello World"); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + // Just the StatusCode gets written before aborting in the continuation frame + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame3 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 5, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); + + var temp = new byte[headersFrame.PayloadSequence.Length + headersFrame2.PayloadSequence.Length + headersFrame3.PayloadSequence.Length]; + headersFrame.PayloadSequence.CopyTo(temp.AsSpan()); + headersFrame2.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length)); + headersFrame3.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length + (int)headersFrame2.PayloadSequence.Length)); + + _hpackDecoder.Decode(temp, endHeaders: true, handler: this); + Assert.Equal((int)Http2PeerSettings.DefaultMaxFrameSize, _decodedHeaders[HeaderNames.ETag].Length); + } + + [Fact] + public async Task TooLargeHeaderFollowedByContinuationHeaders_Split() + { await InitializeConnectionAsync(async context => { - context.Response.Headers["too_long"] = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + context.Response.Headers.TE = new string('a', 30); + await context.Response.WriteAsync("Hello World"); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + // Just the StatusCode gets written before aborting in the continuation frame + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame3 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 40, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); + + var temp = new byte[headersFrame.PayloadSequence.Length + headersFrame2.PayloadSequence.Length + headersFrame3.PayloadSequence.Length]; + headersFrame.PayloadSequence.CopyTo(temp.AsSpan()); + headersFrame2.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length)); + headersFrame3.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length + (int)headersFrame2.PayloadSequence.Length)); + + _hpackDecoder.Decode(temp, endHeaders: true, handler: this); + Assert.Equal((int)Http2PeerSettings.DefaultMaxFrameSize, _decodedHeaders[HeaderNames.ETag].Length); + Assert.Equal(30, _decodedHeaders[HeaderNames.TE].Length); + } + + [Fact] + public async Task TwoTooLargeHeaderFollowedByContinuationHeaders_Split() + { + await InitializeConnectionAsync(async context => + { + context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + context.Response.Headers.TE = new string('b', (int)Http2PeerSettings.DefaultMaxFrameSize); + await context.Response.WriteAsync("Hello World"); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + var frames = new Http2FrameWithPayload[5]; + frames[0] = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + frames[1] = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + frames[2] = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 5, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + frames[3] = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + frames[4] = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 7, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); + + var totalSize = frames.Sum(x => x.PayloadSequence.Length); + var temp = new byte[totalSize]; + var destinationIndex = 0; + for (var i = 0; i < frames.Length; i++) + { + frames[i].PayloadSequence.CopyTo(temp.AsSpan(destinationIndex)); + destinationIndex += (int)frames[i].PayloadSequence.Length; + } + _hpackDecoder.Decode(temp, endHeaders: true, handler: this); + Assert.Equal((int)Http2PeerSettings.DefaultMaxFrameSize, _decodedHeaders[HeaderNames.ETag].Length); + Assert.Equal((int)Http2PeerSettings.DefaultMaxFrameSize, _decodedHeaders[HeaderNames.TE].Length); + } + + [Fact] + public async Task ClientRequestedLargerFrame_HeadersSplitByRequestedSize() + { + _clientSettings.MaxFrameSize = 17000; + _serviceContext.ServerOptions.Limits.Http2.MaxFrameSize = 17001; + await InitializeConnectionAsync(async context => + { + context.Response.Headers.ETag = new string('a', 17002); + await context.Response.WriteAsync("Hello World"); + }, expectedSettingsCount: 5); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + // Just the StatusCode gets written before aborting in the continuation frame + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame1 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 17000, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 8, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); + } + + [Fact] + public async Task ResponseWithMultipleHeaderValueTooLargeForFrame_SplitsHeaderToContinuationFrames() + { + await InitializeConnectionAsync(async context => + { + // This size makes it fit to a single header, but not next to the response status etc. + context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize - 20); + await context.Response.WriteAsync("Hello World"); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + // Just the StatusCode gets written before aborting in the continuation frame + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16369, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); + + var temp = new byte[headersFrame.PayloadSequence.Length + headersFrame2.PayloadSequence.Length]; + headersFrame.PayloadSequence.CopyTo(temp.AsSpan()); + headersFrame2.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length)); + + _hpackDecoder.Decode(temp, endHeaders: true, handler: this); + Assert.Equal((int)Http2PeerSettings.DefaultMaxFrameSize - 20, _decodedHeaders[HeaderNames.ETag].Length); + } + + [Fact] + public async Task ResponseWithHeaderNameTooLarge_SplitsHeaderToContinuationFrames() + { + var longHeaderName = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); + var headerValue = "some value"; + await InitializeConnectionAsync(async context => + { + context.Response.Headers[longHeaderName] = headerValue; + await context.Response.WriteAsync("Hello World"); + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + // Just the StatusCode gets written before aborting in the continuation frame + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame2 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + var headersFrame3 = await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 15, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); + + var temp = new byte[headersFrame.PayloadSequence.Length + headersFrame2.PayloadSequence.Length + headersFrame3.PayloadSequence.Length]; + headersFrame.PayloadSequence.CopyTo(temp.AsSpan()); + headersFrame2.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length)); + headersFrame3.PayloadSequence.CopyTo(temp.AsSpan((int)headersFrame.PayloadSequence.Length + (int)headersFrame2.PayloadSequence.Length)); + + _hpackDecoder.Decode(temp, endHeaders: true, handler: this); + Assert.Equal(headerValue, _decodedHeaders[longHeaderName]); + } + + [Fact] + public async Task ResponseHeader_OneMegaByte_SplitsHeaderToContinuationFrames() + { + int frameSize = (int)Http2PeerSettings.DefaultMaxFrameSize; + int count = 64; + var headerValue = new string('a', frameSize * count); // 1 MB value + await InitializeConnectionAsync(async context => + { + context.Response.Headers["my"] = headerValue; await context.Response.WriteAsync("Hello World"); }); @@ -3200,11 +3759,21 @@ await ExpectAsync(Http2FrameType.HEADERS, withLength: 32, withFlags: (byte)Http2HeadersFrameFlags.NONE, withStreamId: 1); + for (int i = 0; i < count; i++) + { + await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 16384, + withFlags: (byte)Http2HeadersFrameFlags.NONE, + withStreamId: 1); + } - _pair.Application.Output.Complete(); + // One more frame because of the header name + size of header value + size header name + 2 * H encoding + await ExpectAsync(Http2FrameType.CONTINUATION, + withLength: 8, + withFlags: (byte)Http2HeadersFrameFlags.END_HEADERS, + withStreamId: 1); - await WaitForConnectionErrorAsync(ignoreNonGoAwayFrames: false, expectedLastStreamId: int.MaxValue, Http2ErrorCode.INTERNAL_ERROR, - SR.net_http_hpack_encode_failure); + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: true); } [Fact] diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs index 70f47cf2e62b..c334ee588dab 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs @@ -14,12 +14,12 @@ using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Server.Kestrel.Core.Features; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Time.Testing; @@ -849,7 +849,7 @@ internal async Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags Http2FrameWriter.WriteHeader(frame, outputWriter); await SendAsync(buffer.Span.Slice(0, length)); - return done; + return done == HeaderWriteResult.Done; } internal Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable> headers) @@ -919,7 +919,7 @@ internal async Task SendContinuationAsync(int streamId, Http2ContinuationF Http2FrameWriter.WriteHeader(frame, outputWriter); await SendAsync(buffer.Span.Slice(0, length)); - return done; + return done == HeaderWriteResult.Done; } internal async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, byte[] payload) @@ -947,7 +947,7 @@ internal async Task SendContinuationAsync(int streamId, Http2ContinuationF Http2FrameWriter.WriteHeader(frame, outputWriter); await SendAsync(buffer.Span.Slice(0, length)); - return done; + return done == HeaderWriteResult.Done; } internal Http2HeadersEnumerator GetHeadersEnumerator(IEnumerable> headers) diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/Http2/Http2RequestTests.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/Http2/Http2RequestTests.cs index 2d58d859b81b..86af821432b6 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/Http2/Http2RequestTests.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/Http2/Http2RequestTests.cs @@ -89,6 +89,46 @@ public async Task GET_Metrics_HttpProtocolAndTlsSet() } } + [Theory] + [InlineData(true, true)] + [InlineData(true, false)] + [InlineData(false, true)] + public async Task GET_LargeResponseHeader_Success(bool largeValue, bool largeKey) + { + // Arrange + var longKey = "key-" + new string('$', largeKey ? 128 * 1024 : 1); + var longValue = "value-" + new string('!', largeValue ? 128 * 1024 : 1); + var builder = CreateHostBuilder( + c => + { + c.Response.Headers["test"] = "abc"; + c.Response.Headers[longKey] = longValue; + return Task.CompletedTask; + }, + protocol: HttpProtocols.Http2, + plaintext: true); + + using (var host = builder.Build()) + { + await host.StartAsync(); + var client = HttpHelpers.CreateClient(maxResponseHeadersLength: 1024); + + // Act + var request1 = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1:{host.GetPort()}/"); + request1.Version = HttpVersion.Version20; + request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; + + var response = await client.SendAsync(request1, CancellationToken.None); + response.EnsureSuccessStatusCode(); + + // Assert + Assert.Equal("abc", response.Headers.GetValues("test").Single()); + Assert.Equal(longValue, response.Headers.GetValues(longKey).Single()); + + await host.StopAsync(); + } + } + [Fact] public async Task GET_NoTLS_Http11RequestToHttp2Endpoint_400Result() { diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpHelpers.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpHelpers.cs index cc6f7bacb4f2..92bb131c4ed4 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpHelpers.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpHelpers.cs @@ -35,7 +35,7 @@ public static HttpProtocolException GetProtocolException(this Exception ex) throw new Exception($"Couldn't find {nameof(HttpProtocolException)}. Original error: {ex}"); } - public static HttpMessageInvoker CreateClient(TimeSpan? idleTimeout = null, TimeSpan? expect100ContinueTimeout = null, bool includeClientCert = false) + public static HttpMessageInvoker CreateClient(TimeSpan? idleTimeout = null, TimeSpan? expect100ContinueTimeout = null, bool includeClientCert = false, int? maxResponseHeadersLength = null) { var handler = new SocketsHttpHandler(); handler.SslOptions = new System.Net.Security.SslClientAuthenticationOptions @@ -55,6 +55,11 @@ public static HttpMessageInvoker CreateClient(TimeSpan? idleTimeout = null, Time handler.PooledConnectionIdleTimeout = idleTimeout.Value; } + if (maxResponseHeadersLength != null) + { + handler.MaxResponseHeadersLength = maxResponseHeadersLength.Value; + } + return new HttpMessageInvoker(handler); } From f36ba3968d6d8939cff608b7f81f8710e5d2ad0c Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Thu, 6 Jun 2024 17:05:16 +0100 Subject: [PATCH 018/257] Pass through CancellationToken when writing OpenAPI response (#56096) --- .../src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs index 7bae09542251..b118422a29e2 100644 --- a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs @@ -50,8 +50,8 @@ public static IEndpointConventionBuilder MapOpenApi(this IEndpointRouteBuilder e try { document.Serialize(new OpenApiJsonWriter(writer), documentOptions.OpenApiVersion); - await context.Response.BodyWriter.WriteAsync(output.ToArray()); - await context.Response.BodyWriter.FlushAsync(); + await context.Response.BodyWriter.WriteAsync(output.ToArray(), context.RequestAborted); + await context.Response.BodyWriter.FlushAsync(context.RequestAborted); } finally { From f91c99bab682d752bab8e206d6bd08e135b16575 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Thu, 6 Jun 2024 11:15:38 -0700 Subject: [PATCH 019/257] Set content type for OpenAPI JSON document (#56097) --- .../src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs index b118422a29e2..ee105edddf6b 100644 --- a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs @@ -50,6 +50,7 @@ public static IEndpointConventionBuilder MapOpenApi(this IEndpointRouteBuilder e try { document.Serialize(new OpenApiJsonWriter(writer), documentOptions.OpenApiVersion); + context.Response.ContentType = "application/json;charset=utf-8"; await context.Response.BodyWriter.WriteAsync(output.ToArray(), context.RequestAborted); await context.Response.BodyWriter.FlushAsync(context.RequestAborted); } From 10517269f40d53eb22cce6b4d520ed27ed1e1b9f Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 6 Jun 2024 15:52:09 -0700 Subject: [PATCH 020/257] Remove references to obsolete storage account variables (#56100) --- .azure/pipelines/blazor-daily-tests.yml | 1 - .azure/pipelines/signalr-daily-tests.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.azure/pipelines/blazor-daily-tests.yml b/.azure/pipelines/blazor-daily-tests.yml index e044d000cf76..f91c27c21149 100644 --- a/.azure/pipelines/blazor-daily-tests.yml +++ b/.azure/pipelines/blazor-daily-tests.yml @@ -7,7 +7,6 @@ # We just need one Windows machine because all it does is trigger SauceLabs. variables: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - group: DotNet-MSRC-Storage - group: AzureDevOps-Artifact-Feeds-Pats - name: SAUCE_CONNECT_DOWNLOAD_ON_INSTALL value: true diff --git a/.azure/pipelines/signalr-daily-tests.yml b/.azure/pipelines/signalr-daily-tests.yml index e9df31d97df4..85a88a460790 100644 --- a/.azure/pipelines/signalr-daily-tests.yml +++ b/.azure/pipelines/signalr-daily-tests.yml @@ -6,7 +6,6 @@ variables: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - group: DotNet-MSRC-Storage - group: AzureDevOps-Artifact-Feeds-Pats - template: /eng/common/templates-official/variables/pool-providers.yml@self From 1ed83e94ba6d3739035fda40f539545a9fceacc3 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Thu, 6 Jun 2024 20:04:33 -0700 Subject: [PATCH 021/257] Retry CanSendAndReceiveUserMessagesFromMultipleConnectionsWithSameUser (#55955) For #55954 --- eng/test-configuration.json | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/test-configuration.json b/eng/test-configuration.json index 9a395470461b..9d6e364c30d1 100644 --- a/eng/test-configuration.json +++ b/eng/test-configuration.json @@ -11,6 +11,7 @@ {"testName": {"contains": "POST_ServerAbort_ClientReceivesAbort"}}, {"testName": {"contains": "CanLaunchPhotinoWebViewAndClickButton"}}, {"testName": {"contains": "CheckInvalidHostingModelParameter"}}, + {"testName": {"contains": "CanSendAndReceiveUserMessagesFromMultipleConnectionsWithSameUser"}}, {"testAssembly": {"contains": "IIS"}}, {"testAssembly": {"contains": "Template"}}, {"failureMessage": {"contains":"(Site is started but no worker process found)"}}, From f4c10ec0e17afee46729326e58af9cb235e4caf6 Mon Sep 17 00:00:00 2001 From: Paulo Morgado <470455+paulomorgado@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:06:43 +0100 Subject: [PATCH 022/257] Remove dot that is added to URL (#56075) The dot is added to the URL: And, when clicked, navigates to a non-existing URL. As a side fix, `aspnet/https-trust-dev-cert.` should be added to `https://aka.ms/`. --- src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs b/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs index baa0c085d0a1..35d5505ebe8b 100644 --- a/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs @@ -38,6 +38,6 @@ internal static partial class LoggerExtensions [LoggerMessage(7, LogLevel.Error, "The certificate key file at '{CertificateKeyFilePath}' can not be found, contains malformed data or does not contain a PEM encoded key in PKCS8 format.", EventName = "MissingOrInvalidCertificateKeyFile")] public static partial void FailedToLoadCertificateKey(this ILogger logger, string certificateKeyFilePath); - [LoggerMessage(8, LogLevel.Warning, "The ASP.NET Core developer certificate is not trusted. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert.", EventName = "DeveloperCertificateNotTrusted")] + [LoggerMessage(8, LogLevel.Warning, "The ASP.NET Core developer certificate is not trusted. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert", EventName = "DeveloperCertificateNotTrusted")] public static partial void DeveloperCertificateNotTrusted(this ILogger logger); } From b7738d273b5260b8f028b332a050b74d724ad0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Fri, 7 Jun 2024 11:58:59 -0700 Subject: [PATCH 023/257] Update sdk daily builds table url (#56085) --- docs/DailyBuilds.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DailyBuilds.md b/docs/DailyBuilds.md index 3e6314157fd2..09121497f18b 100644 --- a/docs/DailyBuilds.md +++ b/docs/DailyBuilds.md @@ -4,7 +4,7 @@ Daily builds include the latest source code changes. They are not supported for If you want to download the latest daily build and use it in a project, then you need to: -* Obtain the latest [build of the .NET Core SDK](https://github.com/dotnet/installer#table). +* Obtain the latest [build of the .NET Core SDK](https://github.com/dotnet/sdk/blob/main/documentation/package-table.md). * Add a NuGet.Config to your project directory with the following content: ## .NET 8 From 65f0f6720ab3275a31b96e7e8e7218fadaff444f Mon Sep 17 00:00:00 2001 From: Hamidreza Hematyar Date: Sat, 8 Jun 2024 02:38:13 +0330 Subject: [PATCH 024/257] Use constant values for CorsPolicy.cs and CorsPolicyBuilder.cs (#54247) --- .../CORS/src/Infrastructure/CorsConstants.cs | 10 +++++++ .../CORS/src/Infrastructure/CorsPolicy.cs | 6 ++--- .../src/Infrastructure/CorsPolicyBuilder.cs | 4 +-- .../CORS/src/PublicAPI.Unshipped.txt | 2 ++ .../CORS/test/UnitTests/CorsServiceTests.cs | 26 +++++++++---------- 5 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/Middleware/CORS/src/Infrastructure/CorsConstants.cs b/src/Middleware/CORS/src/Infrastructure/CorsConstants.cs index f4110b10de1f..c2debd17fdce 100644 --- a/src/Middleware/CORS/src/Infrastructure/CorsConstants.cs +++ b/src/Middleware/CORS/src/Infrastructure/CorsConstants.cs @@ -26,6 +26,16 @@ public static class CorsConstants /// public static readonly string AnyOrigin = "*"; + /// + /// The value for the Access-Control-Allow-Headers response header to allow all headers. + /// + public static readonly string AnyHeader = "*"; + + /// + /// The value for the Access-Control-Allow-Methods response header to allow all methods. + /// + public static readonly string AnyMethod = "*"; + /// /// The Access-Control-Request-Method request header. /// diff --git a/src/Middleware/CORS/src/Infrastructure/CorsPolicy.cs b/src/Middleware/CORS/src/Infrastructure/CorsPolicy.cs index b79d8ad26597..eff658d6b402 100644 --- a/src/Middleware/CORS/src/Infrastructure/CorsPolicy.cs +++ b/src/Middleware/CORS/src/Infrastructure/CorsPolicy.cs @@ -30,7 +30,7 @@ public bool AllowAnyHeader { get { - if (Headers == null || Headers.Count != 1 || Headers[0] != "*") + if (Headers == null || Headers.Count != 1 || Headers[0] != CorsConstants.AnyHeader) { return false; } @@ -46,7 +46,7 @@ public bool AllowAnyMethod { get { - if (Methods == null || Methods.Count != 1 || Methods[0] != "*") + if (Methods == null || Methods.Count != 1 || Methods[0] != CorsConstants.AnyMethod) { return false; } @@ -62,7 +62,7 @@ public bool AllowAnyOrigin { get { - if (Origins == null || Origins.Count != 1 || Origins[0] != "*") + if (Origins == null || Origins.Count != 1 || Origins[0] != CorsConstants.AnyOrigin) { return false; } diff --git a/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs b/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs index 878a36534d96..36e75ff5e5bc 100644 --- a/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs +++ b/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs @@ -171,7 +171,7 @@ public CorsPolicyBuilder AllowAnyOrigin() public CorsPolicyBuilder AllowAnyMethod() { _policy.Methods.Clear(); - _policy.Methods.Add("*"); + _policy.Methods.Add(CorsConstants.AnyMethod); return this; } @@ -182,7 +182,7 @@ public CorsPolicyBuilder AllowAnyMethod() public CorsPolicyBuilder AllowAnyHeader() { _policy.Headers.Clear(); - _policy.Headers.Add("*"); + _policy.Headers.Add(CorsConstants.AnyHeader); return this; } diff --git a/src/Middleware/CORS/src/PublicAPI.Unshipped.txt b/src/Middleware/CORS/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..91f8b182bd09 100644 --- a/src/Middleware/CORS/src/PublicAPI.Unshipped.txt +++ b/src/Middleware/CORS/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyHeader -> string! +static readonly Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants.AnyMethod -> string! diff --git a/src/Middleware/CORS/test/UnitTests/CorsServiceTests.cs b/src/Middleware/CORS/test/UnitTests/CorsServiceTests.cs index 345a172a7951..aa01b159a3b6 100644 --- a/src/Middleware/CORS/test/UnitTests/CorsServiceTests.cs +++ b/src/Middleware/CORS/test/UnitTests/CorsServiceTests.cs @@ -339,7 +339,7 @@ public void EvaluatePolicy_CaseInsensitivePreflightRequest_OriginAllowed_Returns var policy = new CorsPolicy(); policy.Origins.Add(CorsConstants.AnyOrigin); policy.Origins.Add("http://example.com"); - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -361,7 +361,7 @@ public void EvaluatePolicy_PreflightRequest_IsOriginAllowedReturnsTrue_ReturnsOr { IsOriginAllowed = origin => true }; - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -381,7 +381,7 @@ public void EvaluatePolicy_PreflightRequest_SupportsCredentials_AllowCredentials SupportsCredentials = true }; policy.Origins.Add("http://example.com"); - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -401,7 +401,7 @@ public void EvaluatePolicy_PreflightRequest_NoPreflightMaxAge_NoPreflightMaxAgeS PreflightMaxAge = null }; policy.Origins.Add(CorsConstants.AnyOrigin); - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -421,7 +421,7 @@ public void EvaluatePolicy_PreflightRequest_PreflightMaxAge_PreflightMaxAgeSet() PreflightMaxAge = TimeSpan.FromSeconds(10) }; policy.Origins.Add(CorsConstants.AnyOrigin); - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -438,7 +438,7 @@ public void EvaluatePolicy_PreflightRequest_AnyMethod_ReturnsRequestMethod() var requestContext = GetHttpContext(method: "OPTIONS", origin: "http://example.com", accessControlRequestMethod: "GET"); var policy = new CorsPolicy(); policy.Origins.Add(CorsConstants.AnyOrigin); - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -478,8 +478,8 @@ public void EvaluatePolicy_PreflightRequest_NoHeadersRequested_AllowedAllHeaders var requestContext = GetHttpContext(method: "OPTIONS", origin: "http://example.com", accessControlRequestMethod: "PUT"); var policy = new CorsPolicy(); policy.Origins.Add(CorsConstants.AnyOrigin); - policy.Methods.Add("*"); - policy.Headers.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); + policy.Headers.Add(CorsConstants.AnyHeader); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -501,8 +501,8 @@ public void EvaluatePolicy_PreflightRequest_AllowAllHeaders_ReflectsRequestHeade accessControlRequestHeaders: new[] { "foo", "bar" }); var policy = new CorsPolicy(); policy.Origins.Add(CorsConstants.AnyOrigin); - policy.Methods.Add("*"); - policy.Headers.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); + policy.Headers.Add(CorsConstants.AnyHeader); // Act var result = corsService.EvaluatePolicy(requestContext, policy); @@ -524,7 +524,7 @@ public void EvaluatePolicy_PreflightRequest_HeadersRequested_NotAllHeaderMatches accessControlRequestHeaders: new[] { "match", "noMatch" }); var policy = new CorsPolicy(); policy.Origins.Add(CorsConstants.AnyOrigin); - policy.Methods.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); policy.Headers.Add("match"); policy.Headers.Add("foo"); @@ -544,8 +544,8 @@ public void EvaluatePolicy_PreflightRequest_WithCredentials_ReflectsHeaders() var httpContext = GetHttpContext(method: "OPTIONS", origin: "http://example.com", accessControlRequestMethod: "PUT"); var policy = new CorsPolicy(); policy.Origins.Add("http://example.com"); - policy.Methods.Add("*"); - policy.Headers.Add("*"); + policy.Methods.Add(CorsConstants.AnyMethod); + policy.Headers.Add(CorsConstants.AnyHeader); policy.SupportsCredentials = true; // Act From 60a8ba0b680c3b8f66317e014147ae93a46fbf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Fri, 7 Jun 2024 17:34:44 -0700 Subject: [PATCH 025/257] Update Components build and E2E testing instructions (#56106) --- src/Components/README.md | 65 ++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/src/Components/README.md b/src/Components/README.md index eac392c2bbc2..cf2fccfb7893 100644 --- a/src/Components/README.md +++ b/src/Components/README.md @@ -29,42 +29,56 @@ The following contains a description of each sub-directory in the `Components` d ## Development Setup -### Build +**Note**: To build other specific projects from source, follow the instructions [on building the project](../../docs/BuildFromSource.md#step-3-build-the-repo). -To build this specific project from source, follow the instructions [on building the project](../../docs/BuildFromSource.md#step-3-build-the-repo). +### Building ASP.NET Core Components -**Note:** You also need to run the preceding `build` command in the command line before building in VS to ensure that the Web.JS dependency is built. +1. You'll need to install [Node](https://nodejs.org) on your machine. -### A Guide to build Web.JS +1. Ensure the repository is clean from any asset that could remain from previous version of the repository. This is recommended when switching branches, or after updating the working branch. -Prior to building `src\Components\Web.JS\` +```powershell +git clean -xdff +``` -1. You'll need to install [Node](https://nodejs.org) on your machine. +You may need to kill some processes holding on files that are being deleted, like closing Visual Studio and other `msbuild` or `dotnet` processes. There may also be lingering headless `chrome` processes, but they are not included in this command. The following command may help you but be aware that this could also stop other important tasks: + +```powershell +Get-Process dotnet, escape-node-job, msbuild, VBCSCompiler, node, vstest.console, Microsoft.CodeAnalysis.LanguageServer -ErrorAction Continue | Stop-Process; +``` -2. You'll need to run the `restore` script locally to install the required dotnet dependencies and setup the repo. The `restore` script is located in the root of the repo. +1. Use NPM to restore the required JavaScript modules. This doesn't require an Internet connection since the sources are read from a sub-module. + +```powershell +npm ci --offline +``` + +1. You'll need to run the `restore` script locally to install the required dotnet dependencies and setup the repo. The `restore` script is located in the root of the repo. ```bash ./restore.sh ``` ```powershell -./restore.ps1 +./restore.cmd ``` -3. After the restore script has finished executing, activate the locally installed .NET by running the following command. +1. Now you can build all the JavaScript assets required by the repository (including SignalR for instance) by running the following command: -```bash -source activate.sh +```powershell +npm run build ``` +1. Build the Components: + ```powershell -. ./activate.ps1 +./src/Components/build.cmd ``` -4. Now you can build `src\Components\Web.JS\` by running the following commands in the `src\Components\Web.JS` directory: +2. Optionally, open the Components in Visual Studio: ```powershell -dotnet build +./src/Components/startvs.cmd ``` ### Test @@ -84,23 +98,22 @@ These tests are run in the CI as part of the [`aspnetcore-components-e2e`](https #### How to run the E2E Tests -To run the tests for this project, follow these steps (from the root directory): +The E2E tests can be run and debugged directly from Visual Studio (as explained in the previous section). To run the tests from the command line, +follow the previous build steps and then these commands: -##### Windows +1. Activate the locally installed .NET by running the following command. + +```bash +source activate.sh +``` ```powershell -./restore.cmd -npm install --prefix ./src/Components/test/E2ETest -. .\activate.ps1 -dotnet test ./src/Components/test/E2ETest +. ./activate.ps1 ``` -##### Linux / MacOS +1. Start the tests. -```shell -./restore.sh -npm install --prefix ./src/Components/test/E2ETest -source ./activate.sh +```powershell dotnet test ./src/Components/test/E2ETest ``` @@ -123,4 +136,4 @@ dotnet test --no-build ## More Information -For more information, see the [ASP.NET Core README](../../README.md). +For more information, see the [ASP.NET Core README](https://github.com/dotnet/aspnetcore/blob/main/README.md). From 206b0aeca39d5eb12e55ce4e35ef4c8b9bc63c86 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Fri, 7 Jun 2024 19:04:45 -0700 Subject: [PATCH 026/257] Add support for OpenAPI schema transformers (#56093) --- .../Microbenchmarks/TransformersBenchmark.cs | 29 +++ src/OpenApi/src/PublicAPI.Unshipped.txt | 11 ++ .../src/Services/OpenApiDocumentService.cs | 50 ++--- src/OpenApi/src/Services/OpenApiOptions.cs | 14 ++ .../Services/Schemas/OpenApiSchemaService.cs | 31 +++- .../OpenApiSchemaTransformerContext.cs | 34 ++++ .../OpenApiDocumentServiceTestsBase.cs | 37 ++-- .../Transformers/SchemaTransformerTests.cs | 174 ++++++++++++++++++ 8 files changed, 332 insertions(+), 48 deletions(-) create mode 100644 src/OpenApi/src/Transformers/OpenApiSchemaTransformerContext.cs create mode 100644 src/OpenApi/test/Transformers/SchemaTransformerTests.cs diff --git a/src/OpenApi/perf/Microbenchmarks/TransformersBenchmark.cs b/src/OpenApi/perf/Microbenchmarks/TransformersBenchmark.cs index 4dd02d9989d0..8b8fda46709a 100644 --- a/src/OpenApi/perf/Microbenchmarks/TransformersBenchmark.cs +++ b/src/OpenApi/perf/Microbenchmarks/TransformersBenchmark.cs @@ -4,6 +4,7 @@ using BenchmarkDotNet.Attributes; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Routing; +using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; namespace Microsoft.AspNetCore.OpenApi.Microbenchmarks; @@ -64,6 +65,28 @@ public void DocumentTransformerAsDelegate_Delegate() _documentService = CreateDocumentService(_builder, _options); } + [GlobalSetup(Target = nameof(SchemaTransformer))] + public void SchemaTransformer_Setup() + { + _builder.MapPost("/", (Todo todo) => todo); + for (var i = 0; i <= TransformerCount; i++) + { + _options.UseSchemaTransformer((schema, context, token) => + { + if (context.Type == typeof(Todo) && context.ParameterDescription != null) + { + schema.Extensions["x-my-extension"] = new OpenApiString(context.ParameterDescription.Name); + } + else + { + schema.Extensions["x-my-extension"] = new OpenApiString("response"); + } + return Task.CompletedTask; + }); + } + _documentService = CreateDocumentService(_builder, _options); + } + [Benchmark] public async Task OperationTransformerAsDelegate() { @@ -82,6 +105,12 @@ public async Task DocumentTransformerAsDelegate() await _documentService.GetOpenApiDocumentAsync(); } + [Benchmark] + public async Task SchemaTransformer() + { + await _documentService.GetOpenApiDocumentAsync(); + } + private class ActivatedTransformer : IOpenApiDocumentTransformer { public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken) diff --git a/src/OpenApi/src/PublicAPI.Unshipped.txt b/src/OpenApi/src/PublicAPI.Unshipped.txt index f32c9da9334c..ddde07129563 100644 --- a/src/OpenApi/src/PublicAPI.Unshipped.txt +++ b/src/OpenApi/src/PublicAPI.Unshipped.txt @@ -11,9 +11,20 @@ Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiVersion.set -> void Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude.get -> System.Func! Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude.set -> void Microsoft.AspNetCore.OpenApi.OpenApiOptions.UseOperationTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.UseSchemaTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! Microsoft.AspNetCore.OpenApi.OpenApiOptions.UseTransformer(Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! Microsoft.AspNetCore.OpenApi.OpenApiOptions.UseTransformer(System.Func! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! Microsoft.AspNetCore.OpenApi.OpenApiOptions.UseTransformer() -> Microsoft.AspNetCore.OpenApi.OpenApiOptions! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ApplicationServices.get -> System.IServiceProvider! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ApplicationServices.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.DocumentName.get -> string! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.DocumentName.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.OpenApiSchemaTransformerContext() -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ParameterDescription.get -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.ParameterDescription.init -> void +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Type.get -> System.Type! +Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Type.init -> void Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions static Microsoft.AspNetCore.Builder.OpenApiEndpointRouteBuilderExtensions.MapOpenApi(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern = "/openapi/{documentName}.json") -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index 04402b16b459..05d4f7500970 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -55,7 +55,7 @@ public async Task GetOpenApiDocumentAsync(CancellationToken can var document = new OpenApiDocument { Info = GetOpenApiInfo(), - Paths = GetOpenApiPaths(capturedTags), + Paths = await GetOpenApiPathsAsync(capturedTags, cancellationToken), Tags = [.. capturedTags] }; await ApplyTransformersAsync(document, cancellationToken); @@ -99,7 +99,7 @@ internal OpenApiInfo GetOpenApiInfo() /// the object to support filtering each /// description instance into its appropriate document. /// - private OpenApiPaths GetOpenApiPaths(HashSet capturedTags) + private async Task GetOpenApiPathsAsync(HashSet capturedTags, CancellationToken cancellationToken) { var descriptionsByPath = apiDescriptionGroupCollectionProvider.ApiDescriptionGroups.Items .SelectMany(group => group.Items) @@ -109,17 +109,17 @@ private OpenApiPaths GetOpenApiPaths(HashSet capturedTags) foreach (var descriptions in descriptionsByPath) { Debug.Assert(descriptions.Key != null, "Relative path mapped to OpenApiPath key cannot be null."); - paths.Add(descriptions.Key, new OpenApiPathItem { Operations = GetOperations(descriptions, capturedTags) }); + paths.Add(descriptions.Key, new OpenApiPathItem { Operations = await GetOperationsAsync(descriptions, capturedTags, cancellationToken) }); } return paths; } - private Dictionary GetOperations(IGrouping descriptions, HashSet capturedTags) + private async Task> GetOperationsAsync(IGrouping descriptions, HashSet capturedTags, CancellationToken cancellationToken) { var operations = new Dictionary(); foreach (var description in descriptions) { - var operation = GetOperation(description, capturedTags); + var operation = await GetOperationAsync(description, capturedTags, cancellationToken); operation.Extensions.Add(OpenApiConstants.DescriptionId, new OpenApiString(description.ActionDescriptor.Id)); _operationTransformerContextCache.TryAdd(description.ActionDescriptor.Id, new OpenApiOperationTransformerContext { @@ -132,7 +132,7 @@ private Dictionary GetOperations(IGrouping capturedTags) + private async Task GetOperationAsync(ApiDescription description, HashSet capturedTags, CancellationToken cancellationToken) { var tags = GetTags(description); if (tags != null) @@ -147,9 +147,9 @@ private OpenApiOperation GetOperation(ApiDescription description, HashSet GetResponsesAsync(ApiDescription description, CancellationToken cancellationToken) { // OpenAPI requires that each operation have a response, usually a successful one. // if there are no response types defined, we assume a successful 200 OK response @@ -186,7 +186,7 @@ private OpenApiResponses GetResponses(ApiDescription description) { return new OpenApiResponses { - ["200"] = GetResponse(description, StatusCodes.Status200OK, _defaultApiResponseType) + ["200"] = await GetResponseAsync(description, StatusCodes.Status200OK, _defaultApiResponseType, cancellationToken) }; } @@ -200,12 +200,12 @@ private OpenApiResponses GetResponses(ApiDescription description) var responseKey = responseType.IsDefaultResponse ? OpenApiConstants.DefaultOpenApiResponseKey : responseType.StatusCode.ToString(CultureInfo.InvariantCulture); - responses.Add(responseKey, GetResponse(description, responseType.StatusCode, responseType)); + responses.Add(responseKey, await GetResponseAsync(description, responseType.StatusCode, responseType, cancellationToken)); } return responses; } - private OpenApiResponse GetResponse(ApiDescription apiDescription, int statusCode, ApiResponseType apiResponseType) + private async Task GetResponseAsync(ApiDescription apiDescription, int statusCode, ApiResponseType apiResponseType, CancellationToken cancellationToken) { var description = ReasonPhrases.GetReasonPhrase(statusCode); var response = new OpenApiResponse @@ -222,7 +222,7 @@ private OpenApiResponse GetResponse(ApiDescription apiDescription, int statusCod .Select(responseFormat => responseFormat.MediaType); foreach (var contentType in apiResponseFormatContentTypes) { - var schema = apiResponseType.Type is { } type ? _componentService.GetOrCreateSchema(type) : new OpenApiSchema(); + var schema = apiResponseType.Type is { } type ? await _componentService.GetOrCreateSchemaAsync(type, null, cancellationToken) : new OpenApiSchema(); response.Content[contentType] = new OpenApiMediaType { Schema = schema }; } @@ -240,7 +240,7 @@ private OpenApiResponse GetResponse(ApiDescription apiDescription, int statusCod return response; } - private List? GetParameters(ApiDescription description) + private async Task?> GetParametersAsync(ApiDescription description, CancellationToken cancellationToken) { List? parameters = null; foreach (var parameter in description.ParameterDescriptions) @@ -265,7 +265,7 @@ private OpenApiResponse GetResponse(ApiDescription apiDescription, int statusCod // Per the OpenAPI specification, parameters that are sourced from the path // are always required, regardless of the requiredness status of the parameter. Required = parameter.Source == BindingSource.Path || parameter.IsRequired, - Schema = _componentService.GetOrCreateSchema(parameter.Type, parameter), + Schema = await _componentService.GetOrCreateSchemaAsync(parameter.Type, parameter, cancellationToken), }; parameters ??= []; parameters.Add(openApiParameter); @@ -273,24 +273,24 @@ private OpenApiResponse GetResponse(ApiDescription apiDescription, int statusCod return parameters; } - private OpenApiRequestBody? GetRequestBody(ApiDescription description) + private async Task GetRequestBodyAsync(ApiDescription description, CancellationToken cancellationToken) { // Only one parameter can be bound from the body in each request. if (description.TryGetBodyParameter(out var bodyParameter)) { - return GetJsonRequestBody(description.SupportedRequestFormats, bodyParameter); + return await GetJsonRequestBody(description.SupportedRequestFormats, bodyParameter, cancellationToken); } // If there are no body parameters, check for form parameters. // Note: Form parameters and body parameters cannot exist simultaneously // in the same endpoint. if (description.TryGetFormParameters(out var formParameters)) { - return GetFormRequestBody(description.SupportedRequestFormats, formParameters); + return await GetFormRequestBody(description.SupportedRequestFormats, formParameters, cancellationToken); } return null; } - private OpenApiRequestBody GetFormRequestBody(IList supportedRequestFormats, IEnumerable formParameters) + private async Task GetFormRequestBody(IList supportedRequestFormats, IEnumerable formParameters, CancellationToken cancellationToken) { if (supportedRequestFormats.Count == 0) { @@ -325,7 +325,7 @@ private OpenApiRequestBody GetFormRequestBody(IList supportedR if (parameter.All(parameter => parameter.ModelMetadata.ContainerType is null)) { var description = parameter.Single(); - var parameterSchema = _componentService.GetOrCreateSchema(description.Type); + var parameterSchema = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken); // Form files are keyed by their parameter name so we must capture the parameter name // as a property in the schema. if (description.Type == typeof(IFormFile) || description.Type == typeof(IFormFileCollection)) @@ -388,7 +388,7 @@ private OpenApiRequestBody GetFormRequestBody(IList supportedR var propertySchema = new OpenApiSchema { Type = "object", Properties = new Dictionary() }; foreach (var description in parameter) { - propertySchema.Properties[description.Name] = _componentService.GetOrCreateSchema(description.Type); + propertySchema.Properties[description.Name] = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken); } schema.AllOf.Add(propertySchema); } @@ -396,7 +396,7 @@ private OpenApiRequestBody GetFormRequestBody(IList supportedR { foreach (var description in parameter) { - schema.Properties[description.Name] = _componentService.GetOrCreateSchema(description.Type); + schema.Properties[description.Name] = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken); } } } @@ -415,7 +415,7 @@ private OpenApiRequestBody GetFormRequestBody(IList supportedR return requestBody; } - private OpenApiRequestBody GetJsonRequestBody(IList supportedRequestFormats, ApiParameterDescription bodyParameter) + private async Task GetJsonRequestBody(IList supportedRequestFormats, ApiParameterDescription bodyParameter, CancellationToken cancellationToken) { if (supportedRequestFormats.Count == 0) { @@ -442,7 +442,7 @@ private OpenApiRequestBody GetJsonRequestBody(IList supportedR foreach (var requestForm in supportedRequestFormats) { var contentType = requestForm.MediaType; - requestBody.Content[contentType] = new OpenApiMediaType { Schema = _componentService.GetOrCreateSchema(bodyParameter.Type) }; + requestBody.Content[contentType] = new OpenApiMediaType { Schema = await _componentService.GetOrCreateSchemaAsync(bodyParameter.Type, bodyParameter, cancellationToken) }; } return requestBody; diff --git a/src/OpenApi/src/Services/OpenApiOptions.cs b/src/OpenApi/src/Services/OpenApiOptions.cs index fba727315660..a9162196decd 100644 --- a/src/OpenApi/src/Services/OpenApiOptions.cs +++ b/src/OpenApi/src/Services/OpenApiOptions.cs @@ -14,6 +14,7 @@ namespace Microsoft.AspNetCore.OpenApi; public sealed class OpenApiOptions { internal readonly List DocumentTransformers = []; + internal readonly List> SchemaTransformers = []; /// /// Initializes a new instance of the class @@ -89,4 +90,17 @@ public OpenApiOptions UseOperationTransformer(Func + /// Registers a given delegate as a schema transformer on the current instance. + /// + /// The delegate representing the schema transformer. + /// The instance for further customization. + public OpenApiOptions UseSchemaTransformer(Func transformer) + { + ArgumentNullException.ThrowIfNull(transformer, nameof(transformer)); + + SchemaTransformers.Add(transformer); + return this; + } } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 119634e4f9f0..1bdb8317a92a 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel.DataAnnotations; +using System.Diagnostics; using System.IO.Pipelines; using System.Text.Json; using System.Text.Json.Nodes; @@ -21,9 +22,14 @@ namespace Microsoft.AspNetCore.OpenApi; /// an OpenAPI document. In particular, this is the API that is used to /// interact with the JSON schemas that are managed by a given OpenAPI document. /// -internal sealed class OpenApiSchemaService([ServiceKey] string documentName, IOptions jsonOptions, IServiceProvider serviceProvider) +internal sealed class OpenApiSchemaService( + [ServiceKey] string documentName, + IOptions jsonOptions, + IServiceProvider serviceProvider, + IOptionsMonitor optionsMonitor) { private readonly OpenApiSchemaStore _schemaStore = serviceProvider.GetRequiredKeyedService(documentName); + private readonly OpenApiOptions _openApiOptions = optionsMonitor.Get(documentName); private readonly JsonSerializerOptions _jsonSerializerOptions = jsonOptions.Value.SerializerOptions; private readonly JsonSchemaMapperConfiguration _configuration = new() { @@ -57,7 +63,7 @@ internal sealed class OpenApiSchemaService([ServiceKey] string documentName, IOp } }; - internal OpenApiSchema GetOrCreateSchema(Type type, ApiParameterDescription? parameterDescription = null) + internal async Task GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) { var key = parameterDescription?.ParameterDescriptor is IParameterInfoParameterDescriptor parameterInfoDescription && parameterDescription.ModelMetadata.PropertyName is null @@ -68,7 +74,26 @@ internal OpenApiSchema GetOrCreateSchema(Type type, ApiParameterDescription? par schemaAsJsonObject.ApplyParameterInfo(parameterDescription); } var deserializedSchema = JsonSerializer.Deserialize(schemaAsJsonObject, OpenApiJsonSchemaContext.Default.OpenApiJsonSchema); - return deserializedSchema != null ? deserializedSchema.Schema : new OpenApiSchema(); + Debug.Assert(deserializedSchema != null, "The schema should have been deserialized successfully and materialize a non-null value."); + var schema = deserializedSchema.Schema; + await ApplySchemaTransformersAsync(schema, type, parameterDescription, cancellationToken); + return schema; + } + + internal async Task ApplySchemaTransformersAsync(OpenApiSchema schema, Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) + { + var context = new OpenApiSchemaTransformerContext + { + DocumentName = documentName, + Type = type, + ParameterDescription = parameterDescription, + ApplicationServices = serviceProvider + }; + for (var i = 0; i < _openApiOptions.SchemaTransformers.Count; i++) + { + var transformer = _openApiOptions.SchemaTransformers[i]; + await transformer(schema, context, cancellationToken); + } } private JsonObject CreateSchema(OpenApiSchemaKey key) diff --git a/src/OpenApi/src/Transformers/OpenApiSchemaTransformerContext.cs b/src/OpenApi/src/Transformers/OpenApiSchemaTransformerContext.cs new file mode 100644 index 000000000000..b915978ff35b --- /dev/null +++ b/src/OpenApi/src/Transformers/OpenApiSchemaTransformerContext.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +/// +/// Represents the context in which an OpenAPI schema transformer is executed. +/// +public sealed class OpenApiSchemaTransformerContext +{ + /// + /// Gets the name of the associated OpenAPI document. + /// + public required string DocumentName { get; init; } + + /// + /// Gets the associated with the current . + /// + public required Type Type { get; init; } + + /// + /// Gets the associated with the target schema. + /// Null when processing an OpenAPI schema for a response type. + /// + public required ApiParameterDescription? ParameterDescription { get; init; } + + /// + /// Gets the application services associated with the current document the target schema is in. + /// + public required IServiceProvider ApplicationServices { get; init; } +} diff --git a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs index f6a2d749294e..9b72ee79e8df 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs @@ -21,13 +21,13 @@ public abstract class OpenApiDocumentServiceTestBase { - public static async Task VerifyOpenApiDocument(IEndpointRouteBuilder builder, Action verifyOpenApiDocument) - => await VerifyOpenApiDocument(builder, new OpenApiOptions(), verifyOpenApiDocument); + public static async Task VerifyOpenApiDocument(IEndpointRouteBuilder builder, Action verifyOpenApiDocument, CancellationToken cancellationToken = default) + => await VerifyOpenApiDocument(builder, new OpenApiOptions(), verifyOpenApiDocument, cancellationToken); - public static async Task VerifyOpenApiDocument(IEndpointRouteBuilder builder, OpenApiOptions openApiOptions, Action verifyOpenApiDocument) + public static async Task VerifyOpenApiDocument(IEndpointRouteBuilder builder, OpenApiOptions openApiOptions, Action verifyOpenApiDocument, CancellationToken cancellationToken = default) { var documentService = CreateDocumentService(builder, openApiOptions); - var document = await documentService.GetOpenApiDocumentAsync(); + var document = await documentService.GetOpenApiDocumentAsync(cancellationToken); verifyOpenApiDocument(document); } @@ -73,6 +73,8 @@ internal static OpenApiDocumentService CreateDocumentService(ActionDescriptor ac var openApiOptions = new Mock>(); openApiOptions.Setup(o => o.Get(It.IsAny())).Returns(new OpenApiOptions()); + var schemaService = new OpenApiSchemaService("Test", Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), builder.ServiceProvider, openApiOptions.Object); + ((TestServiceProvider)builder.ServiceProvider).TestSchemaService = schemaService; var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, openApiOptions.Object, builder.ServiceProvider); ((TestServiceProvider)builder.ServiceProvider).TestDocumentService = documentService; @@ -97,6 +99,8 @@ internal static OpenApiDocumentService CreateDocumentService(IEndpointRouteBuild var apiDescriptionGroupCollectionProvider = CreateApiDescriptionGroupCollectionProvider(context.Results); + var schemaService = new OpenApiSchemaService("Test", Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), builder.ServiceProvider, options.Object); + ((TestServiceProvider)builder.ServiceProvider).TestSchemaService = schemaService; var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, options.Object, builder.ServiceProvider); ((TestServiceProvider)builder.ServiceProvider).TestDocumentService = documentService; @@ -214,33 +218,27 @@ private class TestServiceProvider : IServiceProvider, IKeyedServiceProvider private IKeyedServiceProvider _serviceProvider; internal OpenApiDocumentService TestDocumentService { get; set; } internal OpenApiSchemaStore TestSchemaStoreService { get; } = new OpenApiSchemaStore(); - private OpenApiSchemaService _testSchemaService; + internal OpenApiSchemaService TestSchemaService { get; set; } public void SetInternalServiceProvider(IServiceCollection serviceCollection) { serviceCollection.AddKeyedSingleton("Test"); + serviceCollection.Configure("Test", options => + { + options.DocumentName = "Test"; + }); _serviceProvider = serviceCollection.BuildServiceProvider(); - _testSchemaService = new OpenApiSchemaService( - "Test", - Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), - _serviceProvider - ); } public object GetKeyedService(Type serviceType, object serviceKey) { - if (serviceType == typeof(OpenApiDocumentService)) { return TestDocumentService; } if (serviceType == typeof(OpenApiSchemaService)) { - return _testSchemaService; - } - if (serviceType == typeof(OpenApiSchemaService)) - { - return _testSchemaService; + return TestSchemaService; } if (serviceType == typeof(OpenApiSchemaStore)) { @@ -258,12 +256,11 @@ public object GetRequiredKeyedService(Type serviceType, object serviceKey) } if (serviceType == typeof(OpenApiSchemaService)) { - return _testSchemaService; + return TestSchemaService; } - - if (serviceType == typeof(OpenApiSchemaService)) + if (serviceType == typeof(OpenApiSchemaStore)) { - return _testSchemaService; + return TestSchemaStoreService; } return _serviceProvider.GetRequiredKeyedService(serviceType, serviceKey); diff --git a/src/OpenApi/test/Transformers/SchemaTransformerTests.cs b/src/OpenApi/test/Transformers/SchemaTransformerTests.cs new file mode 100644 index 000000000000..841c4fd321e4 --- /dev/null +++ b/src/OpenApi/test/Transformers/SchemaTransformerTests.cs @@ -0,0 +1,174 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; + +public class SchemaTransformerTests : OpenApiDocumentServiceTestBase +{ + [Fact] + public async Task SchemaTransformer_CanAccessTypeAndParameterDescriptionForParameter() + { + var builder = CreateBuilder(); + + builder.MapPost("/todo", (Todo todo) => { }); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + Assert.Equal(typeof(Todo), context.Type); + Assert.Equal("todo", context.ParameterDescription.Name); + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => { }); + } + + [Fact] + public async Task SchemaTransformer_CanAccessTypeForResponse() + { + var builder = CreateBuilder(); + + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + Assert.Equal(typeof(Todo), context.Type); + Assert.Null(context.ParameterDescription); + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => { }); + } + + [Fact] + public async Task SchemaTransformer_CanAccessApplicationServicesAndDocumentName() + { + var builder = CreateBuilder(); + + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + var service = context.ApplicationServices.GetKeyedService(context.DocumentName); + Assert.NotNull(service); + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => { }); + } + + [Fact] + public async Task SchemaTransformer_RespectsCancellationToken() + { + var builder = CreateBuilder(); + + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var cts = new CancellationTokenSource(); + cts.Cancel(); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + Assert.Equal(cts.Token, cancellationToken); + Assert.True(cancellationToken.IsCancellationRequested); + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => { }, cts.Token); + } + + [Fact] + public async Task SchemaTransformer_RunsInRegisteredOrder() + { + var builder = CreateBuilder(); + + builder.MapPost("/todo", (Todo todo) => { }); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + schema.Extensions["x-my-extension"] = new OpenApiString("1"); + return Task.CompletedTask; + }); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + Assert.Equal("1", ((OpenApiString)schema.Extensions["x-my-extension"]).Value); + schema.Extensions["x-my-extension"] = new OpenApiString("2"); + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => + { + var operation = Assert.Single(document.Paths.Values).Operations.Values.Single(); + var schema = operation.RequestBody.Content["application/json"].Schema; + Assert.Equal("2", ((OpenApiString)schema.Extensions["x-my-extension"]).Value); + }); + } + + [Fact] + public async Task SchemaTransformer_OnTypeModifiesBothRequestAndResponse() + { + var builder = CreateBuilder(); + + builder.MapPost("/todo", (Todo todo) => { }); + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + if (context.Type == typeof(Todo)) + { + schema.Extensions["x-my-extension"] = new OpenApiString("1"); + } + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => + { + var path = Assert.Single(document.Paths.Values); + var postOperation = path.Operations[OperationType.Post]; + var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; + Assert.Equal("1", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); + var getOperation = path.Operations[OperationType.Get]; + var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; + Assert.Equal("1", ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); + }); + } + + [Fact] + public async Task SchemaTransformer_WithDescriptionOnlyModifiesParameter() + { + var builder = CreateBuilder(); + + builder.MapPost("/todo", (Todo todo) => { }); + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + if (context.Type == typeof(Todo) && context.ParameterDescription is not null) + { + schema.Extensions["x-my-extension"] = new OpenApiString(context.ParameterDescription.Name); + } + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => + { + var path = Assert.Single(document.Paths.Values); + var postOperation = path.Operations[OperationType.Post]; + var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; + Assert.Equal("todo", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); + var getOperation = path.Operations[OperationType.Get]; + var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; + Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _)); + }); + } +} From 3a2a9311d575d5f6db79a91a8300810e41c045b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 9 Jun 2024 12:58:59 -0700 Subject: [PATCH 027/257] Update .NET SDK to 9.0.100-preview.6.24302.3 (#56034) --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index a03505640dad..f69c8b161db9 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.6.24277.1" + "version": "9.0.100-preview.6.24302.3" }, "tools": { - "dotnet": "9.0.100-preview.6.24277.1", + "dotnet": "9.0.100-preview.6.24302.3", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 7f2dfb0020ff29ab57df31e910f2b2d5ef48bf82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Sun, 9 Jun 2024 14:27:40 -0700 Subject: [PATCH 028/257] Fix Build From Source example (#56105) --- docs/BuildFromSource.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/BuildFromSource.md b/docs/BuildFromSource.md index 99eff312c992..b4f15930027a 100644 --- a/docs/BuildFromSource.md +++ b/docs/BuildFromSource.md @@ -59,10 +59,13 @@ The steps you follow next depend on your preferred development environment: ./restore.cmd ``` -1. You'll typically focus on one project in the repo. You can use the `startvs.cmd` command to launch Visual Studio in a particular project area. For example, to launch Visual Studio in the `Components` project: +1. You'll typically focus on one project in the repo. You can use the `startvs.cmd` command to launch Visual Studio in a particular project area. For example, to launch Visual Studio in the `src/Http` project, after you have built it with `./build.cmd`: + + > :bulb: The `build.cmd` script will be local to the directory of the project you opened. For example, the script located in the `src/Http` directory. If you want to build the whole tree, use the `build.cmd` that is located in the `eng` directory. ```powershell - cd src\Components + cd src/Http + ./build.cmd ./startvs.cmd ``` From df3fa0aa0493d266b22fb41c08ccc3433f76c0ee Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:06:30 +0000 Subject: [PATCH 029/257] Update dependencies from https://github.com/dotnet/source-build-externals build 20240603.2 (#56165) [main] Update dependencies from dotnet/source-build-externals --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5039a14f48f6..b7856330e1de 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -368,9 +368,9 @@ 745230568e52639e229dcc24c98fe0dbb4c1641d - + https://github.com/dotnet/source-build-externals - f1b44a365df0b8dbc38403ee8696adc25fbdd76a + 7db00527ef8fbbe61f67e9295beebddf187efff8 diff --git a/eng/Versions.props b/eng/Versions.props index 4c1a5e7dfe92..2e59e828d253 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -165,7 +165,7 @@ 9.0.0-beta.24272.5 9.0.0-beta.24272.5 - 9.0.0-alpha.1.24278.2 + 9.0.0-alpha.1.24303.2 9.0.0-alpha.1.24304.1 From 26a1cee28f9e21a2bb441adb18f82846df4f0dd9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:18:06 +0000 Subject: [PATCH 030/257] Update dependencies from https://github.com/dotnet/extensions build 20240608.1 (#56166) [main] Update dependencies from dotnet/extensions --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b7856330e1de..ba9c1a26aef8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -410,13 +410,13 @@ https://github.com/dotnet/arcade 2001d73c8ff942331a73300ba61fa6164805b231 - + https://github.com/dotnet/extensions - 74a55056def261bb3b433ceb040dc4134a35f63e + c227151c582799fd22c5fe1f093846a2dd1eb00a - + https://github.com/dotnet/extensions - 74a55056def261bb3b433ceb040dc4134a35f63e + c227151c582799fd22c5fe1f093846a2dd1eb00a https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index 2e59e828d253..ef687c91ca9c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,8 +137,8 @@ 9.0.0-preview.5.24272.1 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24301.1 - 9.0.0-preview.5.24301.1 + 9.0.0-preview.5.24308.1 + 9.0.0-preview.5.24308.1 9.0.0-preview.5.24271.1 9.0.0-preview.5.24271.1 From 7da8180c157b8106a2db59dd41849f2a990fb652 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:25:59 +0000 Subject: [PATCH 031/257] Update dependencies from https://github.com/dotnet/winforms build 20240607.1 (#56167) [main] Update dependencies from dotnet/winforms --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ba9c1a26aef8..5c3edfc67fb5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -380,9 +380,9 @@ https://github.com/dotnet/runtime 745230568e52639e229dcc24c98fe0dbb4c1641d - + https://github.com/dotnet/winforms - 9f9d572dd4fdf6e55cf91548ab8ee18c8f003990 + 25717b4f5d6f00097dc9bc328a3d4652ad71414c https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index ef687c91ca9c..96e5c1a2ecab 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -171,7 +171,7 @@ 2.1.0-beta.24208.1 - 9.0.0-preview.6.24302.1 + 9.0.0-preview.6.24307.1 9.0.0-preview.24303.1 9.0.0-preview.24303.1 From f7d5104c2d09bef5070f0a4c3d449f8290e33025 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Mon, 10 Jun 2024 16:34:23 -0500 Subject: [PATCH 032/257] Annotate SignalR client for native AOT (#56079) Addresses the following problems: 0. Fix up some infrastructure around TrimmingAttributes to be cleaner. - Don't need to condition when to include them. Just always include them if you need it, and the TFM checks will be done for you. - Remove duplicate, standalone attribute files 1. HubConnection and ReflectionHelper's usage of finding IAsyncEnumerable interface 2. HubConnection's usage of MakeGenericMethod when using a streaming reader (IAsyncEnumerable or ChannelReader). - The only idea I have here is to follow the same approach as we do in DependencyInjection and elsewhere, which is to check for `IsDynamicCodeSupported == false` && `IsValueType` and throw an exception. This enables people to get exceptions during F5, and not only after publishing. --- eng/TrimmableProjects.props | 4 + ...NetCore.DataProtection.Abstractions.csproj | 3 +- ...Microsoft.AspNetCore.DataProtection.csproj | 3 +- ...spNetCore.DataProtection.Extensions.csproj | 3 +- ...t.Extensions.FileProviders.Embedded.csproj | 3 +- ...Extensions.Diagnostics.HealthChecks.csproj | 3 +- .../Microsoft.Extensions.Identity.Core.csproj | 3 +- ...icrosoft.Extensions.Identity.Stores.csproj | 3 +- ...AspNetCore.Connections.Abstractions.csproj | 2 +- .../DynamicallyAccessedMemberTypes.cs | 99 ------------------- .../DynamicallyAccessedMembersAttribute.cs | 50 ---------- src/Shared/TrimmingAttributes.cs | 42 ++++---- .../csharp/Client.Core/src/HubConnection.cs | 46 +++++++-- ...soft.AspNetCore.SignalR.Client.Core.csproj | 4 +- ...Microsoft.AspNetCore.SignalR.Client.csproj | 1 + ....AspNetCore.Http.Connections.Client.csproj | 1 + ...t.AspNetCore.SignalR.Protocols.Json.csproj | 3 + .../src/Protocol/JsonHubProtocol.cs | 20 ++-- src/SignalR/common/Shared/ReflectionHelper.cs | 32 +++--- 19 files changed, 110 insertions(+), 215 deletions(-) delete mode 100644 src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs delete mode 100644 src/Shared/CodeAnalysis/DynamicallyAccessedMembersAttribute.cs diff --git a/eng/TrimmableProjects.props b/eng/TrimmableProjects.props index aa4b06dc9e6d..3b28def7582c 100644 --- a/eng/TrimmableProjects.props +++ b/eng/TrimmableProjects.props @@ -85,8 +85,12 @@ + + + + diff --git a/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj b/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj index 9c98f96d2db2..1fe6c9dd19ba 100644 --- a/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj +++ b/src/DataProtection/Abstractions/src/Microsoft.AspNetCore.DataProtection.Abstractions.csproj @@ -16,8 +16,7 @@ Microsoft.AspNetCore.DataProtection.IDataProtector - + diff --git a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj index 8f674ca01208..ddf556d6668c 100644 --- a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj +++ b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj @@ -18,8 +18,7 @@ - + diff --git a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj index 4e0f462d5b01..5b44128f30b5 100644 --- a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj +++ b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj @@ -12,8 +12,7 @@ - + diff --git a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj index c08185cc6a01..590c4e980042 100644 --- a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj +++ b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj @@ -43,7 +43,6 @@ - + diff --git a/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj b/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj index 2037d145a6d0..e23ac6202aca 100644 --- a/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj +++ b/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj @@ -22,8 +22,7 @@ Microsoft.Extensions.Diagnostics.HealthChecks.IHealthChecksBuilder - + diff --git a/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj b/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj index 350751c48f94..1174c460f250 100644 --- a/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj +++ b/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj @@ -15,8 +15,7 @@ - + diff --git a/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj b/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj index c4551bb2cd9b..5c0bc03e774c 100644 --- a/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj +++ b/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj @@ -15,8 +15,7 @@ - + diff --git a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj index 0c1987f47275..25784a904c42 100644 --- a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj +++ b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj @@ -19,9 +19,9 @@ - + diff --git a/src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs b/src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs deleted file mode 100644 index 1795f38b89fc..000000000000 --- a/src/Shared/CodeAnalysis/DynamicallyAccessedMemberTypes.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#if !NET5_0_OR_GREATER -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Specifies the types of members that are dynamically accessed. -/// -/// This enumeration has a attribute that allows a -/// bitwise combination of its member values. -/// -[Flags] -internal enum DynamicallyAccessedMemberTypes -{ - /// - /// Specifies no members. - /// - None = 0, - - /// - /// Specifies the default, parameterless public constructor. - /// - PublicParameterlessConstructor = 0x0001, - - /// - /// Specifies all public constructors. - /// - PublicConstructors = 0x0002 | PublicParameterlessConstructor, - - /// - /// Specifies all non-public constructors. - /// - NonPublicConstructors = 0x0004, - - /// - /// Specifies all public methods. - /// - PublicMethods = 0x0008, - - /// - /// Specifies all non-public methods. - /// - NonPublicMethods = 0x0010, - - /// - /// Specifies all public fields. - /// - PublicFields = 0x0020, - - /// - /// Specifies all non-public fields. - /// - NonPublicFields = 0x0040, - - /// - /// Specifies all public nested types. - /// - PublicNestedTypes = 0x0080, - - /// - /// Specifies all non-public nested types. - /// - NonPublicNestedTypes = 0x0100, - - /// - /// Specifies all public properties. - /// - PublicProperties = 0x0200, - - /// - /// Specifies all non-public properties. - /// - NonPublicProperties = 0x0400, - - /// - /// Specifies all public events. - /// - PublicEvents = 0x0800, - - /// - /// Specifies all non-public events. - /// - NonPublicEvents = 0x1000, - - /// - /// Specifies all interfaces implemented by the type. - /// - Interfaces = 0x2000, - - /// - /// Specifies all members. - /// - All = ~None -} -#endif diff --git a/src/Shared/CodeAnalysis/DynamicallyAccessedMembersAttribute.cs b/src/Shared/CodeAnalysis/DynamicallyAccessedMembersAttribute.cs deleted file mode 100644 index 486a314aac6e..000000000000 --- a/src/Shared/CodeAnalysis/DynamicallyAccessedMembersAttribute.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#if !NET5_0_OR_GREATER -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Diagnostics.CodeAnalysis; - -/// -/// Indicates that certain members on a specified are accessed dynamically, -/// for example through . -/// -/// -/// This allows tools to understand which members are being accessed during the execution -/// of a program. -/// -/// This attribute is valid on members whose type is or . -/// -/// When this attribute is applied to a location of type , the assumption is -/// that the string represents a fully qualified type name. -/// -/// If the attribute is applied to a method it's treated as a special case and it implies -/// the attribute should be applied to the "this" parameter of the method. As such the attribute -/// should only be used on instance methods of types assignable to System.Type (or string, but no methods -/// will use it there). -/// -[AttributeUsage( - AttributeTargets.Field | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | - AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Method, - Inherited = false)] -internal sealed class DynamicallyAccessedMembersAttribute : Attribute -{ - /// - /// Initializes a new instance of the class - /// with the specified member types. - /// - /// The types of members dynamically accessed. - public DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes memberTypes) - { - MemberTypes = memberTypes; - } - - /// - /// Gets the which specifies the type - /// of members dynamically accessed. - /// - public DynamicallyAccessedMemberTypes MemberTypes { get; } -} -#endif diff --git a/src/Shared/TrimmingAttributes.cs b/src/Shared/TrimmingAttributes.cs index aeb701d47b74..75da0a2e15e4 100644 --- a/src/Shared/TrimmingAttributes.cs +++ b/src/Shared/TrimmingAttributes.cs @@ -5,71 +5,74 @@ namespace System.Diagnostics.CodeAnalysis; +#if !NET7_0_OR_GREATER /// -/// Indicates that the specified method requires dynamic access to code that is not referenced -/// statically, for example through . +/// Indicates that the specified method requires the ability to generate new code at runtime, +/// for example through . /// /// -/// This allows tools to understand which methods are unsafe to call when removing unreferenced -/// code from an application. +/// This allows tools to understand which methods are unsafe to call when compiling ahead of time. /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)] -internal sealed class RequiresUnreferencedCodeAttribute : Attribute +internal sealed class RequiresDynamicCodeAttribute : Attribute { /// - /// Initializes a new instance of the class + /// Initializes a new instance of the class /// with the specified message. /// /// - /// A message that contains information about the usage of unreferenced code. + /// A message that contains information about the usage of dynamic code. /// - public RequiresUnreferencedCodeAttribute(string message) + public RequiresDynamicCodeAttribute(string message) { Message = message; } /// - /// Gets a message that contains information about the usage of unreferenced code. + /// Gets a message that contains information about the usage of dynamic code. /// public string Message { get; } /// /// Gets or sets an optional URL that contains more information about the method, - /// why it requires unreferenced code, and what options a consumer has to deal with it. + /// why it requires dynamic code, and what options a consumer has to deal with it. /// public string? Url { get; set; } } +#endif +#if !NET5_0_OR_GREATER /// -/// Indicates that the specified method requires the ability to generate new code at runtime, -/// for example through . +/// Indicates that the specified method requires dynamic access to code that is not referenced +/// statically, for example through . /// /// -/// This allows tools to understand which methods are unsafe to call when compiling ahead of time. +/// This allows tools to understand which methods are unsafe to call when removing unreferenced +/// code from an application. /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)] -internal sealed class RequiresDynamicCodeAttribute : Attribute +internal sealed class RequiresUnreferencedCodeAttribute : Attribute { /// - /// Initializes a new instance of the class + /// Initializes a new instance of the class /// with the specified message. /// /// - /// A message that contains information about the usage of dynamic code. + /// A message that contains information about the usage of unreferenced code. /// - public RequiresDynamicCodeAttribute(string message) + public RequiresUnreferencedCodeAttribute(string message) { Message = message; } /// - /// Gets a message that contains information about the usage of dynamic code. + /// Gets a message that contains information about the usage of unreferenced code. /// public string Message { get; } /// /// Gets or sets an optional URL that contains more information about the method, - /// why it requires dynamic code, and what options a consumer has to deal with it. + /// why it requires unreferenced code, and what options a consumer has to deal with it. /// public string? Url { get; set; } } @@ -414,3 +417,4 @@ internal enum DynamicallyAccessedMemberTypes /// All = ~None } +#endif diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index 6825679330f2..e111b803d794 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -825,19 +825,27 @@ private void LaunchStreams(ConnectionState connectionState, Dictionary(ConnectionState connectionState, string streamId, ChannelReader reader, CancellationTokenSource tokenSource) { diff --git a/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj b/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj index f26bf49f0333..16c662419d25 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj +++ b/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj @@ -5,6 +5,7 @@ $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0;netstandard2.1 Microsoft.AspNetCore.SignalR.Client enable + true @@ -16,11 +17,10 @@ + - - diff --git a/src/SignalR/clients/csharp/Client/src/Microsoft.AspNetCore.SignalR.Client.csproj b/src/SignalR/clients/csharp/Client/src/Microsoft.AspNetCore.SignalR.Client.csproj index edeac1edd808..de0d7377e23b 100644 --- a/src/SignalR/clients/csharp/Client/src/Microsoft.AspNetCore.SignalR.Client.csproj +++ b/src/SignalR/clients/csharp/Client/src/Microsoft.AspNetCore.SignalR.Client.csproj @@ -4,6 +4,7 @@ Client for ASP.NET Core SignalR $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0 enable + true diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj b/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj index e79a1fd7bdba..2a04e266f950 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj @@ -4,6 +4,7 @@ Client for ASP.NET Core Connection Handlers $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0;netstandard2.1 enable + true diff --git a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj index 0ee7265d3820..1070faf71fd8 100644 --- a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj +++ b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj @@ -8,9 +8,12 @@ Microsoft.AspNetCore.SignalR true enable + true + + diff --git a/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs b/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs index 16299dd504c3..35fdbf90f1a3 100644 --- a/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs +++ b/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs @@ -611,7 +611,7 @@ private void WriteCompletionMessage(CompletionMessage message, Utf8JsonWriter wr } else { - JsonSerializer.Serialize(writer, message.Result, _payloadSerializerOptions); + SerializeObject(writer, message.Result); } } } @@ -633,7 +633,7 @@ private void WriteStreamItemMessage(StreamItemMessage message, Utf8JsonWriter wr } else { - JsonSerializer.Serialize(writer, message.Item, _payloadSerializerOptions); + SerializeObject(writer, message.Item); } } @@ -691,7 +691,7 @@ private void WriteArguments(object?[] arguments, Utf8JsonWriter writer) } else { - JsonSerializer.Serialize(writer, argument, _payloadSerializerOptions); + SerializeObject(writer, argument); } } writer.WriteEndArray(); @@ -827,10 +827,7 @@ private static HubMessage BindInvocationMessage(string? invocationId, string tar return BindType(ref reader, type); } - private object? BindType(ref Utf8JsonReader reader, Type type) - { - return JsonSerializer.Deserialize(ref reader, type, _payloadSerializerOptions); - } + private object? BindType(ref Utf8JsonReader reader, Type type) => DeserializeObject(ref reader, type); private object?[] BindTypes(ref Utf8JsonReader reader, IReadOnlyList paramTypes) { @@ -914,6 +911,15 @@ private static HubMessage ApplyHeaders(HubMessage message, Dictionary JsonSerializer.Serialize(writer, value, _payloadSerializerOptions); + + [UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode", Justification = "See SerializeObject Justification above.")] + [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")] + private object? DeserializeObject(ref Utf8JsonReader reader, Type type) => JsonSerializer.Deserialize(ref reader, type, _payloadSerializerOptions); + internal static JsonSerializerOptions CreateDefaultSerializerSettings() { return new JsonSerializerOptions() diff --git a/src/SignalR/common/Shared/ReflectionHelper.cs b/src/SignalR/common/Shared/ReflectionHelper.cs index e310fa31b835..70351533572f 100644 --- a/src/SignalR/common/Shared/ReflectionHelper.cs +++ b/src/SignalR/common/Shared/ReflectionHelper.cs @@ -15,7 +15,7 @@ internal static class ReflectionHelper { // mustBeDirectType - Hub methods must use the base 'stream' type and not be a derived class that just implements the 'stream' type // and 'stream' types from the client are allowed to inherit from accepted 'stream' types - public static bool IsStreamingType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type type, bool mustBeDirectType = false) + public static bool IsStreamingType(Type type, bool mustBeDirectType = false) { // TODO #2594 - add Streams here, to make sending files easy @@ -47,26 +47,28 @@ public static bool TryGetStreamType(Type streamType, [NotNullWhen(true)] out Typ return false; } - public static bool IsIAsyncEnumerable([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type type) + public static bool IsIAsyncEnumerable(Type type) => GetIAsyncEnumerableInterface(type) is not null; + + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", + Justification = "The 'IAsyncEnumerable<>' Type must exist and so trimmer kept it. In which case " + + "It also kept it on any type which implements it. The below call to GetInterfaces " + + "may return fewer results when trimmed but it will return 'IAsyncEnumerable<>' " + + "if the type implemented it, even after trimming.")] + public static Type? GetIAsyncEnumerableInterface(Type type) { - if (type.IsGenericType) + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) { - if (type.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) - { - return true; - } + return type; } - return type.GetInterfaces().Any(t => + foreach (Type typeToCheck in type.GetInterfaces()) { - if (t.IsGenericType) + if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) { - return t.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>); + return typeToCheck; } - else - { - return false; - } - }); + } + + return null; } } From a3990b7bc5030ee7c8e0f850e9fccf79cae8a495 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Mon, 10 Jun 2024 15:05:09 -0700 Subject: [PATCH 033/257] Don't require latest runtime patch for Blazor DevServer (#56123) --- eng/Versions.props | 1 - ...soft.AspNetCore.Components.WebAssembly.DevServer.csproj | 2 +- .../DevServer/src/blazor-devserver.runtimeconfig.json.in | 2 +- .../sample/ConcurrencyLimiterSample.csproj | 5 ----- src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj | 7 ------- src/ProjectTemplates/GenerateContent.targets | 6 ------ src/SiteExtensions/Sdk/SiteExtension.targets | 2 -- 7 files changed, 2 insertions(+), 23 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 96e5c1a2ecab..e7c7cb717fc1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -334,7 +334,6 @@ $(XunitVersion) 2.4.3 4.0.5 - 6.0.0-preview.3.21167.1 1.6.13 1.6.13 diff --git a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj index 8267a699183b..2030028ff87f 100644 --- a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj +++ b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj @@ -37,7 +37,7 @@ <_RuntimeConfigProperties> - SharedFxVersion=$(SharedFxVersion); + AspNetCoreMajorMinorVersion=$(AspNetCoreMajorMinorVersion); <_RuntimeConfigPath>$(OutputPath)blazor-devserver.runtimeconfig.json diff --git a/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in b/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in index f8e3bd9f0df2..352baf2b524a 100644 --- a/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in +++ b/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in @@ -3,7 +3,7 @@ "tfm": "net9.0", "framework": { "name": "Microsoft.AspNetCore.App", - "version": "${SharedFxVersion}" + "version": "${AspNetCoreMajorMinorVersion}.0" }, "rollForwardOnNoCandidateFx": 2 } diff --git a/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj b/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj index 94dfd9b47f31..a7f5b4921686 100644 --- a/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj +++ b/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj @@ -9,9 +9,4 @@ - - - - - diff --git a/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj b/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj index b61abeb404b4..bc66454704e8 100644 --- a/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj +++ b/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj @@ -30,11 +30,4 @@ - - - - - - - diff --git a/src/ProjectTemplates/GenerateContent.targets b/src/ProjectTemplates/GenerateContent.targets index e7e822235e53..3c216eedf91f 100644 --- a/src/ProjectTemplates/GenerateContent.targets +++ b/src/ProjectTemplates/GenerateContent.targets @@ -4,12 +4,6 @@ <_GenerateContentPropertiesHashFile>$(IntermediateOutputPath)$(MSBuildProjectName).content.g.cache - - - - $(GeneratedContentProperties); - MicrosoftAspNetCoreAppVersion=$(SharedFxVersion); - diff --git a/src/SiteExtensions/Sdk/SiteExtension.targets b/src/SiteExtensions/Sdk/SiteExtension.targets index 2fa12f51e2a5..8c10d2e7ca08 100644 --- a/src/SiteExtensions/Sdk/SiteExtension.targets +++ b/src/SiteExtensions/Sdk/SiteExtension.targets @@ -85,7 +85,6 @@ HostingStartupPackageName=%(_HostingStartupPackageReference.Identity); HostingStartupVersion=%(_HostingStartupPackageReference.Version); RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion); - MicrosoftAspNetCoreAppVersion=$(SharedFxVersion); UseAppHost=false; NoBuild=false; RestoreAdditionalProjectSources=$(_RsRestoreSources)" /> @@ -97,7 +96,6 @@ HostingStartupPackageName=%(_HostingStartupPackageReference.Identity); HostingStartupVersion=%(_HostingStartupPackageReference.Version); RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion); - MicrosoftAspNetCoreAppVersion=$(SharedFxVersion); UseAppHost=false; NoBuild=false; IncludeMainProjectInDepsFile=false" /> From 7df092d1d13692097507fcfe2c1eecdb923daa08 Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman2@users.noreply.github.com> Date: Tue, 11 Jun 2024 02:46:12 +0000 Subject: [PATCH 034/257] ASP0022 - Fix false positive for groups without using intermediate variables (#56116) Co-authored-by: James Newton-King --- .../RouteHandlers/DetectAmbiguousRoutes.cs | 95 ++++++++++++- .../DetectAmbiguousMappedRoutesTest.cs | 126 ++++++++++++++++-- 2 files changed, 212 insertions(+), 9 deletions(-) diff --git a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/RouteHandlers/DetectAmbiguousRoutes.cs b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/RouteHandlers/DetectAmbiguousRoutes.cs index 18ccea7deacc..23c644e28979 100644 --- a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/RouteHandlers/DetectAmbiguousRoutes.cs +++ b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/RouteHandlers/DetectAmbiguousRoutes.cs @@ -173,9 +173,42 @@ public bool Equals(MapOperationGroupKey other) ParentOperation != null && Equals(ParentOperation, other.ParentOperation) && Builder != null && - SymbolEqualityComparer.Default.Equals((Builder as ILocalReferenceOperation)?.Local, (other.Builder as ILocalReferenceOperation)?.Local) && + AreBuildersEqual(Builder, other.Builder) && AmbiguousRoutePatternComparer.Instance.Equals(RoutePattern, other.RoutePattern) && HasMatchingHttpMethods(HttpMethods, other.HttpMethods); + + static bool AreBuildersEqual(IOperation builder, IOperation? other) + { + if (builder is ILocalReferenceOperation local && other is ILocalReferenceOperation otherLocal) + { + // The builders are both local variables. + return SymbolEqualityComparer.Default.Equals(local.Local, otherLocal.Local); + } + + if (builder is IParameterReferenceOperation parameter && other is IParameterReferenceOperation otherParameter) + { + // The builders are both parameter variables. + return SymbolEqualityComparer.Default.Equals(parameter.Parameter, otherParameter.Parameter); + } + + if (builder is IInvocationOperation invocation && other is IInvocationOperation otherInvocation) + { + if (invocation.TargetMethod.Name == "MapGroup" && + invocation.TargetMethod.Parameters.Length == 2 && + SymbolEqualityComparer.Default.Equals(invocation.TargetMethod, otherInvocation.TargetMethod) && + invocation.Arguments.Length == 2 && + otherInvocation.Arguments.Length == 2) + { + // The builders are both method calls. Special case checking known MapGroup method. + // For example, two MapGroup calls with the same route are considered equal: + // builder.MapGroup("/v1").MapGet("account") + // builder.MapGroup("/v1").MapGet("account") + return AreArgumentsEqual(invocation.TargetMethod, invocation.Arguments, otherInvocation.Arguments); + } + } + + return false; + } } private static bool HasMatchingHttpMethods(ImmutableArray httpMethods1, ImmutableArray httpMethods2) @@ -199,6 +232,66 @@ private static bool HasMatchingHttpMethods(ImmutableArray httpMethods1, return false; } + private static bool AreArgumentsEqual(IMethodSymbol method, ImmutableArray arguments1, ImmutableArray arguments2) + { + for (var i = 0; i < method.Parameters.Length; i++) + { + var argument1 = GetParameterArgument(method.Parameters[i], arguments1); + var argument2 = GetParameterArgument(method.Parameters[i], arguments2); + + if (argument1 is ILocalReferenceOperation local && argument2 is ILocalReferenceOperation otherLocal) + { + if (!SymbolEqualityComparer.Default.Equals(local.Local, otherLocal.Local)) + { + return false; + } + } + else if (argument1 is IParameterReferenceOperation parameter && argument2 is IParameterReferenceOperation otherParameter) + { + if (!SymbolEqualityComparer.Default.Equals(parameter.Parameter, otherParameter.Parameter)) + { + return false; + } + } + else if (argument1 is ILiteralOperation literal && argument2 is ILiteralOperation otherLiteral) + { + if (!Equals(literal.ConstantValue, otherLiteral.ConstantValue)) + { + return false; + } + } + else + { + return false; + } + } + + return true; + + static IOperation? GetParameterArgument(IParameterSymbol parameter, ImmutableArray arguments) + { + for (var i = 0; i < arguments.Length; i++) + { + if (SymbolEqualityComparer.Default.Equals(arguments[i].Parameter, parameter)) + { + return WalkDownConversion(arguments[i].Value); + } + } + + return null; + } + } + + private static IOperation WalkDownConversion(IOperation operation) + { + while (operation is IConversionOperation conversionOperation) + { + operation = conversionOperation.Operand; + } + + return operation; + } + public override int GetHashCode() { return (ParentOperation?.GetHashCode() ?? 0) ^ AmbiguousRoutePatternComparer.Instance.GetHashCode(RoutePattern); diff --git a/src/Framework/AspNetCoreAnalyzers/test/RouteHandlers/DetectAmbiguousMappedRoutesTest.cs b/src/Framework/AspNetCoreAnalyzers/test/RouteHandlers/DetectAmbiguousMappedRoutesTest.cs index e6e76831f757..c676ab25c308 100644 --- a/src/Framework/AspNetCoreAnalyzers/test/RouteHandlers/DetectAmbiguousMappedRoutesTest.cs +++ b/src/Framework/AspNetCoreAnalyzers/test/RouteHandlers/DetectAmbiguousMappedRoutesTest.cs @@ -20,7 +20,8 @@ public async Task DuplicateRoutes_SameHttpMethod_HasDiagnostics() void Hello() { } "; - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -43,7 +44,8 @@ public async Task DuplicateRoutes_SameHttpMethod_HasRequestDelegate_HasDiagnosti void Hello() { } "; - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -71,7 +73,8 @@ void RegisterEndpoints(IEndpointRouteBuilder builder) void Hello() { } "; - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -140,7 +143,8 @@ public async Task DuplicateRoutes_InsideSwitchStatement_HasDiagnostics() void Hello() { } "; - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -254,7 +258,8 @@ public async Task DuplicateMapGetRoutes_DuplicatesInsideConditional_NoDiagnostic void Hello() { } "; - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -361,6 +366,110 @@ void Hello() { } await VerifyCS.VerifyAnalyzerAsync(source); } + [Fact] + public async Task DuplicateRoutes_MultipleGroups_DirectInvocation_NoDiagnostics() + { + // Arrange + var source = @" +using Microsoft.AspNetCore.Builder; +var app = WebApplication.Create(); +app.MapGroup(""/group1"").MapGet(""/"", () => { }); +app.MapGroup(""/group2"").MapGet(""/"", () => { }); +"; + + // Act & Assert + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task DuplicateRoutes_SingleGroup_DifferentBuilderVariable_DirectInvocation_NoDiagnostics() + { + // Arrange + var source = @" +using Microsoft.AspNetCore.Builder; +var app1 = WebApplication.Create(); +var app2 = app1; +app1.MapGroup(""/group1"").MapGet(""/"", () => { }); +app2.MapGroup(""/group1"").MapGet(""/"", () => { }); +"; + + // Act & Assert + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task DuplicateRoutes_SingleGroup_DirectInvocation_HasDiagnostics() + { + // Arrange + var source = @" +using Microsoft.AspNetCore.Builder; +var app = WebApplication.Create(); +app.MapGroup(""/group1"").MapGet({|#0:""/""|}, () => { }); +app.MapGroup(""/group1"").MapGet({|#1:""/""|}, () => { }); +"; + + // Act & Assert + var expectedDiagnostics = new[] + { + new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) + }; + + await VerifyCS.VerifyAnalyzerAsync(source, expectedDiagnostics); + } + + [Fact] + public async Task DuplicateRoutes_SingleGroup_DirectInvocation_InMethod_HasDiagnostics() + { + // Arrange + var source = @" +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Routing; +var app = WebApplication.Create(); +void RegisterEndpoints(IEndpointRouteBuilder builder) +{ + builder.MapGroup(""/group1"").MapGet({|#0:""/""|}, () => { }); + builder.MapGroup(""/group1"").MapGet({|#1:""/""|}, () => { }); +} + +RegisterEndpoints(app); + +void Hello() { } +"; + + var expectedDiagnostics = new[] + { + new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) + }; + + // Act & Assert + await VerifyCS.VerifyAnalyzerAsync(source, expectedDiagnostics); + } + + [Fact] + public async Task DuplicateRoutes_SingleGroup_RoutePattern_DirectInvocation_HasDiagnostics() + { + // Arrange + var source = @" +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Routing.Patterns; +var routePattern = RoutePatternFactory.Parse(""/group1""); +var app = WebApplication.Create(); +app.MapGroup(routePattern).MapGet({|#0:""/""|}, () => { }); +app.MapGroup(routePattern).MapGet({|#1:""/""|}, () => { }); +"; + + // Act & Assert + var expectedDiagnostics = new[] + { + new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) + }; + + await VerifyCS.VerifyAnalyzerAsync(source, expectedDiagnostics); + } + [Fact] public async Task DuplicateRoutes_EndpointsOnGroup_HasDiagnostics() { @@ -377,7 +486,8 @@ void Hello() { } "; // Act & Assert - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -409,7 +519,8 @@ public async Task DuplicateRoutes_AllowedBuilderExtensionMethods_HasDiagnostics( void Hello() { } "; - var expectedDiagnostics = new[] { + var expectedDiagnostics = new[] + { new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(0), new DiagnosticResult(DiagnosticDescriptors.AmbiguousRouteHandlerRoute).WithArguments("/").WithLocation(1) }; @@ -440,4 +551,3 @@ void Hello() { } await VerifyCS.VerifyAnalyzerAsync(source); } } - From 2b5d2b36a04f3a4a9bb20bbca38617d1cd6a3a1a Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Tue, 11 Jun 2024 18:10:04 +1000 Subject: [PATCH 035/257] Unquarantine HtmlGenerationWithCultureTest.CacheTagHelper_VaryByCultureComposesWithOtherVaryByOptions (#55858) Resolves #4907 --- .../test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs index 474388dc01df..8cef176a1549 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs @@ -127,7 +127,6 @@ void ReadValuesFromDocument() } [Fact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/4907")] public async Task CacheTagHelper_VaryByCultureComposesWithOtherVaryByOptions() { // Arrange From 0991dc1b3a275e83986c16f03e4d8c7c8e0ce169 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Tue, 11 Jun 2024 20:26:37 +0200 Subject: [PATCH 036/257] [Infrastructure] Updated npm package cache 2024-06-11 (#56186) --- package-lock.json | 2822 +++++++++++++++------------------ src/submodules/Node-Externals | 2 +- 2 files changed, 1246 insertions(+), 1578 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a95006858b1..a27e12d08bd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,15 +38,6 @@ "npm": ">=9.3.1" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha1-vZFUrsmYP3ezoDTsqgFcLkIB9s8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -61,31 +52,31 @@ } }, "node_modules/@azure/msal-browser": { - "version": "2.38.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@azure/msal-browser/-/msal-browser-2.38.3.tgz", - "integrity": "sha1-LxMfqbeoqVRvyNNOXZnOTBiwQUc=", + "version": "2.39.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@azure/msal-browser/-/msal-browser-2.39.0.tgz", + "integrity": "sha1-aE/Tl0wmKLLf/QSkyEFqCUW0K2k=", "dependencies": { - "@azure/msal-common": "13.3.1" + "@azure/msal-common": "13.3.3" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "13.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@azure/msal-common/-/msal-common-13.3.1.tgz", - "integrity": "sha1-ASRlv5QNEjddxHOHt1TM+da5IYA=", + "version": "13.3.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@azure/msal-common/-/msal-common-13.3.3.tgz", + "integrity": "sha1-tJY8nloWTtiQsgS+ywNjA8z09qw=", "engines": { "node": ">=0.8.0" } }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha1-cYtLGYQYCaWLKbaM3oC8Xhqm2a4=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha1-iC/Z4J6O4yTklr0EBAHG8EbvRGU=", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.2", + "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" }, "engines": { @@ -93,30 +84,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha1-McH2ZDXyqcMpu1cWptYYbFFsN0I=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha1-0ju+pQjDiDuoJR+0FkmCw26ld+0=", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha1-VohkJH6hD71O/wTdoeBfni6phcM=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha1-tnZFAUHgtSo9Q7yR2oaqYI+VCsQ=", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -132,9 +123,9 @@ } }, "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -155,12 +146,12 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha1-5n4G9oVopOvxlNHGAUI1NE8EdtA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha1-FlTQHeIK1mtLTZnBNUcbxlTFXm0=", "dev": true, "dependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.7", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -170,37 +161,38 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha1-5/BnN7GX1YCgHt912X4si+mdOII=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", + "integrity": "sha1-U3PHvINmsSoDO0vhrBOiBsZlaqs=", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.15", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", - "integrity": "sha1-VCaxCc861HuREg+DKNirG+iwuVY=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", + "integrity": "sha1-N9Zv6wEgJPJCK3Yrmyp8/ifH+6M=", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha1-TXkGmxbLzxRhKJ7M+72BUBrjmZE=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha1-TrbEqA1v/qwlq4zZohtd+kjVA6k=", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -210,19 +202,19 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.1.tgz", - "integrity": "sha1-21i/VxN7YjuRbiSHSrcYjZPX9o8=", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz", + "integrity": "sha1-Lq7TazocEcU734DVODiyk8UvWzs=", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.7", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", "semver": "^6.3.1" }, "engines": { @@ -233,12 +225,12 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.22.15", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", - "integrity": "sha1-XukAk5FOoJY5sBxxHbDWd15Vi+E=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz", + "integrity": "sha1-vk9DWoDcKwU8du60t9Ft0iz8ido=", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-annotate-as-pure": "^7.24.7", "regexpu-core": "^5.3.1", "semver": "^6.3.1" }, @@ -250,9 +242,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.1.tgz", - "integrity": "sha1-+txj8ML/PI0C7ZBdzqdHxbD7dP0=", + "version": "0.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha1-GFlPeJw1lKyyTP20p/e30ui9kS0=", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -266,9 +258,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -289,74 +281,79 @@ "dev": true }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha1-lhWdth00op26RUyVn1rkpkm6kWc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha1-SzG6lVHR+QeBuoNJHdWc+bJp99k=", "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha1-H5o829WyaYpnDDDSc1+a+V7VJ1k=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha1-dfHhcldC85rGWE7gsW2UUT2jjdI=", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha1-wBoAfawFwIWRTo+2UrM521DYI7s=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha1-tO3hzeL9iUNjl/MNyTdu4GsPJe4=", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.23.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", - "integrity": "sha1-kmPojMXkHTnsGMmj4OztWaPn02Y=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz", + "integrity": "sha1-Z2E9BoYVpw5O1RAQma/8ekHFIl8=", "dev": true, "dependencies": { - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha1-asR25tFox8I/87o89PeEHUasgSg=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha1-8vmAOS3luEwzKPxx04vYG7uDBCs=", "dev": true, "dependencies": { - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha1-19EsPF0wr1s8D8qyptUhd3Pi0PE=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha1-MbbJopMGeUmNtltoWxaYv9bH2vg=", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -366,35 +363,35 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha1-8hUxqcy/9kT90Va0B3wW/ww/YJ4=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", + "integrity": "sha1-iwoEVskvazI9J8/QDR1mTnZpKg8=", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha1-lFaBkxpS8Vzoef1bhs4trm09fyo=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha1-mMhP5v49DTrnv8Ol4WakaET+sqA=", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.20", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", - "integrity": "sha1-e2jhy0+pZNKZb9Bjcj+0jsqEmOA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz", + "integrity": "sha1-s/DyA2KFInE4SdSUA/GkFEaL5Mc=", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-wrap-function": "^7.22.20" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-wrap-function": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -404,14 +401,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", - "integrity": "sha1-cIW9GdSgt+2PQFwe1zzLcPMjq8E=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz", + "integrity": "sha1-+TO37tgaHAJldA7ckUkc5RJQ92U=", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.7", + "@babel/helper-optimise-call-expression": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -421,103 +418,105 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha1-STg1fcfXgrgO1tuwOg+6PSKx1d4=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha1-vK3o2jrsjtFrnElTt05Qa1G17bM=", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha1-AH8VJAtXUcU3xA53q7TonuqqiEc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", + "integrity": "sha1-X4+oO2ntXCetxWBE+L4rPqlmadk=", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha1-MixhtzEMCZf+TDI5VWZ/GPzvuRw=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha1-g5SUNokOB/o9aHPGGpbju/aS2FY=", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha1-+Zw201k9uVQHBdBzmh8QteIMaW4=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha1-TS0PFIIO3juYB+pfw238jNfaB/I=", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha1-xK4ALGHSh55yRYHZZmVYPbwdwOA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha1-dbiJz6+eNcKq9Czw1yyOkXGSUds=", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha1-kHo/vUUjQmKFNl0SBsQjxMVSAwc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha1-JMO7d8ekJdF0LuyPtDO1obOOYvY=", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.22.20", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", - "integrity": "sha1-FTUrC5v7EPycdvefY0LADjQRpWk=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz", + "integrity": "sha1-UtiTr35C7cp8bSxnZFSYJjNqrh8=", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.15", - "@babel/types": "^7.22.19" + "@babel/helper-function-name": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha1-GD5EcUueujbDA45EJRZYex4KGpQ=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha1-qizNop9iGFrLXUL7SjobEIIQdBY=", "dev": true, "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha1-P1OVA+/IPTxZCAoQ5mNDBuA3DSY=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha1-oFqx3xNLKGVYquDtQebF9zG/QJ0=", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -527,9 +526,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha1-HkFtNic5P6sctbDy8XlqEArpEzo=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha1-mlIm+S8MXI6tVQt1D1YI52bIzoU=", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -538,13 +537,29 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz", + "integrity": "sha1-/QWf0nsYTqK0x+ZGhoqaOBu8MFU=", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.1.tgz", - "integrity": "sha1-tkXZuowrxbevUPD+lJ+e2+sHyM8=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz", + "integrity": "sha1-RoCWykS7y+j8xXBXThLrGVDhgQc=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -554,14 +569,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.1.tgz", - "integrity": "sha1-2oJh8ml/D0GwhVuR06IKH7/ScdM=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", + "integrity": "sha1-5Oq91RCazDmbONeZmy72b8ICL4k=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.24.1" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -571,13 +586,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.1.tgz", - "integrity": "sha1-EYHZaFmEyR1le43fFPBIemurKYg=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz", + "integrity": "sha1-cbIbsChtWBDmOhU4qpAcWOhzdew=", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -674,12 +689,12 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.1.tgz", - "integrity": "sha1-2zqtckFToA6qwRWj+4mN5UTjSXE=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", + "integrity": "sha1-KgtAa1hxogqEEkBYaxMAziCIp3g=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -689,12 +704,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.1.tgz", - "integrity": "sha1-xmuWbGO3FMTuxQj89XY7Hy04EJM=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", + "integrity": "sha1-tPnqlaeeaRJIDEtiZzn4agdmJMo=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -728,12 +743,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", - "integrity": "sha1-P2ygS4yEGBHbw8XF+DeTTg1ibBA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha1-OaH6Sn49PX804qzGvlhbcY0w4C0=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -845,12 +860,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", - "integrity": "sha1-s7zFHzltFfNZFoP5AjneFDwHaEQ=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha1-WNRYJxtNO2uyfuaslSWsuyWbrRw=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -876,12 +891,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.1.tgz", - "integrity": "sha1-K/JjYXBgycxFvNv0krjMgFCCvyc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", + "integrity": "sha1-T2iGwR5CO9afPOUdv0JCSl8nVRQ=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -891,14 +906,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.24.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.3.tgz", - "integrity": "sha1-j6euSBsQB2jMmELIYXgIxTUri4k=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz", + "integrity": "sha1-czClxQ4FGBylI1G4/QFkIADJbP0=", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-remap-async-to-generator": "^7.22.20", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -909,14 +924,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.1.tgz", - "integrity": "sha1-DiIHA7ifIhaADOexxTywz1IcN/Q=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", + "integrity": "sha1-cqOvbEUdV1hCp+m1oChjQUNVvcw=", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-remap-async-to-generator": "^7.22.20" + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -926,12 +941,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.1.tgz", - "integrity": "sha1-HJR5niD81cTUWJUju8V7dpKXk4A=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", + "integrity": "sha1-pCUdmOoMDzmdr+GjWAHqukVbvx8=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -941,12 +956,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.1.tgz", - "integrity": "sha1-J68YPX9trYkFMSVsekUBnfdorB8=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz", + "integrity": "sha1-QgY+TeuFDHvXxV5ia/Tnq0jmzgI=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -956,13 +971,13 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.1.tgz", - "integrity": "sha1-vL8a72umCFz93sn8jViHHPAR/Ck=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", + "integrity": "sha1-JWh5RntXsLaMfd/Ft2WE85jNaDQ=", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -972,13 +987,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.1.tgz", - "integrity": "sha1-TjfvzKHZ8vy5CNG66LVrS26eHLY=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", + "integrity": "sha1-yCAn67cBC8M8EW1LUET7v4wFSE0=", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -989,18 +1004,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.1.tgz", - "integrity": "sha1-W8j8Fg7ZY3gYS8EAQq9H9QiE3LE=", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-split-export-declaration": "^7.22.6", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz", + "integrity": "sha1-SubvQ6EkkhNBOMHkWRP3xGxBtL8=", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", "globals": "^11.1.0" }, "engines": { @@ -1011,13 +1026,13 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.1.tgz", - "integrity": "sha1-vH54f44CHsz7Z3r18TwpqZNO2Kc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", + "integrity": "sha1-TKsyFOgLxx+uOFMjjRPQl7AExwc=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/template": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/template": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1027,12 +1042,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.1.tgz", - "integrity": "sha1-segkOvSgIGhBlzeGKSuMjdhEc0U=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz", + "integrity": "sha1-oJfyUpLe+25swW1jM6TPwePHLZ4=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1042,13 +1057,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.1.tgz", - "integrity": "sha1-1WkT0vEnlcyZMIAbhMb4xHUTrBM=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", + "integrity": "sha1-X4v4poDyEWpyB+FiiKX5dK1Hp6A=", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1058,12 +1073,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.1.tgz", - "integrity": "sha1-U0enl/6CuNCXSdEOn1uDZlrbyog=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", + "integrity": "sha1-3SAQKJfJojJOWt//tn/zYQNZqO4=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1073,12 +1088,12 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.1.tgz", - "integrity": "sha1-KlpJlZIBlw3Qml/KhWy2UeREOd0=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", + "integrity": "sha1-TYuV47risDdnMJGqCc0z/s1kGfQ=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -1089,13 +1104,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.1.tgz", - "integrity": "sha1-ZlDr61vVwBLV9fkKJmE6CBYui6Q=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", + "integrity": "sha1-tinuImRfQSAkKX1SRbzkJcMfmw0=", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1105,12 +1120,12 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.1.tgz", - "integrity": "sha1-8DNUH8A24++y3LWO7a/U9rgHis0=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", + "integrity": "sha1-F21S2NjtUWrq5wE+6VVtVAxT8Zc=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -1121,13 +1136,13 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.1.tgz", - "integrity": "sha1-Z0SERrZ6tsCRNgzjcX59OlniAv0=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", + "integrity": "sha1-8lsz9y3x2L52OZ4bjz+dNm61vHA=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1137,14 +1152,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.1.tgz", - "integrity": "sha1-jLpvdzBibMTf5MovpRYhWgWSs2E=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz", + "integrity": "sha1-bYYB+//mZciURAq0RwvHId2RMdY=", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1154,12 +1169,12 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.1.tgz", - "integrity": "sha1-COY2m2KrPop7YQiRUbFhGAyCmfc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", + "integrity": "sha1-8+nDfAo3P+6G42iA1Fs2ZM7a9zo=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -1170,12 +1185,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.1.tgz", - "integrity": "sha1-ChmCKXr4Pms8lJcmhgZ99YjFwJY=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz", + "integrity": "sha1-NrUFweZVFRqddgd5mpmI/FRn0Gw=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1185,12 +1200,12 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.1.tgz", - "integrity": "sha1-cZ2K3tGqlLj7NOOnha6FGOJM+kA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", + "integrity": "sha1-pY+27aFsncj5/xx7G6bet/RpTLA=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -1201,12 +1216,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.1.tgz", - "integrity": "sha1-iW0jYByS9DeviwE3GtNL63XfRIk=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", + "integrity": "sha1-O0RU+w4wLhi6SUW6MkassSSDFd8=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1216,13 +1231,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.1.tgz", - "integrity": "sha1-ttgp7RUlhTaXfpx8xkN4FIcf+jk=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", + "integrity": "sha1-ZQkO1JPEqDSXajyhzed25sz/Mtc=", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1232,14 +1247,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", - "integrity": "sha1-5xuh0NaeBJoiv5Czhn4mOCPT8bk=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz", + "integrity": "sha1-n9X3/a3ukIWIaxg/GtE9GrJg9Ks=", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-simple-access": "^7.22.5" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1249,15 +1264,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.1.tgz", - "integrity": "sha1-K5Ylo9TkRbq6yXiNrsOQlOaxHj4=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz", + "integrity": "sha1-+AEjFsUJj26N7m7NWOK8bwA9DOc=", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1267,13 +1282,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.1.tgz", - "integrity": "sha1-aSIMZmU6Gc8sCHK5x2K5pIuL6+8=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", + "integrity": "sha1-7dn0PsVJCZYg333yTnuhO1x278g=", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1283,13 +1298,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.22.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", - "integrity": "sha1-Z/4Y7ozgLVfIVRheJ+PclZsumR8=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", + "integrity": "sha1-kELpuFa8azaIwMLkBg6eELFGCSM=", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1299,12 +1314,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.1.tgz", - "integrity": "sha1-KcWZiPo9AVfeHIcaKM2DCWNjzDQ=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", + "integrity": "sha1-Mf9UxOBVXMVJ1YFuSrOSQd+2qwA=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1314,12 +1329,12 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.1.tgz", - "integrity": "sha1-DNSUu5fLB9QovWUWMsudQUBROYg=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", + "integrity": "sha1-HeRTTFkK+VlvU9Z/UqkvEtuYQSA=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -1330,12 +1345,12 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.1.tgz", - "integrity": "sha1-W8AZzls0NcHK3zchXlXkM9Z01Og=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", + "integrity": "sha1-vqYrU4yAYF2KD6ybQPSOl++n3mM=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -1346,15 +1361,15 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.1.tgz", - "integrity": "sha1-WjznPK8OeHGgLhwx6LRzCTryQf8=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", + "integrity": "sha1-0Tork0Na64oZfhFSIcqyZrpuVdY=", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.1" + "@babel/plugin-transform-parameters": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1364,13 +1379,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.1.tgz", - "integrity": "sha1-5x1qsTSDzKie2VpHT1Qrv8IKBSA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", + "integrity": "sha1-Zu6v94MLupRd2JibYypAwE7WJb4=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-replace-supers": "^7.24.1" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1380,12 +1395,12 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.1.tgz", - "integrity": "sha1-kqPQ7+hHunIvGkUIZpsjE0Zp4to=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", + "integrity": "sha1-AOq9iD0N1qYMHFV1SHhZGbbnF7Q=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -1396,13 +1411,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.1.tgz", - "integrity": "sha1-JuWIrL7c4as1GaxAzHSOOAxSkeY=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz", + "integrity": "sha1-uPaEioDPLamKiiBEKb7AR1bG1FQ=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { @@ -1413,12 +1428,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.1.tgz", - "integrity": "sha1-mDwV0RTaGQUGx1thbOsPgXr8xRA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", + "integrity": "sha1-WIHwriEBhADjIPx+uBflKdElS2g=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1428,13 +1443,13 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.1.tgz", - "integrity": "sha1-oPqhrofv8Hfh5HpeyBw67zg9wVo=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", + "integrity": "sha1-5jGHRrKucKWdAj1cwTRKK6enX14=", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1444,14 +1459,14 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.1.tgz", - "integrity": "sha1-dWRD1AAnT4+3iWdClizBufJcH2o=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", + "integrity": "sha1-TuxrxwEojB+rX3LmpLvJ1n+soGE=", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1462,12 +1477,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.1.tgz", - "integrity": "sha1-1qmuq5bwN0n07r6wtuqOkOyViCU=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", + "integrity": "sha1-8NLtg4DfvtlJxC1NeQJmUl1ju9w=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1477,12 +1492,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.1.tgz", - "integrity": "sha1-Ylt1RbrlI2O9wfu9xyUrUEZAnIw=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", + "integrity": "sha1-AhVi3kU02LSxhRdZ/Xr04F0sR/g=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-plugin-utils": "^7.24.7", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1493,12 +1508,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.1.tgz", - "integrity": "sha1-jecp9ey6r1z4O2feE7rTiiG+V8E=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", + "integrity": "sha1-gAN/5PvwMfwRJQIheP85OLs3Q6Q=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1508,12 +1523,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.1.tgz", - "integrity": "sha1-upoJFEz1XTXsa5OjIlO+ytjuW1U=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", + "integrity": "sha1-hUSMa5luEi+p4ol0YUCqqZ2mTnM=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1523,13 +1538,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.1.tgz", - "integrity": "sha1-oaz5FSy/aQ5NoLoQeQs6x9Kys5E=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", + "integrity": "sha1-6KOMD954guD7jxYDePdL2IXMe7M=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1539,12 +1554,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.1.tgz", - "integrity": "sha1-8D5nKRLG4gPtjW4CcdnCET3AMbk=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", + "integrity": "sha1-lq6A16flJR9le1zxjx6mv5JvX+s=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1554,12 +1569,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.1.tgz", - "integrity": "sha1-FeIWaHOjDYYX4+LMrbhmQ9Mnqrc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", + "integrity": "sha1-oF3rtKkHKuj5hbz3fz8hVDTI+Mg=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1569,12 +1584,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.1.tgz", - "integrity": "sha1-aDH3hkcIDewET36faAA9mUJPlMc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz", + "integrity": "sha1-8HS+RmWA1H1uaydHOoQMn5ygj7A=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1584,15 +1599,15 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.1.tgz", - "integrity": "sha1-XAXii7dsff59bFvtmVEyT9LTqwc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz", + "integrity": "sha1-sAaz4AlL8IE9UF4MVIVnnur0qIE=", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.24.1", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/plugin-syntax-typescript": "^7.24.1" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-typescript": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1602,12 +1617,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.1.tgz", - "integrity": "sha1-+z+hZnZUmsfHRJ25s0JhSYXCo6Q=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", + "integrity": "sha1-ICOoLO0ftJcWMKLgeXZFAsQUjg4=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1617,13 +1632,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.1.tgz", - "integrity": "sha1-VnBP1NmdqB5enwwMk8q9kdvEiJ4=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", + "integrity": "sha1-kHOkzRO4bqccMmRllZCsCGYFu80=", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1633,13 +1648,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.1.tgz", - "integrity": "sha1-V8PBkdaPmYrEa3CDgMHOTRNTY4U=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", + "integrity": "sha1-38PUpREnEICZsZgXwJY75qKt8Z8=", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1649,13 +1664,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.1.tgz", - "integrity": "sha1-weoXWwKvz/yc9XqcRlgyZiUWW38=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", + "integrity": "sha1-1AcF1nUjgDpXbinGPO9uUWuFjtk=", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.15", - "@babel/helper-plugin-utils": "^7.24.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1665,26 +1680,27 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.24.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-env/-/preset-env-7.24.3.tgz", - "integrity": "sha1-8/E4yET/7qw3JZeynFG1JZ6DI6M=", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.24.1", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.1", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.1", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.1", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-env/-/preset-env-7.24.7.tgz", + "integrity": "sha1-/wZ7TjC6SnLyJfEvEjFz53uYfzc=", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.1", - "@babel/plugin-syntax-import-attributes": "^7.24.1", + "@babel/plugin-syntax-import-assertions": "^7.24.7", + "@babel/plugin-syntax-import-attributes": "^7.24.7", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", @@ -1696,54 +1712,54 @@ "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.24.1", - "@babel/plugin-transform-async-generator-functions": "^7.24.3", - "@babel/plugin-transform-async-to-generator": "^7.24.1", - "@babel/plugin-transform-block-scoped-functions": "^7.24.1", - "@babel/plugin-transform-block-scoping": "^7.24.1", - "@babel/plugin-transform-class-properties": "^7.24.1", - "@babel/plugin-transform-class-static-block": "^7.24.1", - "@babel/plugin-transform-classes": "^7.24.1", - "@babel/plugin-transform-computed-properties": "^7.24.1", - "@babel/plugin-transform-destructuring": "^7.24.1", - "@babel/plugin-transform-dotall-regex": "^7.24.1", - "@babel/plugin-transform-duplicate-keys": "^7.24.1", - "@babel/plugin-transform-dynamic-import": "^7.24.1", - "@babel/plugin-transform-exponentiation-operator": "^7.24.1", - "@babel/plugin-transform-export-namespace-from": "^7.24.1", - "@babel/plugin-transform-for-of": "^7.24.1", - "@babel/plugin-transform-function-name": "^7.24.1", - "@babel/plugin-transform-json-strings": "^7.24.1", - "@babel/plugin-transform-literals": "^7.24.1", - "@babel/plugin-transform-logical-assignment-operators": "^7.24.1", - "@babel/plugin-transform-member-expression-literals": "^7.24.1", - "@babel/plugin-transform-modules-amd": "^7.24.1", - "@babel/plugin-transform-modules-commonjs": "^7.24.1", - "@babel/plugin-transform-modules-systemjs": "^7.24.1", - "@babel/plugin-transform-modules-umd": "^7.24.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.24.1", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.1", - "@babel/plugin-transform-numeric-separator": "^7.24.1", - "@babel/plugin-transform-object-rest-spread": "^7.24.1", - "@babel/plugin-transform-object-super": "^7.24.1", - "@babel/plugin-transform-optional-catch-binding": "^7.24.1", - "@babel/plugin-transform-optional-chaining": "^7.24.1", - "@babel/plugin-transform-parameters": "^7.24.1", - "@babel/plugin-transform-private-methods": "^7.24.1", - "@babel/plugin-transform-private-property-in-object": "^7.24.1", - "@babel/plugin-transform-property-literals": "^7.24.1", - "@babel/plugin-transform-regenerator": "^7.24.1", - "@babel/plugin-transform-reserved-words": "^7.24.1", - "@babel/plugin-transform-shorthand-properties": "^7.24.1", - "@babel/plugin-transform-spread": "^7.24.1", - "@babel/plugin-transform-sticky-regex": "^7.24.1", - "@babel/plugin-transform-template-literals": "^7.24.1", - "@babel/plugin-transform-typeof-symbol": "^7.24.1", - "@babel/plugin-transform-unicode-escapes": "^7.24.1", - "@babel/plugin-transform-unicode-property-regex": "^7.24.1", - "@babel/plugin-transform-unicode-regex": "^7.24.1", - "@babel/plugin-transform-unicode-sets-regex": "^7.24.1", + "@babel/plugin-transform-arrow-functions": "^7.24.7", + "@babel/plugin-transform-async-generator-functions": "^7.24.7", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoped-functions": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.24.7", + "@babel/plugin-transform-class-properties": "^7.24.7", + "@babel/plugin-transform-class-static-block": "^7.24.7", + "@babel/plugin-transform-classes": "^7.24.7", + "@babel/plugin-transform-computed-properties": "^7.24.7", + "@babel/plugin-transform-destructuring": "^7.24.7", + "@babel/plugin-transform-dotall-regex": "^7.24.7", + "@babel/plugin-transform-duplicate-keys": "^7.24.7", + "@babel/plugin-transform-dynamic-import": "^7.24.7", + "@babel/plugin-transform-exponentiation-operator": "^7.24.7", + "@babel/plugin-transform-export-namespace-from": "^7.24.7", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-function-name": "^7.24.7", + "@babel/plugin-transform-json-strings": "^7.24.7", + "@babel/plugin-transform-literals": "^7.24.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", + "@babel/plugin-transform-member-expression-literals": "^7.24.7", + "@babel/plugin-transform-modules-amd": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-modules-systemjs": "^7.24.7", + "@babel/plugin-transform-modules-umd": "^7.24.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-new-target": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-numeric-separator": "^7.24.7", + "@babel/plugin-transform-object-rest-spread": "^7.24.7", + "@babel/plugin-transform-object-super": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7", + "@babel/plugin-transform-parameters": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-property-literals": "^7.24.7", + "@babel/plugin-transform-regenerator": "^7.24.7", + "@babel/plugin-transform-reserved-words": "^7.24.7", + "@babel/plugin-transform-shorthand-properties": "^7.24.7", + "@babel/plugin-transform-spread": "^7.24.7", + "@babel/plugin-transform-sticky-regex": "^7.24.7", + "@babel/plugin-transform-template-literals": "^7.24.7", + "@babel/plugin-transform-typeof-symbol": "^7.24.7", + "@babel/plugin-transform-unicode-escapes": "^7.24.7", + "@babel/plugin-transform-unicode-property-regex": "^7.24.7", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.24.7", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.10", "babel-plugin-polyfill-corejs3": "^0.10.4", @@ -1773,16 +1789,16 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-typescript/-/preset-typescript-7.24.1.tgz", - "integrity": "sha1-ib3xOjFJoXs7KiycYlR/BtuIRew=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", + "integrity": "sha1-Zs2G6o+MAUhVZx1eqac3E5y7/vE=", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0", - "@babel/helper-validator-option": "^7.23.5", - "@babel/plugin-syntax-jsx": "^7.24.1", - "@babel/plugin-transform-modules-commonjs": "^7.24.1", - "@babel/plugin-transform-typescript": "^7.24.1" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-syntax-jsx": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -1798,9 +1814,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha1-Qx+aeU0XO1NyDmmmRkq8bw4qXFc=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha1-9PDVUw6NvfWbNFG5s+WUtroILhI=", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1810,33 +1826,33 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha1-xqUkqpOkoF1mqvMWVCWPrmnYfVA=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha1-Au/O4xfQYJ0sBxF8tw74+xercxU=", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha1-1lw2rJ3RcoIXXR5KPEnVt5iPUww=", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha1-3iuQAWP6dBchujghY/5GqTbEDPU=", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1845,9 +1861,9 @@ } }, "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1868,13 +1884,13 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha1-O5UfQ1qS5zM+ugW3Vm/Sl5YOob8=", + "version": "7.24.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha1-YCf+ErwapyTNMqsRP7fxmI8fZvI=", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1967,9 +1983,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha1-VI9t5VaFfIu3O77nDDXcgqLnTWM=", + "version": "4.10.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", + "integrity": "sha1-NhRh5cs4Rdh05hcxwRz+3WZNg6A=", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -2005,9 +2021,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2096,9 +2112,9 @@ } }, "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2132,9 +2148,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha1-2frgCi1ctA+Sz+ZLR610n7w4+Rc=", + "version": "2.0.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha1-Siho111taWPkI7z5C3/RvjQ0CdM=", "dev": true }, "node_modules/@isaacs/cliui": { @@ -2477,9 +2493,9 @@ } }, "node_modules/@jest/core/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/@jest/core/node_modules/supports-color": { @@ -2703,26 +2719,11 @@ "node": ">=10" } }, - "node_modules/@jest/reporters/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -2742,12 +2743,6 @@ "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/schemas/-/schemas-29.6.3.tgz", @@ -3101,9 +3096,9 @@ } }, "node_modules/@npmcli/fs": { - "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/fs/-/fs-3.1.0.tgz", - "integrity": "sha1-Iz1DolqR1ow6hjug2mo/AJJKFz4=", + "version": "3.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha1-Wc2qWtypXRNfwA8rtT9XcVdc5yY=", "dev": true, "dependencies": { "semver": "^7.3.5" @@ -3112,26 +3107,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/fs/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@npmcli/fs/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3139,12 +3119,6 @@ "node": ">=10" } }, - "node_modules/@npmcli/fs/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/@npmcli/git": { "version": "4.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/git/-/git-4.1.0.tgz", @@ -3174,13 +3148,10 @@ } }, "node_modules/@npmcli/git/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3188,18 +3159,6 @@ "node": ">=10" } }, - "node_modules/@npmcli/git/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@npmcli/git/node_modules/which": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-3.0.1.tgz", @@ -3215,23 +3174,17 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/git/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/@npmcli/installed-package-contents": { - "version": "2.0.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", - "integrity": "sha1-v9gX7M2ejfIAkZ5z9X+ePZ5PnjM=", + "version": "2.1.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", + "integrity": "sha1-YwSOX25AlHo6iNy8tP2bdv3TfBc=", "dev": true, "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" }, "bin": { - "installed-package-contents": "lib/index.js" + "installed-package-contents": "bin/index.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -3363,9 +3316,9 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@puppeteer/browsers/-/browsers-2.2.0.tgz", - "integrity": "sha1-JbXG0ck+uR5whuvJW3Z/57PuXsQ=", + "version": "2.2.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@puppeteer/browsers/-/browsers-2.2.3.tgz", + "integrity": "sha1-rWt5EpxQgl533auggmgPTa0LZ04=", "dev": true, "dependencies": { "debug": "4.3.4", @@ -3473,9 +3426,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", - "integrity": "sha1-FFzsdYmtlSFxrralhbvqvQ/TtM8=", + "version": "25.0.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", + "integrity": "sha1-x35girESpma38qa+piXHMiT33TQ=", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -3523,9 +3476,9 @@ } }, "node_modules/@rollup/plugin-replace": { - "version": "5.0.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-replace/-/plugin-replace-5.0.5.tgz", - "integrity": "sha1-M9VlPc5tA8sk75i+9/bSW1f6798=", + "version": "5.0.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-replace/-/plugin-replace-5.0.7.tgz", + "integrity": "sha1-FQye6duAMdnkWAphoO3qrtPTdoc=", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -3614,9 +3567,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz", - "integrity": "sha1-uYeGwTBLT/jbOocxgLd4ZJtd/ys=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha1-u9DmFrIHjNLWivyYJNH62y8v/Sc=", "cpu": [ "arm" ], @@ -3627,9 +3580,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz", - "integrity": "sha1-iDNnmvERcrG/GrfLO62E30yvDJ4=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha1-lyVe9jhMX3P0gAwN6R9fZRjiEgM=", "cpu": [ "arm64" ], @@ -3640,9 +3593,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz", - "integrity": "sha1-7wLXPgqV1Abg60/WGlPV0Xd1ZZs=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha1-tt104RdRDf6UVBZGBnsFRbQv8JY=", "cpu": [ "arm64" ], @@ -3653,9 +3606,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz", - "integrity": "sha1-POW5vPkrM0GlwcWKPmvM4OqedFU=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha1-4H123hzsmHZz5/PUjMuOEG1CwFw=", "cpu": [ "x64" ], @@ -3666,9 +3619,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz", - "integrity": "sha1-PT0sAYvdjgN8a/7dUqz/8cl+S+Q=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha1-nxptIYtWDJ11GFr0uLtC+fJHNrg=", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha1-U2GLkub/tkLHtiDm5ShEZREzBUk=", "cpu": [ "arm" ], @@ -3679,9 +3645,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz", - "integrity": "sha1-X8jMl4/zluqhNte/4FtbkTgGQUM=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha1-mae6XnGdTwU3YaaY97Uikc77pXc=", "cpu": [ "arm64" ], @@ -3692,9 +3658,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz", - "integrity": "sha1-8q59e+1Bb/om1rlIrFdytSBwDu8=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha1-9T25mkXZvADOlNuKNe+nw8FEpYw=", "cpu": [ "arm64" ], @@ -3704,10 +3670,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha1-y7CDdAj+CBzjQ1zzcw4JD+uvyb8=", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz", - "integrity": "sha1-MD1XoyjumlDIU4WTbzHPYjBtMLY=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha1-jtCcHRJiraTDjXkaKK4P6ii4DMk=", "cpu": [ "riscv64" ], @@ -3717,10 +3696,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha1-k4E408jgyW8CIlKihEHc+xev1+w=", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz", - "integrity": "sha1-9nL2UI8JD8c/CLpA/3bCC1dCR3g=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha1-GnSBE3pUdAvuHe1K5XUkUPFV2UI=", "cpu": [ "x64" ], @@ -3731,9 +3723,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz", - "integrity": "sha1-0vNLGxV/Pn8TklvKMogZKmZ1Wok=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha1-8Rhq/GAaxPT8JfrEyhXsvuOhh00=", "cpu": [ "x64" ], @@ -3744,9 +3736,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz", - "integrity": "sha1-j/7MmArk2YmesvnErkcajVjS2ms=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha1-7WYD6TY2qWIDxpFb5BFyRcG9La8=", "cpu": [ "arm64" ], @@ -3757,9 +3749,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz", - "integrity": "sha1-p1BYhPQVZi4Ig2W5IYsrA6iPxvI=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha1-FOC0BLHCXr5hV6Fe25xGlZunTFQ=", "cpu": [ "ia32" ], @@ -3770,9 +3762,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz", - "integrity": "sha1-ar1523/40BpYhluiCmPP0j2eKhA=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha1-XWlNNFzja27PZXNJ4D64cpfmjaQ=", "cpu": [ "x64" ], @@ -3853,9 +3845,9 @@ } }, "node_modules/@sigstore/sign/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha1-TU2bnzQFOvbG5ZemS+jmbkK/Rbc=", + "version": "3.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, "dependencies": { "minipass": "^7.0.3", @@ -3870,9 +3862,9 @@ } }, "node_modules/@sigstore/sign/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -3927,9 +3919,9 @@ } }, "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha1-lhFvKpEuDAKBc0WzwQdRBpkg1VM=", + "version": "3.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha1-gh+EQvQXXY8EZ7na8m46GOLQKvI=", "dev": true }, "node_modules/@szmarczak/http-timer": { @@ -3959,9 +3951,9 @@ "dev": true }, "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha1-30kH/AeohpImN7FeAtTOvEwAIbI=", + "version": "1.0.11", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha1-buRkAGhfEw4ngSjHs4t+Ax/1svI=", "dev": true }, "node_modules/@tsconfig/node12": { @@ -4014,9 +4006,9 @@ } }, "node_modules/@tufjs/models/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha1-puAMPeRMOlQr+q5wq/wiQgptqCU=", + "version": "9.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -4070,9 +4062,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha1-e3UCvgqoDMTvIpeIRrmD7ar81N0=", + "version": "7.20.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha1-jcnwrg8gLAjY1Nq2SJEsjWA44/c=", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -4111,9 +4103,9 @@ "dev": true }, "node_modules/@types/eslint": { - "version": "8.56.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/eslint/-/eslint-8.56.6.tgz", - "integrity": "sha1-1dwWysAl0xPuEBEIulcU6hDrPtA=", + "version": "8.56.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha1-6yNwpzvwSpAe66jyJZXH7g9+tY0=", "dev": true, "dependencies": { "@types/estree": "*", @@ -4226,9 +4218,9 @@ } }, "node_modules/@types/node": { - "version": "20.11.30", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-20.11.30.tgz", - "integrity": "sha1-nDNGf8IxZ6NH5zg094j0ufOZ1m8=", + "version": "20.14.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-20.14.2.tgz", + "integrity": "sha1-pfTSvLS2qHv/yqcXcYxaDyCPShg=", "dependencies": { "undici-types": "~5.26.4" } @@ -4364,9 +4356,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -4380,18 +4372,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", @@ -4399,13 +4379,10 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -4413,12 +4390,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/@typescript-eslint/parser": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/parser/-/parser-5.62.0.tgz", @@ -4447,9 +4418,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -4514,9 +4485,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -4577,9 +4548,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -4593,18 +4564,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", @@ -4612,13 +4571,10 @@ "dev": true }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -4626,12 +4582,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/@typescript-eslint/utils": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/utils/-/utils-5.62.0.tgz", @@ -4658,26 +4608,11 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -4685,12 +4620,6 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", @@ -5158,9 +5087,9 @@ } }, "node_modules/agent-base/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5239,15 +5168,15 @@ } }, "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha1-0aBScyPiL1NWLFZ8AJkVd9++GdE=", + "version": "8.16.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha1-IuKpK5TwBffg+cnTllLvC49vDLQ=", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -5481,9 +5410,9 @@ } }, "node_modules/ast-types/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/async": { @@ -5654,13 +5583,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz", - "integrity": "sha1-J29BcQsDpk9kZ0M8q3LLwmU8OLE=", + "version": "0.4.11", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha1-MDIN/j/+GjNsFa/c2v1v1hWyXjM=", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.1", + "@babel/helper-define-polyfill-provider": "^0.6.2", "semver": "^6.3.1" }, "peerDependencies": { @@ -5681,12 +5610,12 @@ } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.1.tgz", - "integrity": "sha1-TwjvTGLHp/ZqNe1MDXXjBQasxr4=", + "version": "0.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha1-rdxH4kDt0doQWOvaAwIfOCu6eF4=", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.1" + "@babel/helper-define-polyfill-provider": "^0.6.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -5738,42 +5667,51 @@ "dev": true }, "node_modules/bare-events": { - "version": "2.2.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-events/-/bare-events-2.2.2.tgz", - "integrity": "sha1-qYpBhB+Ysu/n7MXFRogURpsBgHg=", + "version": "2.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-events/-/bare-events-2.3.1.tgz", + "integrity": "sha1-WvLuC+lXj4Hjwaqbw6aivPIjB84=", "dev": true, "optional": true }, "node_modules/bare-fs": { - "version": "2.2.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-fs/-/bare-fs-2.2.2.tgz", - "integrity": "sha1-KGv1TMbxX2E77muybwxhx5+xTwY=", + "version": "2.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-fs/-/bare-fs-2.3.1.tgz", + "integrity": "sha1-zb1j2selUt+yuH0YyCIpjR79IT0=", "dev": true, "optional": true, "dependencies": { "bare-events": "^2.0.0", - "bare-os": "^2.0.0", "bare-path": "^2.0.0", - "streamx": "^2.13.0" + "bare-stream": "^2.0.0" } }, "node_modules/bare-os": { - "version": "2.2.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-os/-/bare-os-2.2.1.tgz", - "integrity": "sha1-yUoljHpAjKZ2Y5nkRnUTbAlkkT0=", + "version": "2.3.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-os/-/bare-os-2.3.0.tgz", + "integrity": "sha1-cY5oCxOe//8GJKdCHAmOeiwtY9o=", "dev": true, "optional": true }, "node_modules/bare-path": { - "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-path/-/bare-path-2.1.0.tgz", - "integrity": "sha1-gw8X/TmEKBPKd9IR67q+I4qIy0w=", + "version": "2.1.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha1-WUEEyCnvZg5DtVieyNrvffbO2z4=", "dev": true, "optional": true, "dependencies": { "bare-os": "^2.1.0" } }, + "node_modules/bare-stream": { + "version": "2.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-stream/-/bare-stream-2.1.2.tgz", + "integrity": "sha1-RqG+wKEJRmCK3jacFwF5cGuejhw=", + "dev": true, + "optional": true, + "dependencies": { + "streamx": "^2.18.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/base64-js/-/base64-js-1.5.1.tgz", @@ -6014,12 +5952,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/braces/-/braces-3.0.2.tgz", - "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", + "version": "3.0.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/braces/-/braces-3.0.3.tgz", + "integrity": "sha1-SQMy9AkZRSJy1VqEgK3AxEE1h4k=", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -6038,9 +5976,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha1-jzrMK75zr3ITOZQwiQ+GxjpWdKs=", + "version": "4.23.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha1-zkrwU0s9N9tcGkypi5CA+YUEHpY=", "dev": true, "funding": [ { @@ -6057,10 +5995,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "update-browserslist-db": "^1.0.16" }, "bin": { "browserslist": "cli.js" @@ -6161,55 +6099,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha1-h/bbmrBFi+coVk+oHYdtjXRVL6k=", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha1-iwvuuYYFrfGxKPpDhkA8AJ4CIaU=", "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/builtins/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha1-iwvuuYYFrfGxKPpDhkA8AJ4CIaU=", - "dev": true, - "engines": { - "node": ">= 0.8" + "engines": { + "node": ">= 0.8" } }, "node_modules/cacache": { @@ -6245,22 +6141,22 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.3.10.tgz", - "integrity": "sha1-A1HruAn9GH/kIauWr4PTpwcV30s=", + "version": "10.4.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.1.tgz", + "integrity": "sha1-DPsBq2prQ4F3v+aljiV29u/pCcI=", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -6276,9 +6172,9 @@ } }, "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha1-puAMPeRMOlQr+q5wq/wiQgptqCU=", + "version": "9.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -6291,9 +6187,9 @@ } }, "node_modules/cacache/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -6377,9 +6273,9 @@ } }, "node_modules/camel-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/camelcase": { @@ -6392,9 +6288,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001600", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", - "integrity": "sha1-k6PuF6Napqnwxu8bKrSVB9GrkHk=", + "version": "1.0.30001632", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz", + "integrity": "sha1-lkIHt8ulhRcBr7TIr68USNs4hLY=", "dev": true, "funding": [ { @@ -6423,9 +6319,9 @@ } }, "node_modules/capital-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/chalk": { @@ -6463,9 +6359,9 @@ } }, "node_modules/change-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/char-regex": { @@ -6584,18 +6480,18 @@ } }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha1-EBXs7UdB4V0GZkqVfbv1DQQeJqw=", + "version": "1.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha1-Bb/9f/koRlCTMUcIyTvfqb0fD1s=", "dev": true, "engines": { "node": ">=6.0" } }, "node_modules/chromium-bidi": { - "version": "0.5.13", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chromium-bidi/-/chromium-bidi-0.5.13.tgz", - "integrity": "sha1-4WUS13sWHy+S2pGkjqLsQYVmhUk=", + "version": "0.5.19", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chromium-bidi/-/chromium-bidi-0.5.19.tgz", + "integrity": "sha1-5PSVG32bINZo1rOHg597e/LWnvQ=", "dev": true, "dependencies": { "mitt": "3.0.1", @@ -6622,9 +6518,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha1-bDcKsZ+KM5TjGP5oJobsCsaE0Qc=", + "version": "1.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha1-xIU0Guj9mZyk7lry16HJrgHgCZw=", "dev": true }, "node_modules/clean-stack": { @@ -6796,9 +6692,9 @@ } }, "node_modules/compressing": { - "version": "1.10.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/compressing/-/compressing-1.10.0.tgz", - "integrity": "sha1-vKD3NHNrW7BcOhdv741g1/XzIto=", + "version": "1.10.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/compressing/-/compressing-1.10.1.tgz", + "integrity": "sha1-RvHK5tihhF6EqVUjm0GbrJHFZqM=", "dev": true, "dependencies": { "@eggjs/yauzl": "^2.11.0", @@ -6951,9 +6847,9 @@ } }, "node_modules/constant-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/content-type": { @@ -6981,9 +6877,9 @@ } }, "node_modules/core-js": { - "version": "3.36.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js/-/core-js-3.36.1.tgz", - "integrity": "sha1-yXpxYOvQCy3hnmL0u9NAarcg5Xg=", + "version": "3.37.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js/-/core-js-3.37.1.tgz", + "integrity": "sha1-0hdR3bdWUYrFoA5NZkmd+YGmLbk=", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -6991,9 +6887,9 @@ } }, "node_modules/core-js-compat": { - "version": "3.36.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js-compat/-/core-js-compat-3.36.1.tgz", - "integrity": "sha1-GBhpXXLJnCXWIdypTmiD4ZDOo8g=", + "version": "3.37.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js-compat/-/core-js-compat-3.37.1.tgz", + "integrity": "sha1-yEQxDHhS9L30m40zlzC5fhf/Ce4=", "dev": true, "dependencies": { "browserslist": "^4.23.0" @@ -7330,9 +7226,9 @@ } }, "node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha1-Tz/JTItxHpuygA0YXNatIPKpCv8=", + "version": "1.5.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha1-ma7hnrm65VpnMncXtuhI0L93flo=", "dev": true, "peerDependencies": { "babel-plugin-macros": "^3.1.0" @@ -7541,9 +7437,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1262051", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.1262051.tgz", - "integrity": "sha1-ZwsfhFmyoTbgW9mo1U7AIS1UOjg=", + "version": "0.0.1286932", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.1286932.tgz", + "integrity": "sha1-IwNwcDRCb+CzkBJxPUtzOffbyBU=", "dev": true }, "node_modules/di": { @@ -7629,9 +7525,9 @@ } }, "node_modules/dot-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/dotnet-runtime": { @@ -7673,9 +7569,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.715", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/electron-to-chromium/-/electron-to-chromium-1.4.715.tgz", - "integrity": "sha1-uxa88qNTeWL8z6dGtcmMX3QE/0Y=", + "version": "1.4.798", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz", + "integrity": "sha1-aj/Ksu3B5m44g0Zva0uJRDI8AWQ=", "dev": true }, "node_modules/emittery": { @@ -7774,9 +7670,9 @@ } }, "node_modules/engine.io/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -7859,9 +7755,9 @@ } }, "node_modules/envinfo": { - "version": "7.11.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/envinfo/-/envinfo-7.11.1.tgz", - "integrity": "sha1-L/73dZEFcIGwEpqP2M9hGNoblOE=", + "version": "7.13.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/envinfo/-/envinfo-7.13.0.tgz", + "integrity": "sha1-gfu4Hl2jXXToFJQa6rfDJaYG+zE=", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -7919,9 +7815,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.4.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es-module-lexer/-/es-module-lexer-1.4.2.tgz", - "integrity": "sha1-uhpiJV/5tBAjqvm9CMAWpfGj/vM=", + "version": "1.5.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha1-JZaUGd6cCx++VCeXiQI+ipp4hBI=", "dev": true }, "node_modules/es6-error": { @@ -8077,9 +7973,9 @@ } }, "node_modules/eslint-plugin-jsdoc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -8105,18 +8001,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-jsdoc/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-plugin-jsdoc/node_modules/ms": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", @@ -8124,13 +8008,10 @@ "dev": true }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -8138,12 +8019,6 @@ "node": ">=10" } }, - "node_modules/eslint-plugin-jsdoc/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/eslint-plugin-prefer-arrow": { "version": "1.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", @@ -8234,9 +8109,9 @@ "dev": true }, "node_modules/eslint/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -8607,9 +8482,9 @@ } }, "node_modules/extract-zip/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -8793,9 +8668,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", + "version": "7.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha1-RCZdPKwH4+p9wkdRY4BkN1SgUpI=", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -9004,9 +8879,9 @@ } }, "node_modules/fp-ts": { - "version": "2.16.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fp-ts/-/fp-ts-2.16.4.tgz", - "integrity": "sha1-qraWNu5KTphJ23YuVJ9lxMuQ+IY=", + "version": "2.16.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fp-ts/-/fp-ts-2.16.6.tgz", + "integrity": "sha1-nWPFsqBjVdYnrpTDelz/2lxFXSQ=", "dev": true }, "node_modules/fs-constants": { @@ -9040,9 +8915,9 @@ } }, "node_modules/fs-minipass/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -9191,9 +9066,9 @@ } }, "node_modules/get-uri/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -9303,26 +9178,11 @@ "node": ">=10.0" } }, - "node_modules/global-agent/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/global-agent/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -9330,12 +9190,6 @@ "node": ">=10" } }, - "node_modules/global-agent/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globals/-/globals-11.12.0.tgz", @@ -9346,12 +9200,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha1-WFKIKlK4DcMBsGYCc+HtCC8LbM8=", + "version": "1.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha1-dDDtOpddl7+1m8zkH1yruvplEjY=", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -9538,9 +9393,9 @@ } }, "node_modules/header-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/hosted-git-info": { @@ -9641,9 +9496,9 @@ } }, "node_modules/http-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -9689,9 +9544,9 @@ } }, "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -9770,9 +9625,9 @@ } }, "node_modules/ignore-walk": { - "version": "6.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ignore-walk/-/ignore-walk-6.0.4.tgz", - "integrity": "sha1-iZUL6UtPUiIl62OhPFa622ORkOk=", + "version": "6.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ignore-walk/-/ignore-walk-6.0.5.tgz", + "integrity": "sha1-741h6rfaFpB4cj0fgoM7NuIAsN0=", "dev": true, "dependencies": { "minimatch": "^9.0.0" @@ -9791,9 +9646,9 @@ } }, "node_modules/ignore-walk/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha1-puAMPeRMOlQr+q5wq/wiQgptqCU=", + "version": "9.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -10330,9 +10185,9 @@ } }, "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -10366,9 +10221,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha1-ZH7MRyI4ruSwasDkYazCGoxQXKg=", + "version": "3.4.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha1-p1dj/zatd47eahVtjuixJN5EW0o=", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -10578,9 +10433,9 @@ } }, "node_modules/jest-circus/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-circus/node_modules/supports-color": { @@ -10880,9 +10735,9 @@ } }, "node_modules/jest-config/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-config/node_modules/supports-color": { @@ -11104,9 +10959,9 @@ } }, "node_modules/jest-each/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-each/node_modules/supports-color": { @@ -11323,9 +11178,9 @@ } }, "node_modules/jest-jasmine2/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-jasmine2/node_modules/supports-color": { @@ -11395,9 +11250,9 @@ } }, "node_modules/jest-leak-detector/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-matcher-utils": { @@ -11524,9 +11379,9 @@ } }, "node_modules/jest-matcher-utils/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-matcher-utils/node_modules/supports-color": { @@ -11646,9 +11501,9 @@ } }, "node_modules/jest-message-util/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-message-util/node_modules/supports-color": { @@ -12144,18 +11999,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-snapshot/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", @@ -12183,19 +12026,16 @@ } }, "node_modules/jest-snapshot/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -12215,12 +12055,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-util/-/jest-util-29.7.0.tgz", @@ -12422,9 +12256,9 @@ } }, "node_modules/jest-validate/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha1-GZQx7qqi4J+GQn77tPFHPttHYJs=", + "version": "18.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", "dev": true }, "node_modules/jest-validate/node_modules/supports-color": { @@ -12647,9 +12481,9 @@ } }, "node_modules/jsdom/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.16.0.tgz", - "integrity": "sha1-0c13Tzb7wHFlBmpg5AMj6rZEb9Q=", + "version": "8.17.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.0.tgz", + "integrity": "sha1-0UXRjsou0lqveRoYOQP3vl4pX+o=", "dev": true, "engines": { "node": ">=10.0.0" @@ -13339,9 +13173,9 @@ } }, "node_modules/log4js/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -13390,9 +13224,9 @@ } }, "node_modules/lower-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/lowercase-keys": { @@ -13413,15 +13247,12 @@ } }, "node_modules/magic-string": { - "version": "0.30.8", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/magic-string/-/magic-string-0.30.8.tgz", - "integrity": "sha1-FOhiQkbSvtunDVRiqpmsloGERhM=", + "version": "0.30.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha1-Ej2cQaDLVkDIkrBB1M+zvQqks54=", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/make-dir": { @@ -13439,26 +13270,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-dir/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -13466,12 +13282,6 @@ "node": ">=10" } }, - "node_modules/make-dir/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-error/-/make-error-1.3.6.tgz", @@ -13616,13 +13426,10 @@ } }, "node_modules/make-fetch-happen/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -13630,18 +13437,6 @@ "node": ">=10" } }, - "node_modules/make-fetch-happen/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-fetch-happen/node_modules/ssri": { "version": "9.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ssri/-/ssri-9.0.1.tgz", @@ -13791,12 +13586,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha1-vImZp8u/d83InxMvbkZwUbSQkMY=", + "version": "4.0.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha1-M+gZDZ/kdKmJVSX1YY7uE21GwuU=", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -14194,9 +13989,9 @@ } }, "node_modules/no-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/node-fetch": { @@ -14282,18 +14077,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/node-gyp/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/node-gyp/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", @@ -14310,13 +14093,10 @@ } }, "node_modules/node-gyp/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14324,12 +14104,6 @@ "node": ">=10" } }, - "node_modules/node-gyp/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-int64/-/node-int64-0.4.0.tgz", @@ -14372,26 +14146,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/normalize-package-data/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14399,12 +14158,6 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/normalize-path/-/normalize-path-3.0.0.tgz", @@ -14426,9 +14179,9 @@ } }, "node_modules/npm-bundled": { - "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha1-fo4vi7JreUJlAoSRvmAyGiWjnbc=", + "version": "3.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-bundled/-/npm-bundled-3.0.1.tgz", + "integrity": "sha1-zKc+FVYCN2liVLEBcNj4ba1i2iU=", "dev": true, "dependencies": { "npm-normalize-package-bin": "^3.0.0" @@ -14449,26 +14202,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-install-checks/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/npm-install-checks/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14476,12 +14214,6 @@ "node": ">=10" } }, - "node_modules/npm-install-checks/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/npm-normalize-package-bin": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", @@ -14506,26 +14238,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-package-arg/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/npm-package-arg/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14533,12 +14250,6 @@ "node": ">=10" } }, - "node_modules/npm-package-arg/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/npm-packlist": { "version": "7.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-packlist/-/npm-packlist-7.0.4.tgz", @@ -14566,26 +14277,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-pick-manifest/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/npm-pick-manifest/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -14593,12 +14289,6 @@ "node": ">=10" } }, - "node_modules/npm-pick-manifest/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/npm-registry-fetch": { "version": "14.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", @@ -14653,9 +14343,9 @@ } }, "node_modules/npm-registry-fetch/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha1-TU2bnzQFOvbG5ZemS+jmbkK/Rbc=", + "version": "3.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, "dependencies": { "minipass": "^7.0.3", @@ -14670,9 +14360,9 @@ } }, "node_modules/npm-registry-fetch/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -14706,9 +14396,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha1-c44HB9MSjLdQ3dz+kORhBILfDzA=", + "version": "2.2.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nwsapi/-/nwsapi-2.2.10.tgz", + "integrity": "sha1-C3emjiGgtIPbcLEfrQVZBuhnzag=", "dev": true }, "node_modules/object-assign": { @@ -14805,17 +14495,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha1-AHOX1E7Rhy/cbtMTYBkPgYFOLGQ=", + "version": "0.9.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha1-fqHBpdkddk+yghOciP4R4YKjpzQ=", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -14915,9 +14605,9 @@ } }, "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha1-U2gCt2vAs0qlAZXrJEInbWE+NDQ=", + "version": "7.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha1-vb3tffsJa3UaKgh+7rlmRyWy4xc=", "dev": true, "dependencies": { "debug": "^4.3.4" @@ -14927,9 +14617,9 @@ } }, "node_modules/pac-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -14976,12 +14666,12 @@ "dev": true }, "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", - "integrity": "sha1-WsvXvnuvGMRqPyk6hAEJpDCmQK0=", + "version": "8.0.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha1-ay2j13Nk/eYpLoELSWy3BEC5uJ0=", "dev": true, "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.1", "debug": "^4.3.4", "socks": "^2.7.1" }, @@ -15045,9 +14735,9 @@ } }, "node_modules/param-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/parent-module": { @@ -15112,9 +14802,9 @@ } }, "node_modules/pascal-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/path-case": { @@ -15128,9 +14818,9 @@ } }, "node_modules/path-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/path-exists": { @@ -15166,25 +14856,25 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha1-m6a/WqhQD+n9Z99PDZSDsrC/xpg=", + "version": "1.11.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha1-eWCmaIiFlKByCxKpEdGnQqufEdI=", "dev": true, "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha1-C9RFylc2NGWQD00fm9jbNDpNlcM=", + "version": "10.2.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha1-SCBrwRTBJSlAxBsltBr1tUWsqHg=", "dev": true, "engines": { "node": "14 || >=16.14" @@ -15205,9 +14895,9 @@ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha1-y1vcdP8/UYkiNur3nWi8RFZKuBw=", + "version": "1.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha1-qK1Xm1cZUvDl0liS3lRFvP4lqqE=", "dev": true }, "node_modules/picomatch": { @@ -15458,9 +15148,9 @@ } }, "node_modules/proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha1-U2gCt2vAs0qlAZXrJEInbWE+NDQ=", + "version": "7.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha1-vb3tffsJa3UaKgh+7rlmRyWy4xc=", "dev": true, "dependencies": { "debug": "^4.3.4" @@ -15470,9 +15160,9 @@ } }, "node_modules/proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -15528,12 +15218,12 @@ "dev": true }, "node_modules/proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", - "integrity": "sha1-WsvXvnuvGMRqPyk6hAEJpDCmQK0=", + "version": "8.0.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha1-ay2j13Nk/eYpLoELSWy3BEC5uJ0=", "dev": true, "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.1", "debug": "^4.3.4", "socks": "^2.7.1" }, @@ -15576,16 +15266,16 @@ } }, "node_modules/puppeteer": { - "version": "22.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer/-/puppeteer-22.6.0.tgz", - "integrity": "sha1-HpFuG2vP/QDKBXZuf7qww8ihzNI=", + "version": "22.10.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer/-/puppeteer-22.10.0.tgz", + "integrity": "sha1-ELf4++W9SZM/HzZV8YVzCGKQ/vw=", "dev": true, "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "2.2.0", + "@puppeteer/browsers": "2.2.3", "cosmiconfig": "9.0.0", - "devtools-protocol": "0.0.1262051", - "puppeteer-core": "22.6.0" + "devtools-protocol": "0.0.1286932", + "puppeteer-core": "22.10.0" }, "bin": { "puppeteer": "lib/esm/puppeteer/node/cli.js" @@ -15633,9 +15323,9 @@ "dev": true }, "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -15766,25 +15456,25 @@ "dev": true }, "node_modules/puppeteer/node_modules/puppeteer-core": { - "version": "22.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-22.6.0.tgz", - "integrity": "sha1-VEz57lyzJZ+edPc2TBPBMqBLtI8=", + "version": "22.10.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-22.10.0.tgz", + "integrity": "sha1-7vVzX5DtKeOxCBXRQrNDfgWTkoM=", "dev": true, "dependencies": { - "@puppeteer/browsers": "2.2.0", - "chromium-bidi": "0.5.13", + "@puppeteer/browsers": "2.2.3", + "chromium-bidi": "0.5.19", "debug": "4.3.4", - "devtools-protocol": "0.0.1262051", - "ws": "8.16.0" + "devtools-protocol": "0.0.1286932", + "ws": "8.17.0" }, "engines": { "node": ">=18" } }, "node_modules/puppeteer/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.16.0.tgz", - "integrity": "sha1-0c13Tzb7wHFlBmpg5AMj6rZEb9Q=", + "version": "8.17.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.0.tgz", + "integrity": "sha1-0UXRjsou0lqveRoYOQP3vl4pX+o=", "dev": true, "engines": { "node": ">=10.0.0" @@ -15969,9 +15659,9 @@ } }, "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha1-Arsp+12pC1REWBdJwizt01l8bLA=", + "version": "3.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha1-tD016JwPO+a1+76dxsgkZ7MMKNo=", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -15987,40 +15677,40 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.3.10.tgz", - "integrity": "sha1-A1HruAn9GH/kIauWr4PTpwcV30s=", + "version": "10.4.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.1.tgz", + "integrity": "sha1-DPsBq2prQ4F3v+aljiV29u/pCcI=", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha1-Arsp+12pC1REWBdJwizt01l8bLA=", + "version": "3.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha1-tD016JwPO+a1+76dxsgkZ7MMKNo=", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha1-puAMPeRMOlQr+q5wq/wiQgptqCU=", + "version": "9.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -16032,6 +15722,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/read-package-json/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readable-stream/-/readable-stream-3.6.2.tgz", @@ -16303,9 +16002,9 @@ "dev": true }, "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha1-m+ZdLW5oNEfS6QE9or9FETmmHM8=", + "version": "5.0.7", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-5.0.7.tgz", + "integrity": "sha1-J73fIC59icsuA4FlY4DRc0qFSnQ=", "dev": true, "dependencies": { "glob": "^10.3.7" @@ -16314,7 +16013,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -16330,31 +16029,31 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.3.10.tgz", - "integrity": "sha1-A1HruAn9GH/kIauWr4PTpwcV30s=", + "version": "10.4.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.1.tgz", + "integrity": "sha1-DPsBq2prQ4F3v+aljiV29u/pCcI=", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha1-puAMPeRMOlQr+q5wq/wiQgptqCU=", + "version": "9.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -16366,6 +16065,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/roarr": { "version": "2.15.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/roarr/-/roarr-2.15.4.tgz", @@ -16390,9 +16098,9 @@ "dev": true }, "node_modules/rollup": { - "version": "4.13.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup/-/rollup-4.13.0.tgz", - "integrity": "sha1-3SrhRLTNwuolQgR39o1JN6chI3o=", + "version": "4.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha1-SX9g8MUwjkYCz0ETYzn7+H1fXdo=", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -16405,19 +16113,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.13.0", - "@rollup/rollup-android-arm64": "4.13.0", - "@rollup/rollup-darwin-arm64": "4.13.0", - "@rollup/rollup-darwin-x64": "4.13.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.13.0", - "@rollup/rollup-linux-arm64-gnu": "4.13.0", - "@rollup/rollup-linux-arm64-musl": "4.13.0", - "@rollup/rollup-linux-riscv64-gnu": "4.13.0", - "@rollup/rollup-linux-x64-gnu": "4.13.0", - "@rollup/rollup-linux-x64-musl": "4.13.0", - "@rollup/rollup-win32-arm64-msvc": "4.13.0", - "@rollup/rollup-win32-ia32-msvc": "4.13.0", - "@rollup/rollup-win32-x64-msvc": "4.13.0", + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", "fsevents": "~2.3.2" } }, @@ -16583,15 +16294,15 @@ } }, "node_modules/schema-utils/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha1-0aBScyPiL1NWLFZ8AJkVd9++GdE=", + "version": "8.16.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha1-IuKpK5TwBffg+cnTllLvC49vDLQ=", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -16653,9 +16364,9 @@ } }, "node_modules/selenium-standalone/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dependencies": { "ms": "2.1.2" }, @@ -16700,9 +16411,9 @@ } }, "node_modules/sentence-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/serialize-error": { @@ -16885,9 +16596,9 @@ } }, "node_modules/sigstore/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha1-TU2bnzQFOvbG5ZemS+jmbkK/Rbc=", + "version": "3.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, "dependencies": { "minipass": "^7.0.3", @@ -16902,9 +16613,9 @@ } }, "node_modules/sigstore/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -16936,9 +16647,9 @@ } }, "node_modules/smob": { - "version": "1.4.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/smob/-/smob-1.4.1.tgz", - "integrity": "sha1-ZicOffanUnZkgWxbV3oj8Xum9bU=", + "version": "1.5.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/smob/-/smob-1.5.0.tgz", + "integrity": "sha1-hdeaFAOr8SjSTT68HNxeGpVI06s=", "dev": true }, "node_modules/snake-case": { @@ -16952,9 +16663,9 @@ } }, "node_modules/snake-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/socket.io": { @@ -16986,9 +16697,9 @@ } }, "node_modules/socket.io-adapter/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -17043,9 +16754,9 @@ } }, "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -17066,9 +16777,9 @@ "dev": true }, "node_modules/socket.io/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -17089,9 +16800,9 @@ "dev": true }, "node_modules/socks": { - "version": "2.8.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks/-/socks-2.8.1.tgz", - "integrity": "sha1-IsfZ3XiCZJBDy6Dq+0muFE40V68=", + "version": "2.8.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks/-/socks-2.8.3.tgz", + "integrity": "sha1-Hr0PCcUrqVoJdQr+Pz+fckqADLU=", "dev": true, "dependencies": { "ip-address": "^9.0.5", @@ -17117,9 +16828,9 @@ } }, "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -17185,9 +16896,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.17", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", - "integrity": "sha1-iH2oqnMhjlGh2RdQLXmGMWGpP5w=", + "version": "3.0.18", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha1-IqqSLc8vKIWmSUomHy2LdTRdAyY=", "dev": true }, "node_modules/split-on-first": { @@ -17206,9 +16917,9 @@ "dev": true }, "node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha1-5J781uNjhRlstRXToq1sPwJl74w=", + "version": "10.0.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha1-qKreLeYLorzoaI4/o0m60Fx9weU=", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -17218,9 +16929,9 @@ } }, "node_modules/ssri/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -17280,9 +16991,9 @@ } }, "node_modules/streamroller/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -17335,13 +17046,14 @@ } }, "node_modules/streamx": { - "version": "2.16.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamx/-/streamx-2.16.1.tgz", - "integrity": "sha1-KzEb00gy8Iqmu01qgCl8nK74lhQ=", + "version": "2.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamx/-/streamx-2.18.0.tgz", + "integrity": "sha1-W8GlHrQSpmfr/c1ObPam/GVyGsc=", "dev": true, "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" @@ -17588,9 +17300,9 @@ "dev": true }, "node_modules/terser": { - "version": "5.29.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser/-/terser-5.29.2.tgz", - "integrity": "sha1-wX1XPOHaGzDyGod7/9VlXdhv2zU=", + "version": "5.31.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser/-/terser-5.31.1.tgz", + "integrity": "sha1-c13jyYfdZx6VGQ5rmM/i8H888NQ=", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -17739,6 +17451,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/text-decoder": { + "version": "1.1.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-decoder/-/text-decoder-1.1.0.tgz", + "integrity": "sha1-M3nnKPz004k+wa6jXowsrCFe8ZA=", + "dev": true, + "dependencies": { + "b4a": "^1.6.4" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-table/-/text-table-0.2.0.tgz", @@ -17803,9 +17524,9 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha1-l7mtsHKLQigKo9gUtrmZsv8DGL8=", + "version": "4.1.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha1-lF8UYbRbWox2ghwz6knDrBksGzY=", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -17849,9 +17570,9 @@ } }, "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha1-dhPYyBxDyMsxLGkEAnJX6BTEDgk=", + "version": "29.1.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-jest/-/ts-jest-29.1.4.tgz", + "integrity": "sha1-JvilXOMeTS73of1H3H+hJ+knk+8=", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -17867,10 +17588,11 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", "babel-jest": "^29.0.0", "jest": "^29.0.0", @@ -17880,6 +17602,9 @@ "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -17891,26 +17616,11 @@ } } }, - "node_modules/ts-jest/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -17918,12 +17628,6 @@ "node": ">=10" } }, - "node_modules/ts-jest/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/ts-loader": { "version": "8.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-loader/-/ts-loader-8.4.0.tgz", @@ -18002,26 +17706,11 @@ "node": ">=8" } }, - "node_modules/ts-loader/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ts-loader/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -18041,12 +17730,6 @@ "node": ">=8" } }, - "node_modules/ts-loader/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-node/-/ts-node-10.9.2.tgz", @@ -18126,9 +17809,9 @@ } }, "node_modules/tuf-js/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -18178,9 +17861,9 @@ } }, "node_modules/tuf-js/node_modules/minipass-fetch": { - "version": "3.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.4.tgz", - "integrity": "sha1-TU2bnzQFOvbG5ZemS+jmbkK/Rbc=", + "version": "3.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, "dependencies": { "minipass": "^7.0.3", @@ -18195,9 +17878,9 @@ } }, "node_modules/tuf-js/node_modules/minipass-fetch/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha1-284DdA9QpHhrqZTB+5CIRNJ7A4w=", + "version": "7.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -18265,9 +17948,9 @@ } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha1-XG/t1Mh77gHNelKKMBRVIfjg/v8=", + "version": "5.4.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha1-QszvLFcf29D2cYsdH15uXvAG9hE=", "dev": true, "bin": { "tsc": "bin/tsc", @@ -18278,9 +17961,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.37", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ua-parser-js/-/ua-parser-js-0.7.37.tgz", - "integrity": "sha1-5GTmbawtM6ehJR19epnWFX7CeDI=", + "version": "0.7.38", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ua-parser-js/-/ua-parser-js-0.7.38.tgz", + "integrity": "sha1-9JfYpNwf7G6FTlyqSy+ZE0Iu8FQ=", "dev": true, "funding": [ { @@ -18397,9 +18080,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha1-PF5PXAg2Yb0472S2Mowm7WyCSMQ=", + "version": "1.0.16", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha1-9tSJ7ZD7LwfWd4TrP1PXiR9zY1Y=", "dev": true, "funding": [ { @@ -18416,8 +18099,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -18445,15 +18128,15 @@ } }, "node_modules/upper-case-first/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/upper-case/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha1-cDrClCXns3zW/UVukkBNRtHz5K4=", + "version": "2.6.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", "dev": true }, "node_modules/uri-js": { @@ -18534,13 +18217,10 @@ } }, "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha1-8Wr9SDGOb5Ch7BATd/oDhM/IxxM=", + "version": "5.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha1-oxZXPptJ88zZDbtutSs/BsbWBOg=", "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -18826,9 +18506,9 @@ } }, "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha1-ZeyId4CDBWyzJIf6qa74LtCGR4c=", + "version": "5.17.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", + "integrity": "sha1-0DdgN4ndlVW4mq7H63iEXEkIm8U=", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -18952,6 +18632,15 @@ "integrity": "sha1-WrENAkhxmJVINrY0n3T/+WHhD2c=", "dev": true }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha1-0sRcbdT7zmIaZvE2y+Mor9BBCzQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -19332,7 +19021,7 @@ }, "src/JSInterop/Microsoft.JSInterop.JS/src": { "name": "@microsoft/dotnet-js-interop", - "version": "9.0.0-ci", + "version": "8.0.0-dev", "license": "MIT", "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.15.0", @@ -19567,9 +19256,9 @@ } }, "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, "dependencies": { "ms": "2.1.2" @@ -19618,18 +19307,6 @@ "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, - "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/minimatch": { "version": "9.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", @@ -19652,13 +19329,10 @@ "dev": true }, "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", - "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", + "version": "7.6.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", + "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -19676,12 +19350,6 @@ "spdx-license-ids": "^3.0.0" } }, - "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - }, "src/ProjectTemplates/test/Templates.Tests": { "name": "microsoft.aspnetcore.projecttemplates.tests", "version": "0.0.1", @@ -19765,9 +19433,9 @@ "dev": true }, "src/SignalR/clients/ts/FunctionalTests/node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha1-XG/t1Mh77gHNelKKMBRVIfjg/v8=", + "version": "5.4.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha1-QszvLFcf29D2cYsdH15uXvAG9hE=", "dev": true, "bin": { "tsc": "bin/tsc", @@ -19833,7 +19501,7 @@ }, "src/SignalR/clients/ts/signalr": { "name": "@microsoft/signalr", - "version": "9.0.0-ci", + "version": "5.0.0-dev", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", @@ -19845,7 +19513,7 @@ }, "src/SignalR/clients/ts/signalr-protocol-msgpack": { "name": "@microsoft/signalr-protocol-msgpack", - "version": "9.0.0-ci", + "version": "5.0.0-dev", "license": "MIT", "dependencies": { "@microsoft/signalr": "*", diff --git a/src/submodules/Node-Externals b/src/submodules/Node-Externals index fb911deddbaf..f1c5c177aa6e 160000 --- a/src/submodules/Node-Externals +++ b/src/submodules/Node-Externals @@ -1 +1 @@ -Subproject commit fb911deddbaf7367146718374a403d393571f18a +Subproject commit f1c5c177aa6e5d8c5784a93c7ca8002e46388acd From fd73ff293d275b17dfe6afb125cb7ec5f4b859b0 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Tue, 11 Jun 2024 21:48:14 +0200 Subject: [PATCH 037/257] [Infrastructure] Update the dependency management script to automatically install vsts-npm-auth and provision a PAT (#56187) * Automatically provision a token when running the script * Install vsts-auth if not present --- eng/scripts/update-npm-dependencies.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/eng/scripts/update-npm-dependencies.ps1 b/eng/scripts/update-npm-dependencies.ps1 index 5a05b286bea5..c3aac4b4c0ec 100644 --- a/eng/scripts/update-npm-dependencies.ps1 +++ b/eng/scripts/update-npm-dependencies.ps1 @@ -17,6 +17,24 @@ if (-not $WhatIf) { Remove-Item .\package-lock.json } +try { + Get-Command vsts-npm-auth -CommandType ExternalScript + Write-Host "vsts-npm-auth is already installed" +} +catch { + Write-Host "Installing vsts-npm-auth" + if (-not $WhatIf) { + npm install -g vsts-npm-auth + } +} + +Write-Host "Provisioning a token for the NPM registry. You might be prompted to authenticate." +if (-not $WhatIf) { + # This command provisions a PAT token for the VSTS NPM registry that lasts for 15 minutes, which is more than enough time to run npm install + # and ensure any missing package is mirrored. + vsts-npm-auth -E 15 -F -C .\.npmrc +} + Write-Host "Running npm install" if (-not $WhatIf) { npm install --prefer-online --include optional From ebd012900cb29dca7d9f252b97bba55181ca9b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Tue, 11 Jun 2024 22:10:04 -0700 Subject: [PATCH 038/257] Fix bullet points in components README (#56192) --- src/Components/README.md | 75 +++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/src/Components/README.md b/src/Components/README.md index cf2fccfb7893..e923f203ce74 100644 --- a/src/Components/README.md +++ b/src/Components/README.md @@ -37,49 +37,52 @@ The following contains a description of each sub-directory in the `Components` d 1. Ensure the repository is clean from any asset that could remain from previous version of the repository. This is recommended when switching branches, or after updating the working branch. -```powershell -git clean -xdff -``` + ```powershell + git clean -xdff + ``` -You may need to kill some processes holding on files that are being deleted, like closing Visual Studio and other `msbuild` or `dotnet` processes. There may also be lingering headless `chrome` processes, but they are not included in this command. The following command may help you but be aware that this could also stop other important tasks: + You may need to kill some processes holding on files that are being deleted, like closing Visual Studio and other `msbuild` or `dotnet` processes. There may also be lingering headless + `chrome` processes, but they are not included in this command. The following command may help you but be aware that this could also stop other important tasks: -```powershell -Get-Process dotnet, escape-node-job, msbuild, VBCSCompiler, node, vstest.console, Microsoft.CodeAnalysis.LanguageServer -ErrorAction Continue | Stop-Process; -``` + ```powershell + Get-Process dotnet, escape-node-job, msbuild, VBCSCompiler, node, vstest.console, Microsoft.CodeAnalysis.LanguageServer -ErrorAction Continue | Stop-Process; + ``` 1. Use NPM to restore the required JavaScript modules. This doesn't require an Internet connection since the sources are read from a sub-module. -```powershell -npm ci --offline -``` + ```powershell + npm ci --offline + ``` 1. You'll need to run the `restore` script locally to install the required dotnet dependencies and setup the repo. The `restore` script is located in the root of the repo. + + ```bash + # Linux or Mac + ./restore.sh + ``` -```bash -./restore.sh -``` - -```powershell -./restore.cmd -``` + ```powershell + # Windows + ./restore.cmd + ``` 1. Now you can build all the JavaScript assets required by the repository (including SignalR for instance) by running the following command: -```powershell -npm run build -``` + ```powershell + npm run build + ``` 1. Build the Components: -```powershell -./src/Components/build.cmd -``` + ```powershell + ./src/Components/build.cmd + ``` 2. Optionally, open the Components in Visual Studio: -```powershell -./src/Components/startvs.cmd -``` + ```powershell + ./src/Components/startvs.cmd + ``` ### Test @@ -103,19 +106,21 @@ follow the previous build steps and then these commands: 1. Activate the locally installed .NET by running the following command. -```bash -source activate.sh -``` + ```bash + # Linux or Mac + source activate.sh + ``` -```powershell -. ./activate.ps1 -``` + ```powershell + # Windows + . ./activate.ps1 + ``` 1. Start the tests. -```powershell -dotnet test ./src/Components/test/E2ETest -``` + ```powershell + dotnet test ./src/Components/test/E2ETest + ``` Note, you may wish to filter tests using the `--filter` command (ie. `dotnet test --filter ./src/Components/test/E2ETest`). From 1bbf3116889240f5d2668bd42b7284e2999e2ee1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:19:32 +0000 Subject: [PATCH 039/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#55852) [main] Update dependencies from dotnet/efcore, dotnet/runtime - remove content-length when combined with chunked encoding - Bump Azure.Identity from 1.10.3 to 1.11.3 Prompted by: ``` /Users/runner/work/1/s/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj : error NU1605: Microsoft.AspNetCore.Identity.FunctionalTests -> Identity.DefaultUI.WebSite -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj : error NU1605: Microsoft.AspNetCore.Identity.FunctionalTests -> Identity.DefaultUI.WebSite -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj : error NU1605: IdentitySample.DefaultUI -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj : error NU1605: IdentitySample.DefaultUI -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj : error NU1605: Identity.DefaultUI.WebSite -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj : error NU1605: Identity.DefaultUI.WebSite -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj : error NU1605: IdentitySample.Mvc -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj : error NU1605: IdentitySample.Mvc -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj : error NU1605: EntityFrameworkCoreSample -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj : error NU1605: EntityFrameworkCoreSample -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj : error NU1605: AuthSamples.FunctionalTests -> Identity.ExternalClaims -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj : error NU1605: AuthSamples.FunctionalTests -> Identity.ExternalClaims -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj : error NU1605: Warning As Error: Detected package downgrade: Azure.Identity from 1.11.3 to 1.10.3. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj : error NU1605: Identity.ExternalClaims -> Microsoft.EntityFrameworkCore.SqlServer 9.0.0-preview.6.24303.4 -> Microsoft.Data.SqlClient 5.2.1 -> Azure.Identity (>= 1.11.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] /Users/runner/work/1/s/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj : error NU1605: Identity.ExternalClaims -> Azure.Identity (>= 1.10.3) [/Users/runner/work/1/s/.dotnet/sdk/9.0.100-preview.6.24277.1/NuGet.targets] ``` - Use ElementType property instead of private reflection - Update SDK to 9.0.100-preview.6.24311.5 - Merge branch 'main' into darc-main-3556fbfd-cfa9-4f80-8b85-6de2ce7ba361 - Update SDK to a later version --- eng/Version.Details.xml | 316 +++++++++--------- eng/Versions.props | 160 ++++----- global.json | 4 +- src/Hosting/TestHost/src/ClientHandler.cs | 6 + .../JsonSchemaMapper.ReflectionHelpers.cs | 3 +- 5 files changed, 248 insertions(+), 241 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5c3edfc67fb5..d8b75f263acd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,321 +9,321 @@ --> - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/efcore - e969995b2701f228815259941467104b6ee8dbee + 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 https://github.com/dotnet/xdt @@ -363,9 +363,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 @@ -376,9 +376,9 @@ - + https://github.com/dotnet/runtime - 745230568e52639e229dcc24c98fe0dbb4c1641d + 8fac5af2b11dc98fa0504f6fd06df790164ec958 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index e7c7cb717fc1..3c452cf9b06e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,91 +63,91 @@ --> - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 - 9.0.0-preview.5.24272.1 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 9.0.0-preview.5.24308.1 9.0.0-preview.5.24308.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 - 9.0.0-preview.5.24271.1 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24304.2 4.11.0-1.24218.5 4.11.0-1.24218.5 @@ -288,7 +288,7 @@ $(MicrosoftAspNetCoreAzureAppServicesSiteExtension80Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension80Version) - 1.10.3 + 1.11.3 0.9.9 0.13.0 4.2.1 diff --git a/global.json b/global.json index f69c8b161db9..9537239e827d 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.6.24302.3" + "version": "9.0.100-preview.6.24311.23" }, "tools": { - "dotnet": "9.0.100-preview.6.24302.3", + "dotnet": "9.0.100-preview.6.24311.23", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" diff --git a/src/Hosting/TestHost/src/ClientHandler.cs b/src/Hosting/TestHost/src/ClientHandler.cs index b6a4b5f5ec9d..90966b5d7f23 100644 --- a/src/Hosting/TestHost/src/ClientHandler.cs +++ b/src/Hosting/TestHost/src/ClientHandler.cs @@ -135,6 +135,12 @@ protected override async Task SendAsync( canHaveBody = false; } } + else + { + // https://www.rfc-editor.org/rfc/rfc9112#section-6.2-2 + // A sender MUST NOT send a Content-Length header field in any message that contains a Transfer-Encoding header field. + requestContent.Headers.Remove(HeaderNames.ContentLength); + } foreach (var header in requestContent.Headers) { diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs index d2ba7cfb7788..f44ef3480b36 100644 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs +++ b/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs @@ -25,7 +25,8 @@ static partial class JsonSchemaMapper private static Type GetElementType(JsonTypeInfo typeInfo) { Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary); - return (Type)typeof(JsonTypeInfo).GetProperty("ElementType", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(typeInfo)!; + // Element type is non-null for enumerable and dictionary types + return typeInfo.ElementType!; } // The source generator currently doesn't populate attribute providers for properties From 8efe5b099fad41fad86b7248d3f8f79a9cc0b410 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Wed, 12 Jun 2024 11:53:24 -0700 Subject: [PATCH 040/257] Exclude artifacts & .packages folders from CodeQL scans (#56197) --- .azure/pipelines/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 0025e83725d6..1b019b7343b6 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -114,6 +114,11 @@ variables: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: _SignType value: test +# Exclude artifacts & .packages folders from CodeQL scans +- name: LGTM_INDEX_FILTERS + value: | + exclude:.packages + exclude:artifacts - template: /eng/common/templates-official/variables/pool-providers.yml@self resources: From f6d12dfa978b1a55c36a3fca36584e6dc20ab54f Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 12 Jun 2024 15:28:09 -0700 Subject: [PATCH 041/257] Update JDK (#56210) --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 9537239e827d..76bd2462fd83 100644 --- a/global.json +++ b/global.json @@ -24,7 +24,7 @@ "xcopy-msbuild": "17.1.0" }, "native-tools": { - "jdk": "11.0.22" + "jdk": "11.0.23" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24272.5", From fc8f7a6394780461fb6e9b5b18008a257db9dad4 Mon Sep 17 00:00:00 2001 From: Brennan Date: Thu, 13 Jun 2024 08:21:44 -0700 Subject: [PATCH 042/257] Use new System.Net.ServerSentEvents package in SignalR (#56206) --- eng/Dependencies.props | 1 + eng/Version.Details.xml | 4 + eng/Versions.props | 1 + .../UnitTests/ServerSentEventsParserTests.cs | 215 ------------------ .../ServerSentEventsTransportTests.cs | 93 +++++++- .../Internal/ServerSentEventsMessageParser.cs | 185 --------------- .../Internal/ServerSentEventsTransport.Log.cs | 1 + .../src/Internal/ServerSentEventsTransport.cs | 82 ++----- ....AspNetCore.Http.Connections.Client.csproj | 1 + .../ServerSentEventsBenchmark.cs | 17 -- 10 files changed, 107 insertions(+), 493 deletions(-) delete mode 100644 src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsParserTests.cs delete mode 100644 src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsMessageParser.cs diff --git a/eng/Dependencies.props b/eng/Dependencies.props index eea85ba1bd4a..bd45447f355e 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -85,6 +85,7 @@ and are generated based on the last package release. + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d8b75f263acd..c14039a249d4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -218,6 +218,10 @@ https://github.com/dotnet/runtime 8fac5af2b11dc98fa0504f6fd06df790164ec958 + + https://github.com/dotnet/runtime + 8fac5af2b11dc98fa0504f6fd06df790164ec958 + https://github.com/dotnet/runtime 8fac5af2b11dc98fa0504f6fd06df790164ec958 diff --git a/eng/Versions.props b/eng/Versions.props index 3c452cf9b06e..4ab313e07231 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -116,6 +116,7 @@ 9.0.0-preview.6.24307.2 9.0.0-preview.6.24307.2 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24307.2 9.0.0-preview.6.24307.2 9.0.0-preview.6.24307.2 9.0.0-preview.6.24307.2 diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsParserTests.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsParserTests.cs deleted file mode 100644 index 996d6a2ad48e..000000000000 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsParserTests.cs +++ /dev/null @@ -1,215 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Buffers; -using System.Collections.Generic; -using System.IO.Pipelines; -using System.Text; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http.Connections.Client.Internal; -using Xunit; - -namespace Microsoft.AspNetCore.SignalR.Client.Tests; - -public class ServerSentEventsParserTests -{ - [Theory] - [InlineData("\r\n", "")] - [InlineData("\r\n:\r\n", "")] - [InlineData("\r\n:comment\r\n", "")] - [InlineData("data: \r\r\n\n", "\r")] - [InlineData(":comment\r\ndata: \r\r\n\r\n", "\r")] - [InlineData("data: A\rB\r\n\r\n", "A\rB")] - [InlineData("data: Hello, World\r\n\r\n", "Hello, World")] - [InlineData("data: Hello, World\r\n\r\ndata: ", "Hello, World")] - [InlineData("data: Hello, World\r\n\r\n:comment\r\ndata: ", "Hello, World")] - [InlineData("data: Hello, World\r\n\r\n:comment", "Hello, World")] - [InlineData("data: Hello, World\r\n\r\n:comment\r\n", "Hello, World")] - [InlineData("data: Hello, World\r\n:comment\r\n\r\n", "Hello, World")] - [InlineData("data: SGVsbG8sIFdvcmxk\r\n\r\n", "SGVsbG8sIFdvcmxk")] - public void ParseSSEMessageSuccessCases(string encodedMessage, string expectedMessage) - { - var buffer = Encoding.UTF8.GetBytes(encodedMessage); - var readableBuffer = new ReadOnlySequence(buffer); - var parser = new ServerSentEventsMessageParser(); - - var parseResult = parser.ParseMessage(readableBuffer, out var consumed, out var examined, out var message); - Assert.Equal(ServerSentEventsMessageParser.ParseResult.Completed, parseResult); - Assert.Equal(consumed, examined); - - var result = Encoding.UTF8.GetString(message); - Assert.Equal(expectedMessage, result); - } - - [Theory] - [InlineData("data: T\r\nfoo: Hello, World\r\n\r\n", "Expected the message prefix 'data: '")] - [InlineData("foo: T\r\ndata: Hello, World\r\n\r\n", "Expected the message prefix 'data: '")] - [InlineData("food: T\r\ndata: Hello, World\r\n\r\n", "Expected the message prefix 'data: '")] - [InlineData("data: T\r\ndata: Hello\n, World\r\n\r\n", "Expected the message prefix 'data: '")] - public void ParseSSEMessageFailureCases(string encodedMessage, string expectedExceptionMessage) - { - var buffer = Encoding.UTF8.GetBytes(encodedMessage); - var readableBuffer = new ReadOnlySequence(buffer); - var parser = new ServerSentEventsMessageParser(); - - var ex = Assert.Throws(() => { parser.ParseMessage(readableBuffer, out var consumed, out var examined, out var message); }); - Assert.Equal(expectedExceptionMessage, ex.Message); - } - - [Theory] - [InlineData("")] - [InlineData(":")] - [InlineData(":comment")] - [InlineData(":comment\r\n")] - [InlineData("data:")] - [InlineData("data: \r")] - [InlineData("data: T\r\nda")] - [InlineData("data: T\r\ndata:")] - [InlineData("data: T\r\ndata: Hello, World")] - [InlineData("data: T\r\ndata: Hello, World\r")] - [InlineData("data: T\r\ndata: Hello, World\n")] - [InlineData("data: T\r\ndata: Hello, World\r\n")] - [InlineData("data: B\r\ndata: SGVsbG8sIFd")] - [InlineData(":\r\ndata:")] - [InlineData("data: T\r\n:\r\n")] - [InlineData("data: T\r\n:\r\ndata:")] - [InlineData("data: T\r\ndata: Hello, World\r\n:comment")] - public void ParseSSEMessageIncompleteParseResult(string encodedMessage) - { - var buffer = Encoding.UTF8.GetBytes(encodedMessage); - var readableBuffer = new ReadOnlySequence(buffer); - var parser = new ServerSentEventsMessageParser(); - - var parseResult = parser.ParseMessage(readableBuffer, out var consumed, out var examined, out var message); - - Assert.Equal(ServerSentEventsMessageParser.ParseResult.Incomplete, parseResult); - } - - [Theory] - [InlineData(new[] { "d", "ata: Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "da", "ta: Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "dat", "a: Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "data", ": Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "data:", " Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "data: Hello, World", "\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "data: Hello, World\r\n", "\r\n" }, "Hello, World")] - [InlineData(new[] { "data: ", "Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "data: ", "Hello, World\n\n" }, "Hello, World")] - [InlineData(new[] { "data: ", "Hello, World\r\n\n" }, "Hello, World")] - [InlineData(new[] { ":", "comment", "\r\n", "d", "ata: Hello, World\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { ":comment", "\r\n", "data: Hello, World", "\r\n\r\n" }, "Hello, World")] - [InlineData(new[] { "data: Hello, World\r\n", ":comment\r\n", "\r\n" }, "Hello, World")] - public async Task ParseMessageAcrossMultipleReadsSuccess(string[] messageParts, string expectedMessage) - { - var parser = new ServerSentEventsMessageParser(); - var pipe = new Pipe(); - - byte[] message = null; - SequencePosition consumed = default, examined = default; - - for (var i = 0; i < messageParts.Length; i++) - { - var messagePart = messageParts[i]; - await pipe.Writer.WriteAsync(Encoding.UTF8.GetBytes(messagePart)); - var result = await pipe.Reader.ReadAsync(); - - var parseResult = parser.ParseMessage(result.Buffer, out consumed, out examined, out message); - pipe.Reader.AdvanceTo(consumed, examined); - - // parse result should be complete only after we parsed the last message part - var expectedResult = - i == messageParts.Length - 1 - ? ServerSentEventsMessageParser.ParseResult.Completed - : ServerSentEventsMessageParser.ParseResult.Incomplete; - - Assert.Equal(expectedResult, parseResult); - } - - Assert.Equal(consumed, examined); - - var resultMessage = Encoding.UTF8.GetString(message); - Assert.Equal(expectedMessage, resultMessage); - } - - [Theory] - [InlineData("data: T\r\nf", "oo: Hello, World\r\n\r\n", "Expected the message prefix 'data: '")] - [InlineData("foo", ": T\r\ndata: Hello, World\r\n\r\n", "Expected the message prefix 'data: '")] - [InlineData("food:", " T\r\ndata: Hello, World\r\n\r\n", "Expected the message prefix 'data: '")] - [InlineData("data: T\r\nda", "ta: Hello\n, World\r\n\r\n", "Expected the message prefix 'data: '")] - public async Task ParseMessageAcrossMultipleReadsFailure(string encodedMessagePart1, string encodedMessagePart2, string expectedMessage) - { - var pipe = new Pipe(); - - // Read the first part of the message - await pipe.Writer.WriteAsync(Encoding.UTF8.GetBytes(encodedMessagePart1)); - - var result = await pipe.Reader.ReadAsync(); - var parser = new ServerSentEventsMessageParser(); - - var parseResult = parser.ParseMessage(result.Buffer, out var consumed, out var examined, out var buffer); - Assert.Equal(ServerSentEventsMessageParser.ParseResult.Incomplete, parseResult); - - pipe.Reader.AdvanceTo(consumed, examined); - - // Send the rest of the data and parse the complete message - await pipe.Writer.WriteAsync(Encoding.UTF8.GetBytes(encodedMessagePart2)); - result = await pipe.Reader.ReadAsync(); - - var ex = Assert.Throws(() => parser.ParseMessage(result.Buffer, out consumed, out examined, out buffer)); - Assert.Equal(expectedMessage, ex.Message); - } - - [Theory] - [InlineData("data: foo\r\n\r\n", "data: bar\r\n\r\n")] - public async Task ParseMultipleMessagesText(string message1, string message2) - { - var pipe = new Pipe(); - - // Read the first part of the message - await pipe.Writer.WriteAsync(Encoding.UTF8.GetBytes(message1 + message2)); - - var result = await pipe.Reader.ReadAsync(); - var parser = new ServerSentEventsMessageParser(); - - var parseResult = parser.ParseMessage(result.Buffer, out var consumed, out var examined, out var message); - Assert.Equal(ServerSentEventsMessageParser.ParseResult.Completed, parseResult); - Assert.Equal("foo", Encoding.UTF8.GetString(message)); - Assert.Equal(consumed, result.Buffer.GetPosition(message1.Length)); - pipe.Reader.AdvanceTo(consumed, examined); - Assert.Equal(consumed, examined); - - parser.Reset(); - - result = await pipe.Reader.ReadAsync(); - parseResult = parser.ParseMessage(result.Buffer, out consumed, out examined, out message); - Assert.Equal(ServerSentEventsMessageParser.ParseResult.Completed, parseResult); - Assert.Equal("bar", Encoding.UTF8.GetString(message)); - pipe.Reader.AdvanceTo(consumed, examined); - } - - public static IEnumerable MultilineMessages - { - get - { - yield return new object[] { "data: Shaolin\r\ndata: Fantastic\r\n\r\n", "Shaolin" + Environment.NewLine + " Fantastic" }; - yield return new object[] { "data: The\r\ndata: Get\r\ndata: Down\r\n\r\n", "The" + Environment.NewLine + "Get" + Environment.NewLine + "Down" }; - } - } - - [Theory] - [MemberData(nameof(MultilineMessages))] - public void ParseMessagesWithMultipleDataLines(string encodedMessage, string expectedMessage) - { - var buffer = Encoding.UTF8.GetBytes(encodedMessage); - var readableBuffer = new ReadOnlySequence(buffer); - var parser = new ServerSentEventsMessageParser(); - - var parseResult = parser.ParseMessage(readableBuffer, out var consumed, out var examined, out var message); - Assert.Equal(ServerSentEventsMessageParser.ParseResult.Completed, parseResult); - Assert.Equal(consumed, examined); - - var result = Encoding.UTF8.GetString(message); - Assert.Equal(expectedMessage, result); - } -} diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsTransportTests.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsTransportTests.cs index bb987398048a..ccf6d2cd1f46 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsTransportTests.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsTransportTests.cs @@ -1,24 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.IO; +using System.Diagnostics; using System.IO.Pipelines; +using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Text; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http.Connections.Client.Internal; using Microsoft.AspNetCore.Internal; -using Microsoft.AspNetCore.SignalR.Tests; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.SignalR.Tests; using Microsoft.Extensions.Logging.Testing; using Moq; using Moq.Protected; -using Xunit; -using System.Net; namespace Microsoft.AspNetCore.SignalR.Client.Tests; @@ -121,7 +117,7 @@ await sseTransport.StartAsync( } [Fact] - public async Task SSETransportStopsWithErrorIfServerSendsIncompleteResults() + public async Task SSETransportStopIfServerSendsIncompleteResults() { var mockHttpHandler = new Mock(); var calls = 0; @@ -156,11 +152,9 @@ public async Task SSETransportStopsWithErrorIfServerSendsIncompleteResults() await sseTransport.StartAsync( new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout(); - var exception = await Assert.ThrowsAsync(() => sseTransport.Input.ReadAllAsync()); + await sseTransport.Input.ReadAllAsync().DefaultTimeout(); await sseTransport.Running.DefaultTimeout(); - - Assert.Equal("Incomplete message.", exception.Message); } } @@ -444,4 +438,81 @@ public async Task StartAsyncSetsCorrectAcceptHeaderForSSE() Assert.Equal(HttpStatusCode.OK, response.StatusCode); } } + + [Theory] + [InlineData(new[] { "\r\n" }, "")] + [InlineData(new[] { "\r\n:\r\n" }, "")] + [InlineData(new[] { "\r\n:comment\r\n" }, "")] + [InlineData(new[] { "data: \r\r\n\n" }, "")] + [InlineData(new[] { ":comment\r\ndata: \r\r\n\r\n" }, "")] + [InlineData(new[] { "data: A\rB\r\n\r\n" }, "A")] + [InlineData(new[] { "data: Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n\r\ndata: " }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n\r\n:comment\r\ndata: " }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n\r\n:comment" }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n\r\n:comment\r\n" }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n:comment\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data: SGVsbG8sIFdvcmxk\r\n\r\n" }, "SGVsbG8sIFdvcmxk")] + [InlineData(new[] { "d", "ata: Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "da", "ta: Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "dat", "a: Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data", ": Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data:", " Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data: Hello, World", "\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n", "\r\n" }, "Hello, World")] + [InlineData(new[] { "data: ", "Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data: ", "Hello, World\n\n" }, "Hello, World")] + [InlineData(new[] { "data: ", "Hello, World\r\n\n" }, "Hello, World")] + [InlineData(new[] { ":", "comment", "\r\n", "d", "ata: Hello, World\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { ":comment", "\r\n", "data: Hello, World", "\r\n\r\n" }, "Hello, World")] + [InlineData(new[] { "data: Hello, World\r\n", ":comment\r\n", "\r\n" }, "Hello, World")] + [InlineData(new[] { "data: Hello \r\n", "data: World\r\n\r\n" }, "Hello \nWorld")] + public async Task CanProcessMessagesSuccessfully(string[] messageParts, string expectedMessage) + { + var mockHttpHandler = new Mock(); + mockHttpHandler.Protected() + .Setup>("SendAsync", ItExpr.IsAny(), ItExpr.IsAny()) + .Returns(async (request, cancellationToken) => + { + await Task.Yield(); + return new HttpResponseMessage { Content = new StreamContent(new OneAtATimeStream(messageParts)) }; + }); + + using (var httpClient = new HttpClient(mockHttpHandler.Object)) + using (StartVerifiableLog()) + { + var sseTransport = new ServerSentEventsTransport(httpClient, loggerFactory: LoggerFactory); + + await sseTransport.StartAsync( + new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout(); + + var message = await sseTransport.Input.ReadAllAsync().DefaultTimeout(); + Assert.Equal(expectedMessage, Encoding.ASCII.GetString(message)); + + await sseTransport.Running.DefaultTimeout(); + } + } + + public sealed class OneAtATimeStream : MemoryStream + { + private readonly string[] _contents; + private int _index; + + public OneAtATimeStream(string[] contents) + { + _contents = contents; + } + + public override ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default) + { + if (_index == _contents.Length) + { + return new(0); + } + + Debug.Assert(buffer.Length > _contents[_index].Length); + + return new(Encoding.UTF8.GetBytes(_contents[_index++], buffer.Span)); + } + } } diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsMessageParser.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsMessageParser.cs deleted file mode 100644 index 9c1d11eec965..000000000000 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsMessageParser.cs +++ /dev/null @@ -1,185 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Buffers; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Text; - -namespace Microsoft.AspNetCore.Http.Connections.Client.Internal; - -internal sealed class ServerSentEventsMessageParser -{ - private const byte ByteCR = (byte)'\r'; - private const byte ByteLF = (byte)'\n'; - private const byte ByteColon = (byte)':'; - - // This uses C# compiler's ability to refer to static data directly. For more information see https://vcsjones.dev/2019/02/01/csharp-readonly-span-bytes-static - private static ReadOnlySpan DataPrefix => "data: "u8; - private static ReadOnlySpan SseLineEnding => "\r\n"u8; - private static readonly byte[] _newLine = Encoding.UTF8.GetBytes(Environment.NewLine); - - private InternalParseState _internalParserState = InternalParseState.ReadMessagePayload; - private readonly List _data = new List(); - - public ParseResult ParseMessage(ReadOnlySequence buffer, out SequencePosition consumed, out SequencePosition examined, out byte[]? message) - { - consumed = buffer.Start; - examined = buffer.End; - message = null; - - var start = consumed; - - while (buffer.Length > 0) - { - if (!(buffer.PositionOf(ByteLF) is SequencePosition lineEnd)) - { - // Partial message. We need to read more. - return ParseResult.Incomplete; - } - - // buffer, and thus line should atleast contain \n at this point. - lineEnd = buffer.GetPosition(1, lineEnd); - var line = ConvertBufferToSpan(buffer.Slice(start, lineEnd)); - buffer = buffer.Slice(line.Length); - - // Skip comments - if (line[0] == ByteColon) - { - start = lineEnd; - consumed = lineEnd; - continue; - } - - if (IsMessageEnd(line)) - { - _internalParserState = InternalParseState.ReadEndOfMessage; - } - else - { - EnsureStartsWithDataPrefix(line); - } - - var payload = Array.Empty(); - switch (_internalParserState) - { - case InternalParseState.ReadMessagePayload: - EnsureStartsWithDataPrefix(line); - - // Slice away the 'data: ' - var payloadLength = line.Length - DataPrefix.Length; - var lineWithEnding = line.Slice(DataPrefix.Length, payloadLength); - var newData = TrimEnding(lineWithEnding).ToArray(); - _data.Add(newData); - - start = lineEnd; - consumed = lineEnd; - break; - case InternalParseState.ReadEndOfMessage: - if (_data.Count == 1) - { - payload = _data[0]; - } - else if (_data.Count > 1) - { - // Find the final size of the payload - var payloadSize = 0; - foreach (var dataLine in _data) - { - payloadSize += dataLine.Length; - } - - payloadSize += _newLine.Length * _data.Count; - - // Allocate space in the payload buffer for the data and the new lines. - // Subtract newLine length because we don't want a trailing newline. - payload = new byte[payloadSize - _newLine.Length]; - - var offset = 0; - foreach (var dataLine in _data) - { - dataLine.CopyTo(payload, offset); - offset += dataLine.Length; - if (offset < payload.Length) - { - _newLine.CopyTo(payload, offset); - offset += _newLine.Length; - } - } - } - - message = payload; - consumed = lineEnd; - examined = consumed; - return ParseResult.Completed; - } - - if (buffer.Length > 0 && buffer.First.Span[0] == ByteCR) - { - _internalParserState = InternalParseState.ReadEndOfMessage; - } - } - return ParseResult.Incomplete; - } - - private static ReadOnlySpan TrimEnding(ReadOnlySpan lineWithEnding) - { - // Up above we ensure that we will have a line ending. - // that can be either CRLF or LF - return lineWithEnding.EndsWith(SseLineEnding) - ? lineWithEnding.Slice(0, lineWithEnding.Length - 2) // CRLF - : lineWithEnding.Slice(0, lineWithEnding.Length - 1); // LF - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static ReadOnlySpan ConvertBufferToSpan(in ReadOnlySequence buffer) - { - if (buffer.IsSingleSegment) - { - return buffer.First.Span; - } - return buffer.ToArray(); - } - - public void Reset() - { - _internalParserState = InternalParseState.ReadMessagePayload; - _data.Clear(); - } - - private static void EnsureStartsWithDataPrefix(ReadOnlySpan line) - { - if (!line.StartsWith(DataPrefix)) - { - throw new FormatException("Expected the message prefix 'data: '"); - } - } - - private static bool IsMessageEnd(ReadOnlySpan line) - { - if (line.Length == 2) - { - return line[0] == ByteCR && line[1] == ByteLF; - } - else if (line.Length == 1) - { - return line[0] == ByteLF; - } - return false; - } - - public enum ParseResult - { - Completed, - Incomplete, - } - - private enum InternalParseState - { - ReadMessagePayload, - ReadEndOfMessage, - Error - } -} diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs index 9e8b871e56cd..b97fc3868a04 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs @@ -37,6 +37,7 @@ private static partial class Log [LoggerMessage(8, LogLevel.Debug, "Server-Sent Event Stream ended.", EventName = "EventStreamEnded")] public static partial void EventStreamEnded(ILogger logger); + // No longer used [LoggerMessage(9, LogLevel.Debug, "Received {Count} bytes. Parsing SSE frame.", EventName = "ParsingSSE")] public static partial void ParsingSSE(ILogger logger, long count); } diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs index 19926c8c0600..0921f132df3a 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs @@ -4,9 +4,9 @@ using System; using System.Diagnostics; using System.IO.Pipelines; -using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Net.ServerSentEvents; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; @@ -25,7 +25,6 @@ internal sealed partial class ServerSentEventsTransport : ITransport private volatile Exception? _error; private readonly CancellationTokenSource _transportCts = new CancellationTokenSource(); private readonly CancellationTokenSource _inputCts = new CancellationTokenSource(); - private readonly ServerSentEventsMessageParser _parser = new ServerSentEventsMessageParser(); private IDuplexPipe? _transport; private IDuplexPipe? _application; @@ -130,80 +129,35 @@ private async Task ProcessEventStream(HttpResponseMessage response, Cancellation Log.StartReceive(_logger); - static void CancelReader(object? state) => ((PipeReader)state!).CancelPendingRead(); - using (response) #pragma warning disable CA2016 // Forward the 'CancellationToken' parameter to methods using (var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) #pragma warning restore CA2016 // Forward the 'CancellationToken' parameter to methods { - var reader = PipeReader.Create(stream); - - using var registration = cancellationToken.Register(CancelReader, reader); - try { - while (true) + var parser = SseParser.Create(stream, (eventType, bytes) => bytes.ToArray()); + await foreach (var item in parser.EnumerateAsync(cancellationToken).ConfigureAwait(false)) { - // We rely on the CancelReader callback to cancel pending reads. Do not pass the token to ReadAsync since that would result in an exception on cancelation. - var result = await reader.ReadAsync(default).ConfigureAwait(false); - var buffer = result.Buffer; - var consumed = buffer.Start; - var examined = buffer.End; + Log.MessageToApplication(_logger, item.Data.Length); - try - { - if (result.IsCanceled) - { - Log.ReceiveCanceled(_logger); - break; - } - - if (!buffer.IsEmpty) - { - Log.ParsingSSE(_logger, buffer.Length); - - var parseResult = _parser.ParseMessage(buffer, out consumed, out examined, out var message); - FlushResult flushResult = default; - - switch (parseResult) - { - case ServerSentEventsMessageParser.ParseResult.Completed: - Log.MessageToApplication(_logger, message!.Length); - - // When cancellationToken is canceled the next line will cancel pending flushes on the pipe unblocking the await. - // Avoid passing the passed in context. - flushResult = await _application.Output.WriteAsync(message, default).ConfigureAwait(false); - - _parser.Reset(); - break; - case ServerSentEventsMessageParser.ParseResult.Incomplete: - if (result.IsCompleted) - { - throw new FormatException("Incomplete message."); - } - break; - } - - // We canceled in the middle of applying back pressure - // or if the consumer is done - if (flushResult.IsCanceled || flushResult.IsCompleted) - { - Log.EventStreamEnded(_logger); - break; - } - } - else if (result.IsCompleted) - { - break; - } - } - finally + // When cancellationToken is canceled the next line will cancel pending flushes on the pipe unblocking the await. + // Avoid passing the passed in context. + var flushResult = await _application.Output.WriteAsync(item.Data, default).ConfigureAwait(false); + + // We canceled in the middle of applying back pressure + // or if the consumer is done + if (flushResult.IsCanceled || flushResult.IsCompleted) { - reader.AdvanceTo(consumed, examined); + Log.EventStreamEnded(_logger); + break; } } } + catch (OperationCanceledException) + { + Log.ReceiveCanceled(_logger); + } catch (Exception ex) { _error = ex; @@ -213,8 +167,6 @@ private async Task ProcessEventStream(HttpResponseMessage response, Cancellation _application.Output.Complete(_error); Log.ReceiveStopped(_logger); - - reader.Complete(); } } } diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj b/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj index 2a04e266f950..7c9977be80e2 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj @@ -25,6 +25,7 @@ + diff --git a/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs b/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs index 330621bd093a..86bd860c4bbb 100644 --- a/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs +++ b/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs @@ -12,8 +12,6 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks; public class ServerSentEventsBenchmark { - private ServerSentEventsMessageParser _parser; - private byte[] _sseFormattedData; private ReadOnlySequence _rawData; [Params(Message.NoArguments, Message.FewArguments, Message.ManyArguments, Message.LargeArguments)] @@ -57,24 +55,9 @@ public void GlobalSetup() break; } - _parser = new ServerSentEventsMessageParser(); _rawData = new ReadOnlySequence(protocol.GetMessageBytes(hubMessage)); var ms = new MemoryStream(); ServerSentEventsMessageFormatter.WriteMessageAsync(_rawData, ms, default).GetAwaiter().GetResult(); - _sseFormattedData = ms.ToArray(); - } - - [Benchmark] - public void ReadSingleMessage() - { - var buffer = new ReadOnlySequence(_sseFormattedData); - - if (_parser.ParseMessage(buffer, out _, out _, out _) != ServerSentEventsMessageParser.ParseResult.Completed) - { - throw new InvalidOperationException("Parse failed!"); - } - - _parser.Reset(); } [Benchmark] From 0da8ea72b5434cbe8e1207d802f2270ca2f8ad4c Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 13 Jun 2024 11:46:03 -0700 Subject: [PATCH 043/257] Update Node-Externals submodule (#56221) --- src/submodules/Node-Externals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/Node-Externals b/src/submodules/Node-Externals index f1c5c177aa6e..a1b1b1bb0163 160000 --- a/src/submodules/Node-Externals +++ b/src/submodules/Node-Externals @@ -1 +1 @@ -Subproject commit f1c5c177aa6e5d8c5784a93c7ca8002e46388acd +Subproject commit a1b1b1bb01630a6109adf5767d9a2770c6dc5639 From 4a3afe3b23e062ca120c08a2761b3ea7775a03f9 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 13 Jun 2024 11:50:17 -0700 Subject: [PATCH 044/257] Update global.json (#56211) --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 76bd2462fd83..cc619c03c036 100644 --- a/global.json +++ b/global.json @@ -24,7 +24,7 @@ "xcopy-msbuild": "17.1.0" }, "native-tools": { - "jdk": "11.0.23" + "jdk": "11" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24272.5", From 482730a4c773ee4b3ae9525186d10999c89b556d Mon Sep 17 00:00:00 2001 From: Petter Hesselberg Date: Fri, 14 Jun 2024 00:28:55 +0200 Subject: [PATCH 045/257] text fix: 'There' -> 'their' plus minor tweaks (#56132) --- src/DefaultBuilder/src/WebApplicationBuilder.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DefaultBuilder/src/WebApplicationBuilder.cs b/src/DefaultBuilder/src/WebApplicationBuilder.cs index c20410fe9cae..2cff4ae4ffb9 100644 --- a/src/DefaultBuilder/src/WebApplicationBuilder.cs +++ b/src/DefaultBuilder/src/WebApplicationBuilder.cs @@ -246,9 +246,9 @@ private static void SetDefaultContentRoot(WebApplicationOptions options, Configu // Logic taken from https://github.com/dotnet/runtime/blob/dc5a6c8be1644915c14c4a464447b0d54e223a46/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs#L209-L227 // If we're running anywhere other than C:\Windows\system32, we default to using the CWD for the ContentRoot. - // However, since many things like Windows services and MSIX installers have C:\Windows\system32 as there CWD which is not likely - // to really be the home for things like appsettings.json, we skip changing the ContentRoot in that case. The non-"default" initial - // value for ContentRoot is AppContext.BaseDirectory (e.g. the executable path) which probably makes more sense than the system32. + // However, since many things like Windows services and MSIX installers have C:\Windows\system32 as their CWD, which is not likely + // to be the home for things like appsettings.json, we skip changing the ContentRoot in that case. The non-"default" initial + // value for ContentRoot is AppContext.BaseDirectory (e.g. the executable path) which probably makes more sense than system32. // In my testing, both Environment.CurrentDirectory and Environment.SystemDirectory return the path without // any trailing directory separator characters. I'm not even sure the casing can ever be different from these APIs, but I think it makes sense to @@ -472,7 +472,7 @@ private void ConfigureApplication(WebHostBuilderContext context, IApplicationBui // Remove the route builder to clean up the properties, we're done adding routes to the pipeline app.Properties.Remove(WebApplication.GlobalEndpointRouteBuilderKey); - // reset route builder if it existed, this is needed for StartupFilters + // Reset route builder if it existed, this is needed for StartupFilters if (priorRouteBuilder is not null) { app.Properties[EndpointRouteBuilderKey] = priorRouteBuilder; From c16c78197d8d672d810dd18ca49df4be857adcb6 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Thu, 13 Jun 2024 20:58:34 -0700 Subject: [PATCH 046/257] Add support for processing DefaultValueAttribute in OpenApi schemas (#56219) --- .../Extensions/JsonObjectSchemaExtensions.cs | 42 +++++++++++++++- .../Services/Schemas/OpenApiSchemaService.cs | 9 +++- ...penApiComponentService.ParameterSchemas.cs | 15 ++++++ ...nApiComponentService.RequestBodySchemas.cs | 48 +++++++++++++++++++ ...OpenApiComponentService.ResponseSchemas.cs | 46 ++++++++++++++++++ src/OpenApi/test/SharedTypes.cs | 20 ++++++++ 6 files changed, 177 insertions(+), 3 deletions(-) diff --git a/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs index 0fa07268e0a9..6b73c4d90df5 100644 --- a/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs @@ -1,12 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Globalization; using System.Linq; +using System.Reflection; +using System.Text.Json; using System.Text.Json.Nodes; +using System.Text.Json.Serialization.Metadata; using JsonSchemaMapper; using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Constraints; using Microsoft.OpenApi.Models; @@ -118,6 +123,29 @@ internal static void ApplyValidationAttributes(this JsonObject schema, IEnumerab } } + /// + /// Populate the default value into the current schema. + /// + /// The produced by the underlying schema generator. + /// An object representing the associated with the default value. + /// The associated with the target type. + internal static void ApplyDefaultValue(this JsonObject schema, object? defaultValue, JsonTypeInfo? jsonTypeInfo) + { + if (jsonTypeInfo is null) + { + return; + } + + if (defaultValue is null) + { + schema[OpenApiSchemaKeywords.DefaultKeyword] = null; + } + else + { + schema[OpenApiSchemaKeywords.DefaultKeyword] = JsonSerializer.SerializeToNode(defaultValue, jsonTypeInfo); + } + } + /// /// Applies the primitive types and formats to the schema based on the type. /// @@ -228,7 +256,8 @@ internal static void ApplyRouteConstraints(this JsonObject schema, IEnumerable /// The produced by the underlying schema generator. /// The associated with the . - internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDescription parameterDescription) + /// The associated with the . + internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDescription parameterDescription, JsonTypeInfo? jsonTypeInfo) { // This is special handling for parameters that are not bound from the body but represented in a complex type. // For example: @@ -251,6 +280,17 @@ internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDesc { var attributes = validations.OfType(); schema.ApplyValidationAttributes(attributes); + if (parameterDescription.ParameterDescriptor is IParameterInfoParameterDescriptor { ParameterInfo: { } parameterInfo }) + { + if (parameterInfo.HasDefaultValue) + { + schema.ApplyDefaultValue(parameterInfo.DefaultValue, jsonTypeInfo); + } + else if (parameterInfo.GetCustomAttributes().LastOrDefault() is { } defaultValueAttribute) + { + schema.ApplyDefaultValue(defaultValueAttribute.Value, jsonTypeInfo); + } + } } // Route constraints are only defined on parameters that are sourced from the path. Since // they are encoded in the route template, and not in the type information based to the underlying diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 1bdb8317a92a..8fae4a984baa 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -1,9 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.IO.Pipelines; +using System.Linq; using System.Text.Json; using System.Text.Json.Nodes; using JsonSchemaMapper; @@ -59,7 +61,10 @@ internal sealed class OpenApiSchemaService( { schema.ApplyValidationAttributes(validationAttributes); } - + if (context.GetCustomAttributes(typeof(DefaultValueAttribute)).LastOrDefault() is DefaultValueAttribute defaultValueAttribute) + { + schema.ApplyDefaultValue(defaultValueAttribute.Value, context.TypeInfo); + } } }; @@ -71,7 +76,7 @@ internal async Task GetOrCreateSchemaAsync(Type type, ApiParamete var schemaAsJsonObject = _schemaStore.GetOrAdd(key, CreateSchema); if (parameterDescription is not null) { - schemaAsJsonObject.ApplyParameterInfo(parameterDescription); + schemaAsJsonObject.ApplyParameterInfo(parameterDescription, _jsonSerializerOptions.GetTypeInfo(type)); } var deserializedSchema = JsonSerializer.Deserialize(schemaAsJsonObject, OpenApiJsonSchemaContext.Default.OpenApiJsonSchema); Debug.Assert(deserializedSchema != null, "The schema should have been deserialized successfully and materialize a non-null value."); diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs index e891d425f171..6b1635256767 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; @@ -145,6 +146,7 @@ await VerifyOpenApiDocument(builder, document => }); } +#nullable enable public static object[][] RouteParametersWithDefaultValues => [ [(int id = 2) => { }, (IOpenApiAny defaultValue) => Assert.Equal(2, ((OpenApiInteger)defaultValue).Value)], @@ -154,6 +156,18 @@ await VerifyOpenApiDocument(builder, document => [(TaskStatus status = TaskStatus.Canceled) => { }, (IOpenApiAny defaultValue) => Assert.Equal(6, ((OpenApiInteger)defaultValue).Value)], // Default value for enums is serialized as string when a converter is registered. [(Status status = Status.Pending) => { }, (IOpenApiAny defaultValue) => Assert.Equal("Pending", ((OpenApiString)defaultValue).Value)], + [([DefaultValue(2)] int id) => { }, (IOpenApiAny defaultValue) => Assert.Equal(2, ((OpenApiInteger)defaultValue).Value)], + [([DefaultValue(3f)] float id) => { }, (IOpenApiAny defaultValue) => Assert.Equal(3, ((OpenApiInteger)defaultValue).Value)], + [([DefaultValue("test")] string id) => { }, (IOpenApiAny defaultValue) => Assert.Equal("test", ((OpenApiString)defaultValue).Value)], + [([DefaultValue(true)] bool id) => { }, (IOpenApiAny defaultValue) => Assert.True(((OpenApiBoolean)defaultValue).Value)], + [([DefaultValue(TaskStatus.Canceled)] TaskStatus status) => { }, (IOpenApiAny defaultValue) => Assert.Equal(6, ((OpenApiInteger)defaultValue).Value)], + [([DefaultValue(Status.Pending)] Status status) => { }, (IOpenApiAny defaultValue) => Assert.Equal("Pending", ((OpenApiString)defaultValue).Value)], + [([DefaultValue(null)] int? id) => { }, (IOpenApiAny defaultValue) => Assert.True(defaultValue is OpenApiNull)], + [([DefaultValue(2)] int? id) => { }, (IOpenApiAny defaultValue) => Assert.Equal(2, ((OpenApiInteger)defaultValue).Value)], + [([DefaultValue(null)] string? id) => { }, (IOpenApiAny defaultValue) => Assert.True(defaultValue is OpenApiNull)], + [([DefaultValue("foo")] string? id) => { }, (IOpenApiAny defaultValue) => Assert.Equal("foo", ((OpenApiString)defaultValue).Value)], + [([DefaultValue(null)] TaskStatus? status) => { }, (IOpenApiAny defaultValue) => Assert.True(defaultValue is OpenApiNull)], + [([DefaultValue(TaskStatus.Canceled)] TaskStatus? status) => { }, (IOpenApiAny defaultValue) => Assert.Equal(6, ((OpenApiInteger)defaultValue).Value)], ]; [Theory] @@ -175,6 +189,7 @@ await VerifyOpenApiDocument(builder, document => assert(openApiDefault); }); } +#nullable restore [Fact] public async Task GetOpenApiParameters_HandlesEnumParameterWithoutConverter() diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs index a46882ea6c88..d25808ece8e4 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs @@ -4,6 +4,7 @@ using System.IO.Pipelines; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc; +using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; public partial class OpenApiComponentServiceTests : OpenApiDocumentServiceTestBase @@ -54,6 +55,53 @@ await VerifyOpenApiDocument(builder, document => }); } + [Fact] + public async Task GetOpenApiRequestBody_GeneratesSchemaForPoco_WithValidationAttributes() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/", (ProjectBoard todo) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + + Assert.NotNull(requestBody); + var content = Assert.Single(requestBody.Content); + Assert.Equal("application/json", content.Key); + Assert.NotNull(content.Value.Schema); + Assert.Equal("object", content.Value.Schema.Type); + Assert.Collection(content.Value.Schema.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal(1, property.Value.Minimum); + Assert.Equal(100, property.Value.Maximum); + Assert.True(property.Value.Default is OpenApiNull); + }, + property => + { + Assert.Equal("name", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal(5, property.Value.MinLength); + Assert.True(property.Value.Default is OpenApiNull); + }, + property => + { + Assert.Equal("isPrivate", property.Key); + Assert.Equal("boolean", property.Value.Type); + var defaultValue = Assert.IsAssignableFrom(property.Value.Default); + Assert.True(defaultValue.Value); + }); + + }); + } + [Fact] public async Task GetOpenApiRequestBody_GeneratesSchemaForFileTypes() { diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs index c9edafae041d..a028780e25ad 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs @@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; +using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; public partial class OpenApiComponentServiceTests : OpenApiDocumentServiceTestBase @@ -90,6 +91,51 @@ await VerifyOpenApiDocument(builder, document => }); } + [Fact] + public async Task GetOpenApiResponse_GeneratesSchemaForPoco_WithValidationAttributes() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/", () => new ProjectBoard { Id = 2, Name = "Test", IsPrivate = false }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Get]; + var response = operation.Responses["200"]; + + Assert.NotNull(response); + var content = Assert.Single(response.Content); + Assert.Equal("application/json", content.Key); + Assert.NotNull(content.Value.Schema); + Assert.Equal("object", content.Value.Schema.Type); + Assert.Collection(content.Value.Schema.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal(1, property.Value.Minimum); + Assert.Equal(100, property.Value.Maximum); + }, + property => + { + Assert.Equal("name", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal(5, property.Value.MinLength); + }, + property => + { + Assert.Equal("isPrivate", property.Key); + Assert.Equal("boolean", property.Value.Type); + var defaultValue = Assert.IsAssignableFrom(property.Value.Default); + Assert.True(defaultValue.Value); + }); + + }); + } + [Fact] public async Task GetOpenApiResponse_HandlesNullablePocoResponse() { diff --git a/src/OpenApi/test/SharedTypes.cs b/src/OpenApi/test/SharedTypes.cs index edf8f45c29b5..2ecd7d73e2a5 100644 --- a/src/OpenApi/test/SharedTypes.cs +++ b/src/OpenApi/test/SharedTypes.cs @@ -4,6 +4,9 @@ // This file contains shared types that are used across tests, sample apps, // and benchmark apps. +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; using Microsoft.AspNetCore.Http; @@ -72,3 +75,20 @@ internal class PaginatedItems(int pageIndex, int pageSize, long totalItems, i public int TotalPages { get; set; } = totalPages; public IEnumerable Items { get; set; } = items; } + +#nullable enable +internal class ProjectBoard +{ + [Range(1, 100)] + [DefaultValue(null)] + public int Id { get; set; } + + [MinLength(5)] + [DefaultValue(null)] + [UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Used in tests.")] + public string? Name { get; set; } + + [DefaultValue(true)] + public required bool IsPrivate { get; set; } +} +#nullable restore From a6fe7f803533844f8b5dbb33efc0cd535202b22f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:58:27 +0800 Subject: [PATCH 047/257] [main] Update dependencies from dotnet/xdt (#56191) * Update dependencies from https://github.com/dotnet/xdt build 20240610.1 Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24303.1 -> To Version 9.0.0-preview.24310.1 * Update dependencies from https://github.com/dotnet/xdt build 20240610.1 Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24303.1 -> To Version 9.0.0-preview.24310.1 * Update dependencies from https://github.com/dotnet/xdt build 20240610.1 Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24303.1 -> To Version 9.0.0-preview.24310.1 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c14039a249d4..8502f2c7f58c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -329,14 +329,14 @@ https://github.com/dotnet/runtime 8fac5af2b11dc98fa0504f6fd06df790164ec958 - + https://github.com/dotnet/xdt - b1d534fe8831bbf62dc4356a7e611befee6ece33 + 3081f87e9bf53c96a5b692f1de4bd530c4447080 - + https://github.com/dotnet/xdt - b1d534fe8831bbf62dc4356a7e611befee6ece33 + 3081f87e9bf53c96a5b692f1de4bd530c4447080 diff --git a/eng/Versions.props b/eng/Versions.props index 4ab313e07231..a4c4c1d98879 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,8 +174,8 @@ 9.0.0-preview.6.24307.1 - 9.0.0-preview.24303.1 - 9.0.0-preview.24303.1 + 9.0.0-preview.24310.1 + 9.0.0-preview.24310.1 + PKV004 diff --git a/src/Framework/App.Runtime/src/CompatibilitySuppressions.xml b/src/Framework/App.Runtime/src/CompatibilitySuppressions.xml index addf7e253000..044b90f8b6da 100644 --- a/src/Framework/App.Runtime/src/CompatibilitySuppressions.xml +++ b/src/Framework/App.Runtime/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + PKV0001 diff --git a/src/Http/Routing/src/Matching/NegotiationMatcherPolicy.cs b/src/Http/Routing/src/Matching/NegotiationMatcherPolicy.cs index f14c9a041c30..c6670eace440 100644 --- a/src/Http/Routing/src/Matching/NegotiationMatcherPolicy.cs +++ b/src/Http/Routing/src/Matching/NegotiationMatcherPolicy.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Linq; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; @@ -236,7 +235,7 @@ public IReadOnlyList GetEdges(IReadOnlyList endpoints) { var endpoint = endpoints[i]; var metadata = GetMetadataValue(endpoint) ?? DefaultNegotiationValue; - if (!edges.TryGetValue(metadata, out var endpointsForType)) + if (!edges.TryGetValue(metadata, out var _)) { edges.Add(metadata, []); } @@ -286,7 +285,7 @@ public IReadOnlyList GetEdges(IReadOnlyList endpoints) { result[index] = new PolicyNodeEdge( // Metadata quality is 0 for the edges that don't have metadata as we prefer serving from the endpoints that have metadata - new NegotiationEdgeKey(kvp.Key, kvp.Value.Select(e => GetMetadataQuality(e) ?? 0).ToArray()), + new NegotiationEdgeKey(kvp.Key, CalculateEndpointQualities(kvp.Value)), kvp.Value); index++; } @@ -294,6 +293,16 @@ public IReadOnlyList GetEdges(IReadOnlyList endpoints) return result; } + private double[] CalculateEndpointQualities(List values) + { + var result = new double[values.Count]; + for (var i = 0; i < values.Count; i++) + { + result[i] = GetMetadataQuality(values[i]) ?? 0; + } + return result; + } + internal class NegotiationEdgeKey { public NegotiationEdgeKey(string negotiationValue, double[] endpointsQuality) @@ -326,7 +335,7 @@ PolicyJumpTable INodeBuilderPolicy.BuildJumpTable(int exitDestination, IReadOnly { var e = edges[i]; var key = (NegotiationEdgeKey)e.State; - destinations[i] = (negotiationValue: key.NegotiationValue, quality: key.EndpointsQuality.Max(), destination: e.Destination); + destinations[i] = (negotiationValue: key.NegotiationValue, quality: Max(key.EndpointsQuality), destination: e.Destination); } // If any edge matches all negotiation values, then treat that as the 'exit'. This will @@ -347,6 +356,22 @@ PolicyJumpTable INodeBuilderPolicy.BuildJumpTable(int exitDestination, IReadOnly return CreateTable(exitDestination, destinations, noNegotiationHeaderDestination); } + private static double Max(double[] endpointsQuality) + { + if (endpointsQuality.Length == 0) + { + throw new InvalidOperationException("No quality values found."); + } + + var result = endpointsQuality[0]; + for (var i = 1; i < endpointsQuality.Length; i++) + { + result = Math.Max(result, endpointsQuality[i]); + } + + return result; + } + private protected abstract NegotiationPolicyJumpTable CreateTable(int exitDestination, (string negotiationValue, double quality, int destination)[] destinations, int noNegotiationHeaderDestination); private sealed class NegotiationMetadataEndpointComparer : EndpointMetadataComparer diff --git a/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt b/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..1edfae904adf 100644 --- a/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt +++ b/src/Http/WebUtilities/src/PublicAPI.Unshipped.txt @@ -1 +1,2 @@ #nullable enable +static Microsoft.AspNetCore.WebUtilities.WebEncoders.Base64UrlEncode(System.ReadOnlySpan input, System.Span output) -> int diff --git a/src/Mvc/Mvc.Core/src/Builder/ControllerActionEndpointConventionBuilder.cs b/src/Mvc/Mvc.Core/src/Builder/ControllerActionEndpointConventionBuilder.cs index d231cac8c3a0..8a59a8b1204d 100644 --- a/src/Mvc/Mvc.Core/src/Builder/ControllerActionEndpointConventionBuilder.cs +++ b/src/Mvc/Mvc.Core/src/Builder/ControllerActionEndpointConventionBuilder.cs @@ -23,6 +23,8 @@ internal ControllerActionEndpointConventionBuilder(object @lock, List Items { get; set; } = []; + /// /// Adds the specified convention to the builder. Conventions are used to customize instances. /// diff --git a/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs b/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs index 8156d0b7157b..581dca9503a7 100644 --- a/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs +++ b/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs @@ -17,6 +17,8 @@ namespace Microsoft.AspNetCore.Builder; /// public static class ControllerEndpointRouteBuilderExtensions { + internal const string EndpointRouteBuilderKey = "__EndpointRouteBuilder"; + /// /// Adds endpoints for controller actions to the without specifying any routes. /// @@ -28,7 +30,13 @@ public static ControllerActionEndpointConventionBuilder MapControllers(this IEnd EnsureControllerServices(endpoints); - return GetOrCreateDataSource(endpoints).DefaultBuilder; + var result = GetOrCreateDataSource(endpoints).DefaultBuilder; + if (!result.Items.ContainsKey(EndpointRouteBuilderKey)) + { + result.Items[EndpointRouteBuilderKey] = endpoints; + } + + return result; } /// @@ -46,6 +54,11 @@ public static ControllerActionEndpointConventionBuilder MapDefaultControllerRout EnsureControllerServices(endpoints); var dataSource = GetOrCreateDataSource(endpoints); + if (!dataSource.DefaultBuilder.Items.ContainsKey(EndpointRouteBuilderKey)) + { + dataSource.DefaultBuilder.Items[EndpointRouteBuilderKey] = endpoints; + } + return dataSource.AddRoute( "default", "{controller=Home}/{action=Index}/{id?}", @@ -90,6 +103,11 @@ public static ControllerActionEndpointConventionBuilder MapControllerRoute( EnsureControllerServices(endpoints); var dataSource = GetOrCreateDataSource(endpoints); + if (!dataSource.DefaultBuilder.Items.ContainsKey(EndpointRouteBuilderKey)) + { + dataSource.DefaultBuilder.Items[EndpointRouteBuilderKey] = endpoints; + } + return dataSource.AddRoute( name, pattern, diff --git a/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs b/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs index b20c3b5c6300..98a5f90de666 100644 --- a/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs +++ b/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs @@ -4,7 +4,9 @@ using System.Buffers; using System.Diagnostics.CodeAnalysis; using System.Text.Encodings.Web; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Html; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; @@ -221,6 +223,8 @@ protected bool TryResolveUrl([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Re return false; } + trimmedUrl = GetVersionedResourceUrl(trimmedUrl); + var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext); resolvedUrl = urlHelper.Content(trimmedUrl); @@ -244,6 +248,8 @@ protected bool TryResolveUrl([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Re return false; } + trimmedUrl = GetVersionedResourceUrl(trimmedUrl); + var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext); var appRelativeUrl = urlHelper.Content(trimmedUrl); var postTildeSlashUrlValue = trimmedUrl.Substring(2); @@ -299,6 +305,41 @@ private static bool TryCreateTrimmedString(string input, [NotNullWhen(true)] out return true; } + private string GetVersionedResourceUrl(string value) + { + var assetCollection = GetAssetCollection(); + if (assetCollection != null) + { + var (key, remainder) = ExtractKeyAndRest(value); + + var src = assetCollection[key]; + if (!string.Equals(src, key, StringComparison.Ordinal)) + { + return $"~/{src}{value[remainder..]}"; + } + } + + return value; + + static (string key, int rest) ExtractKeyAndRest(string value) + { + var lastNonWhitespaceChar = value.AsSpan().TrimEnd().LastIndexOfAnyExcept(ValidAttributeWhitespaceChars); + var keyEnd = lastNonWhitespaceChar > -1 ? lastNonWhitespaceChar + 1 : value.Length; + var key = value.AsSpan(); + if (key.StartsWith("~/", StringComparison.Ordinal)) + { + key = value.AsSpan()[2..keyEnd].Trim(); + } + + return (key.ToString(), keyEnd); + } + } + + private ResourceAssetCollection? GetAssetCollection() + { + return ViewContext.HttpContext.GetEndpoint()?.Metadata.GetMetadata(); + } + private sealed class EncodeFirstSegmentContent : IHtmlContent { private readonly string _firstSegment; diff --git a/src/Mvc/Mvc.Razor/test/TagHelpers/UrlResolutionTagHelperTest.cs b/src/Mvc/Mvc.Razor/test/TagHelpers/UrlResolutionTagHelperTest.cs index a6e2a92b5529..94c2fe3bfdc0 100644 --- a/src/Mvc/Mvc.Razor/test/TagHelpers/UrlResolutionTagHelperTest.cs +++ b/src/Mvc/Mvc.Razor/test/TagHelpers/UrlResolutionTagHelperTest.cs @@ -1,7 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Html; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.Extensions.WebEncoders.Testing; @@ -36,6 +38,29 @@ public static TheoryData ResolvableUrlData } } + public static TheoryData ResolvableUrlVersionData + { + get + { + // url, expectedHref + return new TheoryData + { + { "~/home/index.html", "/approot/home/index.fingerprint.html" }, + { "~/home/index.html\r\n", "/approot/home/index.fingerprint.html" }, + { " ~/home/index.html", "/approot/home/index.fingerprint.html" }, + { "\u000C~/home/index.html\r\n", "/approot/home/index.fingerprint.html" }, + { "\t ~/home/index.html\n", "/approot/home/index.fingerprint.html" }, + { "\r\n~/home/index.html\u000C\t", "/approot/home/index.fingerprint.html" }, + { "\r~/home/index.html\t", "/approot/home/index.fingerprint.html" }, + { "\n~/home/index.html\u202F", "/approot/home/index.fingerprint.html\u202F" }, + { + "~/home/index.html ~/secondValue/index.html", + "/approot/home/index.html ~/secondValue/index.html" + }, + }; + } + } + [Fact] public void Process_DoesNothingIfTagNameIsNull() { @@ -85,7 +110,10 @@ public void Process_ResolvesTildeSlashValues(string url, string expectedHref) urlHelperFactory .Setup(f => f.GetUrlHelper(It.IsAny())) .Returns(urlHelperMock.Object); - var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()); + var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()) + { + ViewContext = new Rendering.ViewContext { HttpContext = new DefaultHttpContext() } + }; var context = new TagHelperContext( tagName: "a", @@ -142,7 +170,10 @@ public void Process_ResolvesTildeSlashValues_InHtmlString(string url, string exp urlHelperFactory .Setup(f => f.GetUrlHelper(It.IsAny())) .Returns(urlHelperMock.Object); - var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()); + var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()) + { + ViewContext = new Rendering.ViewContext { HttpContext = new DefaultHttpContext() } + }; var context = new TagHelperContext( tagName: "a", @@ -333,7 +364,10 @@ public void Process_ThrowsWhenEncodingNeededAndIUrlHelperActsUnexpectedly() urlHelperFactory .Setup(f => f.GetUrlHelper(It.IsAny())) .Returns(urlHelperMock.Object); - var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()); + var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()) + { + ViewContext = new Rendering.ViewContext { HttpContext = new DefaultHttpContext() } + }; var context = new TagHelperContext( tagName: "a", @@ -347,4 +381,55 @@ public void Process_ThrowsWhenEncodingNeededAndIUrlHelperActsUnexpectedly() () => tagHelper.Process(context, tagHelperOutput)); Assert.Equal(expectedExceptionMessage, exception.Message, StringComparer.Ordinal); } + + [Theory] + [MemberData(nameof(ResolvableUrlVersionData))] + public void Process_ResolvesVersionedUrls_WhenResourceCollectionIsAvailable(string url, string expectedHref) + { + // Arrange + var tagHelperOutput = new TagHelperOutput( + tagName: "a", + attributes: new TagHelperAttributeList + { + { "href", url } + }, + getChildContentAsync: (useCachedResult, encoder) => Task.FromResult(null)); + var urlHelperMock = new Mock(); + urlHelperMock + .Setup(urlHelper => urlHelper.Content(It.IsAny())) + .Returns(new Func(value => "/approot" + value.Substring(1))); + var urlHelperFactory = new Mock(); + urlHelperFactory + .Setup(f => f.GetUrlHelper(It.IsAny())) + .Returns(urlHelperMock.Object); + + var httpContext = new DefaultHttpContext(); + httpContext.SetEndpoint(new Endpoint( + (context) => Task.CompletedTask, + new EndpointMetadataCollection( + [new ResourceAssetCollection([new("home/index.fingerprint.html", [new ResourceAssetProperty("label", "home/index.html")])])]), + "Test")); + + var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder()) + { + ViewContext = new Rendering.ViewContext { HttpContext = httpContext } + }; + + var context = new TagHelperContext( + tagName: "a", + allAttributes: new TagHelperAttributeList( + Enumerable.Empty()), + items: new Dictionary(), + uniqueId: "test"); + + // Act + tagHelper.Process(context, tagHelperOutput); + + // Assert + var attribute = Assert.Single(tagHelperOutput.Attributes); + Assert.Equal("href", attribute.Name, StringComparer.Ordinal); + var attributeValue = Assert.IsType(attribute.Value); + Assert.Equal(expectedHref, attributeValue, StringComparer.Ordinal); + Assert.Equal(HtmlAttributeValueStyle.DoubleQuotes, attribute.ValueStyle); + } } diff --git a/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilder.cs b/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilder.cs index c4b6694f9cb7..c041e25808a6 100644 --- a/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilder.cs +++ b/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilder.cs @@ -23,6 +23,8 @@ internal PageActionEndpointConventionBuilder(object @lock, List Items { get; set; } = new Dictionary(); + /// /// Adds the specified convention to the builder. Conventions are used to customize instances. /// diff --git a/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensions.cs b/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensions.cs new file mode 100644 index 000000000000..743250f8a9ee --- /dev/null +++ b/src/Mvc/Mvc.RazorPages/src/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensions.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Endpoints; +using Microsoft.AspNetCore.Routing; +using static Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions; + +namespace Microsoft.AspNetCore.Builder; + +/// +/// Extensions for . +/// +public static class PageActionEndpointConventionBuilderResourceCollectionExtensions +{ + private const string ResourceCollectionResolverKey = "__ResourceCollectionResolver"; + + /// + /// Adds a metadata instance to the endpoints. + /// + /// The . + /// The manifest associated with the assets. + /// + public static PageActionEndpointConventionBuilder WithStaticAssets( + this PageActionEndpointConventionBuilder builder, + string? manifestPath = null) + { + ArgumentNullException.ThrowIfNull(builder); + + if (builder.Items.TryGetValue(EndpointRouteBuilderKey, out var endpointBuilder)) + { + var (resolver, registered) = builder.Items.TryGetValue(ResourceCollectionResolverKey, out var value) + ? ((ResourceCollectionResolver)value, true) + : (new ResourceCollectionResolver((IEndpointRouteBuilder)endpointBuilder), false); + + resolver.ManifestName = manifestPath; + if (!registered) + { + builder.Items[ResourceCollectionResolverKey] = resolver; + var collection = resolver.ResolveResourceCollection(); + var importMap = resolver.ResolveImportMap(); + + builder.Add(endpointBuilder => + { + endpointBuilder.Metadata.Add(collection); + endpointBuilder.Metadata.Add(importMap); + }); + } + } + + return builder; + } +} diff --git a/src/Mvc/Mvc.RazorPages/src/Builder/RazorPagesEndpointRouteBuilderExtensions.cs b/src/Mvc/Mvc.RazorPages/src/Builder/RazorPagesEndpointRouteBuilderExtensions.cs index a5d579105888..a3acb36ed7e6 100644 --- a/src/Mvc/Mvc.RazorPages/src/Builder/RazorPagesEndpointRouteBuilderExtensions.cs +++ b/src/Mvc/Mvc.RazorPages/src/Builder/RazorPagesEndpointRouteBuilderExtensions.cs @@ -17,6 +17,8 @@ namespace Microsoft.AspNetCore.Builder; /// public static class RazorPagesEndpointRouteBuilderExtensions { + internal const string EndpointRouteBuilderKey = "__EndpointRouteBuilder"; + /// /// Adds endpoints for Razor Pages to the . /// @@ -28,7 +30,12 @@ public static PageActionEndpointConventionBuilder MapRazorPages(this IEndpointRo EnsureRazorPagesServices(endpoints); - return GetOrCreateDataSource(endpoints).DefaultBuilder; + var builder = GetOrCreateDataSource(endpoints).DefaultBuilder; + if (!builder.Items.ContainsKey(EndpointRouteBuilderKey)) + { + builder.Items[EndpointRouteBuilderKey] = endpoints; + } + return builder; } /// diff --git a/src/Mvc/Mvc.RazorPages/src/Infrastructure/PageActionEndpointDataSourceFactory.cs b/src/Mvc/Mvc.RazorPages/src/Infrastructure/PageActionEndpointDataSourceFactory.cs index b882f1029f42..b1e0b718bdd7 100644 --- a/src/Mvc/Mvc.RazorPages/src/Infrastructure/PageActionEndpointDataSourceFactory.cs +++ b/src/Mvc/Mvc.RazorPages/src/Infrastructure/PageActionEndpointDataSourceFactory.cs @@ -24,6 +24,10 @@ public PageActionEndpointDataSourceFactory( public PageActionEndpointDataSource Create(OrderedEndpointsSequenceProvider orderProvider) { - return new PageActionEndpointDataSource(_dataSourceIdProvider, _actions, _endpointFactory, orderProvider); + return new PageActionEndpointDataSource( + _dataSourceIdProvider, + _actions, + _endpointFactory, + orderProvider); } } diff --git a/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..3dc85b737c41 100644 --- a/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.RazorPages/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilderResourceCollectionExtensions +static Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilderResourceCollectionExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder! builder, string? manifestPath = null) -> Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder! diff --git a/src/Mvc/Mvc.RazorPages/test/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs b/src/Mvc/Mvc.RazorPages/test/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs new file mode 100644 index 000000000000..c2837e8d6d29 --- /dev/null +++ b/src/Mvc/Mvc.RazorPages/test/Builder/PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs @@ -0,0 +1,287 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.AspNetCore.Mvc.Razor.Compilation; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.AspNetCore.Razor.Hosting; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.FileProviders; + +namespace Microsoft.AspNetCore.Builder; + +public class PageActionEndpointConventionBuilderResourceCollectionExtensionsTest +{ + [Fact] + public void WithStaticAssets_AddsEmptyResourceCollection_ToEndpoints_NoStaticAssetsMapped() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + var builder = endpointBuilder.MapRazorPages(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(0, list.Count); + }); + } + + [Fact] + public void WithStaticAssets_AddsEmptyResourceCollection_ToEndpoints_NoMatchingStaticAssetsMapped() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapRazorPages(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(1).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(0, list.Count); + }); + } + + [Fact] + public void WithStaticAssets_AddsResourceCollection_ToEndpoints_NamedManifest() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapRazorPages(); + + // Act + builder.WithStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(1).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("named.css", list[0].Url); + }); + } + + [Fact] + public void WithStaticAssets_AddsResourceCollection_ToEndpoints_DefaultManifest() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + var builder = endpointBuilder.MapRazorPages(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(1).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("default.css", list[0].Url); + }); + } + + [Fact] + public void WithStaticAssets_AddsDefaultResourceCollectionToEndpoints_WhenNoManifestProvided_EvenIfManyAvailable() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapRazorPages(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(2).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("default.css", list[0].Url); + }); + } + + [Fact] + public void WithStaticAssets_AddsMatchingResourceCollectionToEndpoints_WhenExplicitManifestProvided_EvenIfManyAvailable() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapRazorPages(); + + // Act + builder.WithStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(2).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("named.css", list[0].Url); + }); + } + + [Fact] + public void WithStaticAssets_AddsCollectionFromGroup_WhenMappedInsideAnEndpointGroup() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + + var group = endpointBuilder.MapGroup("/group"); + group.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = group.MapRazorPages(); + + // Act + builder.WithStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + + // Assert + var groupEndpoints = Assert.IsAssignableFrom(group).DataSources; + Assert.All(groupEndpoints.Skip(1).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("named.css", list[0].Url); + }); + } + + [Fact] + public void WithStaticAssets_AddsEmptyCollectionFromGroup_WhenMappingNotFound_InsideGroup() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + + var group = endpointBuilder.MapGroup("/group"); + group.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = group.MapRazorPages(); + + // Act + builder.WithStaticAssets(); + + // Assert + var groupEndpoints = Assert.IsAssignableFrom(group).DataSources; + Assert.All(groupEndpoints.Skip(1).First().Endpoints, e => + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(0, list.Count); + }); + } + + private class TestEndpointRouteBuilder : IEndpointRouteBuilder + { + private readonly ApplicationBuilder _applicationBuilder; + + public TestEndpointRouteBuilder() + { + _applicationBuilder = new ApplicationBuilder(ServiceProvider); + } + + public IServiceProvider ServiceProvider { get; } = CreateServiceProvider(); + + private static IServiceProvider CreateServiceProvider() + { + var collection = new ServiceCollection(); + collection.AddSingleton(new ConfigurationBuilder().Build()); + collection.AddSingleton(new TestWebHostEnvironment()); + collection.AddSingleton(new ApplicationPartManager()); + collection.AddSingleton(new DiagnosticListener("Microsoft.AspNetCore")); + collection.AddSingleton(new TestDiagnosticSource()); + collection.AddLogging(); + collection.AddOptions(); + collection.AddMvc() + .ConfigureApplicationPartManager(apm => + { + apm.FeatureProviders.Clear(); + apm.FeatureProviders.Add(new TestRazorPagesFeatureProvider()); + }); + return collection.BuildServiceProvider(); + } + + public ICollection DataSources { get; } = []; + + public IApplicationBuilder CreateApplicationBuilder() + { + return _applicationBuilder.New(); + } + + private class TestRazorPagesFeatureProvider : IApplicationFeatureProvider + { + public void PopulateFeature(IEnumerable parts, ViewsFeature feature) + { + feature.ViewDescriptors.Clear(); + feature.ViewDescriptors.Add(new CompiledViewDescriptor(TestRazorCompiledItem.CreateForPage(typeof(Index), "/Pages/Index.cshtml"))); + } + } + + [Route("/")] + private class Index : PageBase + { + public object Model { get; set; } + + public override Task ExecuteAsync() + { + throw new NotImplementedException(); + } + } + + private class TestWebHostEnvironment : IWebHostEnvironment + { + public string ApplicationName { get; set; } = "TestApplication"; + public string EnvironmentName { get; set; } = "TestEnvironment"; + public string WebRootPath { get; set; } = ""; + public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } } + public string ContentRootPath { get; set; } = Directory.GetCurrentDirectory(); + public IFileProvider ContentRootFileProvider { get; set; } = CreateTestFileProvider(); + + private static TestFileProvider CreateTestFileProvider() + { + var provider = new TestFileProvider(); + provider.AddFile("site.css", "body { color: red; }"); + return provider; + } + } + + private class TestDiagnosticSource : DiagnosticSource + { + public override bool IsEnabled(string name) + { + return false; + } + + public override void Write(string name, object value) { } + } + } +} + diff --git a/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj b/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj index ea72cc610342..c9e51798bea6 100644 --- a/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj +++ b/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj @@ -1,4 +1,4 @@ - + $(DefaultNetCoreTargetFramework) @@ -8,8 +8,14 @@ + + + + + + diff --git a/src/Mvc/Mvc.RazorPages/test/TestApplication.staticwebassets.endpoints.json b/src/Mvc/Mvc.RazorPages/test/TestApplication.staticwebassets.endpoints.json new file mode 100644 index 000000000000..586241880352 --- /dev/null +++ b/src/Mvc/Mvc.RazorPages/test/TestApplication.staticwebassets.endpoints.json @@ -0,0 +1,17 @@ +{ + "Version": 1, + "Endpoints": [ + { + "Route": "default.css", + "AssetFile": "default.css", + "Selectors": [], + "EndpointProperties": [], + "ResponseHeaders": [ + { + "Name": "ETag", + "Value": "\"Fake\"" + } + ] + } + ] +} diff --git a/src/Mvc/Mvc.RazorPages/test/TestManifests/Test.staticwebassets.endpoints.json b/src/Mvc/Mvc.RazorPages/test/TestManifests/Test.staticwebassets.endpoints.json new file mode 100644 index 000000000000..77815b7c379c --- /dev/null +++ b/src/Mvc/Mvc.RazorPages/test/TestManifests/Test.staticwebassets.endpoints.json @@ -0,0 +1,17 @@ +{ + "Version": 1, + "Endpoints": [ + { + "Route": "named.css", + "AssetFile": "named.css", + "Selectors": [], + "EndpointProperties": [], + "ResponseHeaders": [ + { + "Name": "ETag", + "Value": "\"Fake\"" + } + ] + } + ] +} diff --git a/src/Mvc/Mvc.TagHelpers/src/ImageTagHelper.cs b/src/Mvc/Mvc.TagHelpers/src/ImageTagHelper.cs index 9cdd30d32e13..6c590e7cffee 100644 --- a/src/Mvc/Mvc.TagHelpers/src/ImageTagHelper.cs +++ b/src/Mvc/Mvc.TagHelpers/src/ImageTagHelper.cs @@ -123,8 +123,9 @@ public override void Process(TagHelperContext context, TagHelperOutput output) // pipeline have touched the value. If the value is already encoded this ImageTagHelper may // not function properly. Src = output.Attributes[SrcAttributeName].Value as string; + var src = GetVersionedResourceUrl(Src); - output.Attributes.SetAttribute(SrcAttributeName, FileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, Src)); + output.Attributes.SetAttribute(SrcAttributeName, src); } } @@ -135,4 +136,24 @@ private void EnsureFileVersionProvider() FileVersionProvider = ViewContext.HttpContext.RequestServices.GetRequiredService(); } } + + private string GetVersionedResourceUrl(string url) + { + if (AppendVersion == true) + { + var pathBase = ViewContext.HttpContext.Request.PathBase; + if (ResourceCollectionUtilities.TryResolveFromAssetCollection(ViewContext, url, out var resolvedUrl)) + { + url = resolvedUrl; + return url; + } + + if (url != null) + { + url = FileVersionProvider.AddFileVersionToPath(pathBase, url); + } + } + + return url; + } } diff --git a/src/Mvc/Mvc.TagHelpers/src/LinkTagHelper.cs b/src/Mvc/Mvc.TagHelpers/src/LinkTagHelper.cs index f7950deae6d6..5177990cf149 100644 --- a/src/Mvc/Mvc.TagHelpers/src/LinkTagHelper.cs +++ b/src/Mvc/Mvc.TagHelpers/src/LinkTagHelper.cs @@ -276,11 +276,12 @@ public override void Process(TagHelperContext context, TagHelperOutput output) if (Href != null) { + var href = GetVersionedResourceUrl(Href); var index = output.Attributes.IndexOfName(HrefAttributeName); var existingAttribute = output.Attributes[index]; output.Attributes[index] = new TagHelperAttribute( existingAttribute.Name, - FileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, Href), + href, existingAttribute.ValueStyle); } } @@ -452,7 +453,7 @@ private void AppendFallbackHrefs(TagHelperContent builder, IReadOnlyList var valueToWrite = fallbackHrefs[i]; if (AppendVersion == true) { - valueToWrite = FileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, fallbackHrefs[i]); + valueToWrite = GetVersionedResourceUrl(fallbackHrefs[i]); } // Must HTML-encode the href attribute value to ensure the written element is valid. Must also @@ -520,11 +521,7 @@ private void BuildLinkTag(string href, TagHelperAttributeList attributes, TagHel private void AppendVersionedHref(string hrefName, string hrefValue, TagHelperContent builder) { - if (AppendVersion == true) - { - hrefValue = FileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, hrefValue); - } - + hrefValue = GetVersionedResourceUrl(hrefValue); builder .AppendHtml(hrefName) .AppendHtml("=\"") @@ -532,6 +529,27 @@ private void AppendVersionedHref(string hrefName, string hrefValue, TagHelperCon .AppendHtml("\" "); } + private string GetVersionedResourceUrl(string url) + { + if (AppendVersion == true) + { + var pathBase = ViewContext.HttpContext.Request.PathBase; + + if (ResourceCollectionUtilities.TryResolveFromAssetCollection(ViewContext, url, out var resolvedUrl)) + { + url = resolvedUrl; + return url; + } + + if (url != null) + { + url = FileVersionProvider.AddFileVersionToPath(pathBase, url); + } + } + + return url; + } + private enum Mode { /// diff --git a/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..1c4ffad9ba5e 100644 --- a/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.TagHelpers/src/PublicAPI.Unshipped.txt @@ -1 +1,5 @@ #nullable enable +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ImportMap.get -> Microsoft.AspNetCore.Components.ImportMapDefinition +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.ImportMap.set -> void +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Type.get -> string +~Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper.Type.set -> void diff --git a/src/Mvc/Mvc.TagHelpers/src/ResourceCollectionUtilities.cs b/src/Mvc/Mvc.TagHelpers/src/ResourceCollectionUtilities.cs new file mode 100644 index 000000000000..20559efe9571 --- /dev/null +++ b/src/Mvc/Mvc.TagHelpers/src/ResourceCollectionUtilities.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc.Rendering; + +namespace Microsoft.AspNetCore.Mvc.TagHelpers; + +internal static class ResourceCollectionUtilities +{ + internal static bool TryResolveFromAssetCollection(ViewContext viewContext, string url, out string resolvedUrl) + { + var pathBase = viewContext.HttpContext.Request.PathBase; + var assetCollection = viewContext.HttpContext.GetEndpoint()?.Metadata.GetMetadata(); + if (assetCollection != null) + { + var value = url.StartsWith('/') ? url[1..] : url; + if (assetCollection.IsContentSpecificUrl(value)) + { + resolvedUrl = url; + return true; + } + + var src = assetCollection[value]; + if (!string.Equals(src, value, StringComparison.Ordinal)) + { + resolvedUrl = url.StartsWith('/') ? $"/{src}" : src; + return true; + } + + if (pathBase.HasValue && url.StartsWith(pathBase, StringComparison.OrdinalIgnoreCase)) + { + var length = pathBase.Value.EndsWith('/') ? pathBase.Value.Length : pathBase.Value.Length + 1; + var relativePath = url[length..]; + if (assetCollection.IsContentSpecificUrl(relativePath)) + { + resolvedUrl = url; + return true; + } + + src = assetCollection[relativePath]; + if (!string.Equals(src, relativePath, StringComparison.Ordinal)) + { + if (pathBase.Value.EndsWith('/')) + { + resolvedUrl = $"{pathBase}{src}"; + return true; + } + else + { + resolvedUrl = $"{pathBase}/{src}"; + return true; + } + } + } + } + + resolvedUrl = null; + return false; + } +} diff --git a/src/Mvc/Mvc.TagHelpers/src/ScriptTagHelper.cs b/src/Mvc/Mvc.TagHelpers/src/ScriptTagHelper.cs index 3fdaa8410a31..88da4462a9ad 100644 --- a/src/Mvc/Mvc.TagHelpers/src/ScriptTagHelper.cs +++ b/src/Mvc/Mvc.TagHelpers/src/ScriptTagHelper.cs @@ -3,8 +3,10 @@ using System.Diagnostics; using System.Text.Encodings.Web; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Html; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Razor.Infrastructure; using Microsoft.AspNetCore.Mvc.Razor.TagHelpers; using Microsoft.AspNetCore.Mvc.Routing; @@ -28,6 +30,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers; [HtmlTargetElement("script", Attributes = FallbackSrcExcludeAttributeName)] [HtmlTargetElement("script", Attributes = FallbackTestExpressionAttributeName)] [HtmlTargetElement("script", Attributes = AppendVersionAttributeName)] +[HtmlTargetElement("script", Attributes = TypeAttributeName)] +[HtmlTargetElement("script", Attributes = ImportMapAttributeName)] public class ScriptTagHelper : UrlResolutionTagHelper { private const string SrcIncludeAttributeName = "asp-src-include"; @@ -40,6 +44,9 @@ public class ScriptTagHelper : UrlResolutionTagHelper private const string SrcAttributeName = "src"; private const string IntegrityAttributeName = "integrity"; private const string AppendVersionAttributeName = "asp-append-version"; + private const string TypeAttributeName = "type"; + private const string ImportMapAttributeName = "asp-importmap"; + private static readonly Func Compare = (a, b) => a - b; private StringWriter _stringWriter; @@ -115,6 +122,12 @@ public ScriptTagHelper( [HtmlAttributeName(SrcAttributeName)] public string Src { get; set; } + /// + /// Type of the script. + /// + [HtmlAttributeName(TypeAttributeName)] + public string Type { get; set; } + /// /// A comma separated list of globbed file patterns of JavaScript scripts to load. /// The glob patterns are assessed relative to the application's 'webroot' setting. @@ -174,6 +187,16 @@ public ScriptTagHelper( [HtmlAttributeName(FallbackTestExpressionAttributeName)] public string FallbackTestExpression { get; set; } + /// + /// The to use for the document. + /// + /// + /// If this is not set and the type value is "importmap", + /// the import map will be retrieved by default from the current . + /// + [HtmlAttributeName(ImportMapAttributeName)] + public ImportMapDefinition ImportMap { get; set; } + /// /// Gets the for the application. /// @@ -217,6 +240,25 @@ public override void Process(TagHelperContext context, TagHelperOutput output) ArgumentNullException.ThrowIfNull(context); ArgumentNullException.ThrowIfNull(output); + if (string.Equals(Type, "importmap", StringComparison.OrdinalIgnoreCase)) + { + // This is an importmap script, we'll write out the import map and + // stop processing. + var importMap = ImportMap ?? ViewContext.HttpContext.GetEndpoint()?.Metadata.GetMetadata(); + if (importMap == null) + { + // No importmap found, nothing to do. + output.SuppressOutput(); + return; + } + + output.TagName = "script"; + output.TagMode = TagMode.StartTagAndEndTag; + output.Attributes.SetAttribute("type", "importmap"); + output.Content.SetHtmlContent(importMap.ToString()); + return; + } + // Pass through attribute that is also a well-known HTML attribute. if (Src != null) { @@ -240,14 +282,14 @@ public override void Process(TagHelperContext context, TagHelperOutput output) if (AppendVersion == true) { EnsureFileVersionProvider(); - + var versionedSrc = GetVersionedSrc(Src); if (Src != null) { var index = output.Attributes.IndexOfName(SrcAttributeName); var existingAttribute = output.Attributes[index]; output.Attributes[index] = new TagHelperAttribute( existingAttribute.Name, - FileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, Src), + versionedSrc, existingAttribute.ValueStyle); } } @@ -366,7 +408,17 @@ private string GetVersionedSrc(string srcValue) { if (AppendVersion == true) { - srcValue = FileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, srcValue); + var pathBase = ViewContext.HttpContext.Request.PathBase; + if (ResourceCollectionUtilities.TryResolveFromAssetCollection(ViewContext, srcValue, out var resolvedUrl)) + { + srcValue = resolvedUrl; + return srcValue; + } + + if (srcValue != null) + { + srcValue = FileVersionProvider.AddFileVersionToPath(pathBase, srcValue); + } } return srcValue; diff --git a/src/Mvc/Mvc.TagHelpers/test/ImageTagHelperTest.cs b/src/Mvc/Mvc.TagHelpers/test/ImageTagHelperTest.cs index a31fbac04ce7..b4af99e52609 100644 --- a/src/Mvc/Mvc.TagHelpers/test/ImageTagHelperTest.cs +++ b/src/Mvc/Mvc.TagHelpers/test/ImageTagHelperTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Text; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; @@ -160,6 +161,69 @@ public void RendersImageTag_AddsFileVersion() Assert.Equal("/images/test-image.png?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", srcAttribute.Value); } + [Theory] + [InlineData("~/images/test-image.png", "/bar", "/bar/images/test-image.fingerprint.png")] + [InlineData("/images/test-image.png", null, "/images/test-image.fingerprint.png")] + [InlineData("images/test-image.png", null, "images/test-image.fingerprint.png")] + public void RendersImageTag_AddsFileVersion_WithStaticAssets(string src, string pathBase, string expectedValue) + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + { "alt", new HtmlString("Alt image text") }, + { "src", src }, + { "asp-append-version", "true" } + }); + var output = MakeImageTagHelperOutput(attributes: new TagHelperAttributeList + { + { "alt", new HtmlString("Alt image text") }, + }); + var hostingEnvironment = MakeHostingEnvironment(); + var viewContext = MakeViewContext(); + + var urlHelperFactory = MakeUrlHelperFactory(value => + { + if (value.StartsWith("~/", StringComparison.Ordinal)) + { + return pathBase == null ? value.Replace("~/", string.Empty) : value.Replace("~/", pathBase + "/"); + } + return value; + }); + + var helper = GetHelper(urlHelperFactory: urlHelperFactory); + helper.ViewContext = viewContext; + helper.ViewContext.HttpContext = new DefaultHttpContext(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + if (pathBase != null) + { + helper.ViewContext.HttpContext.Request.PathBase = new PathString(pathBase); + } + helper.Src = src; + helper.AppendVersion = true; + + // Act + helper.Process(context, output); + + // Assert + Assert.True(output.Content.GetContent().Length == 0); + Assert.Equal("img", output.TagName); + Assert.Equal(2, output.Attributes.Count); + var srcAttribute = Assert.Single(output.Attributes, attr => attr.Name.Equals("src")); + Assert.Equal(expectedValue, srcAttribute.Value); + } + + private Endpoint CreateEndpoint() + { + return new Endpoint( + (context) => Task.CompletedTask, + new EndpointMetadataCollection( + [new ResourceAssetCollection([ + new("images/test-image.fingerprint.png", [new ResourceAssetProperty("label", "images/test-image.png")]), + ])]), + "Test"); + } + [Fact] public void RendersImageTag_DoesNotAddFileVersion() { @@ -226,7 +290,7 @@ public void RendersImageTag_AddsFileVersion_WithRequestPathBase() private static ViewContext MakeViewContext(string requestPathBase = null) { - var actionContext = new ActionContext(new DefaultHttpContext(), new RouteData(), new ActionDescriptor()); + var actionContext = new ActionContext(new DefaultHttpContext(), new AspNetCore.Routing.RouteData(), new ActionDescriptor()); if (requestPathBase != null) { actionContext.HttpContext.Request.PathBase = new Http.PathString(requestPathBase); @@ -314,13 +378,13 @@ private static IWebHostEnvironment MakeHostingEnvironment() return hostingEnvironment.Object; } - private static IUrlHelperFactory MakeUrlHelperFactory() + private static IUrlHelperFactory MakeUrlHelperFactory(Func contentAction = null) { var urlHelper = new Mock(); - + contentAction ??= (url) => url; urlHelper .Setup(helper => helper.Content(It.IsAny())) - .Returns(new Func(url => url)); + .Returns(new Func(contentAction)); var urlHelperFactory = new Mock(); urlHelperFactory diff --git a/src/Mvc/Mvc.TagHelpers/test/LinkTagHelperTest.cs b/src/Mvc/Mvc.TagHelpers/test/LinkTagHelperTest.cs index 8b04fa7e6835..0ce563ec4fe4 100644 --- a/src/Mvc/Mvc.TagHelpers/test/LinkTagHelperTest.cs +++ b/src/Mvc/Mvc.TagHelpers/test/LinkTagHelperTest.cs @@ -3,9 +3,11 @@ using System.Globalization; using System.Text; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.Razor.Infrastructure; @@ -14,8 +16,6 @@ using Microsoft.AspNetCore.Mvc.ViewEngines; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; -using Microsoft.AspNetCore.Routing; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Primitives; @@ -725,6 +725,82 @@ public void RendersLinkTags_WithFileVersion() Assert.Equal("/css/site.css?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", output.Attributes["href"].Value); } + [Theory] + [InlineData("~/css/site.css", "/css/site.fingerprint.css")] + [InlineData("/css/site.css", "/css/site.fingerprint.css")] + [InlineData("css/site.css", "css/site.fingerprint.css")] + public void RendersLinkTag_WithFileVersion_UsingResourceCollection(string href, string expected) + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + { "href", href }, + { "asp-append-version", "true" } + }); + var output = MakeTagHelperOutput("link", attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + }); + + var helper = GetHelper(urlHelperFactory: MakeUrlHelperFactory(value => + value.StartsWith("~/", StringComparison.Ordinal) ? value[1..] : value)); + + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.Href = href; + helper.AppendVersion = true; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("link", output.TagName); + Assert.Equal(expected, output.Attributes["href"].Value); + } + + [Theory] + [InlineData("~/css/site.css")] + [InlineData("/approot/css/site.css")] + public void RenderLinkTags_PathBase_WithFileVersion_UsingResourceCollection(string href) + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + { "href", href }, + { "asp-append-version", "true" } + }); + var output = MakeTagHelperOutput("link", attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + }); + + var urlHelperFactory = MakeUrlHelperFactory(value => + { + if (value.StartsWith("~/", StringComparison.Ordinal)) + { + return value.Replace("~/", "/approot/"); + } + + return value; + }); + + var helper = GetHelper(urlHelperFactory: urlHelperFactory); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.ViewContext.HttpContext.Request.PathBase = "/approot"; + helper.Href = href; + helper.AppendVersion = true; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("link", output.TagName); + Assert.Equal("/approot/css/site.fingerprint.css", output.Attributes["href"].Value); + } + [Fact] public void RendersLinkTags_WithFileVersion_AndRequestPathBase() { @@ -809,6 +885,61 @@ public void RenderLinkTags_FallbackHref_WithFileVersion() Assert.Equal(expectedPostElement, output.PostElement.GetContent()); } + [Fact] + public void RenderLinkTags_FallbackHref_WithFileVersion_WithStaticAssets() + { + // Arrange + var expectedPostElement = Environment.NewLine + + ""; + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + { "asp-append-version", "true" }, + { "asp-fallback-href-include", "**/fallback.css" }, + { "asp-fallback-test-class", "hidden" }, + { "asp-fallback-test-property", "visibility" }, + { "asp-fallback-test-value", "hidden" }, + { "href", "/css/site.css" }, + { "rel", new HtmlString("stylesheet") }, + }); + var output = MakeTagHelperOutput( + "link", + attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + }); + var globbingUrlBuilder = new Mock( + new TestFileProvider(), + Mock.Of(), + PathString.Empty); + globbingUrlBuilder.Setup(g => g.BuildUrlList(null, "**/fallback.css", null)) + .Returns(new[] { "/fallback.css" }); + + var helper = GetHelper(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.AppendVersion = true; + helper.Href = "/css/site.css"; + helper.FallbackHrefInclude = "**/fallback.css"; + helper.FallbackTestClass = "hidden"; + helper.FallbackTestProperty = "visibility"; + helper.FallbackTestValue = "hidden"; + helper.GlobbingUrlBuilder = globbingUrlBuilder.Object; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("link", output.TagName); + Assert.Equal("/css/site.fingerprint.css", output.Attributes["href"].Value); + Assert.Equal(expectedPostElement, output.PostElement.GetContent()); + } + [Fact] public void RenderLinkTags_FallbackHref_WithFileVersion_EncodesAsExpected() { @@ -922,6 +1053,48 @@ public void RendersLinkTags_GlobbedHref_WithFileVersion() content); } + [Fact] + public void RendersLinkTags_GlobbedHref_WithFileVersion_WithStaticAssets() + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + { "href", "/css/site.css" }, + { "asp-href-include", "**/*.css" }, + { "asp-append-version", "true" }, + }); + var output = MakeTagHelperOutput("link", attributes: new TagHelperAttributeList + { + { "rel", new HtmlString("stylesheet") }, + }); + var globbingUrlBuilder = new Mock( + new TestFileProvider(), + Mock.Of(), + PathString.Empty); + globbingUrlBuilder.Setup(g => g.BuildUrlList(null, "**/*.css", null)) + .Returns(new[] { "/base.css" }); + + var helper = GetHelper(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.GlobbingUrlBuilder = globbingUrlBuilder.Object; + helper.Href = "/css/site.css"; + helper.HrefInclude = "**/*.css"; + helper.AppendVersion = true; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("link", output.TagName); + Assert.Equal("/css/site.fingerprint.css", output.Attributes["href"].Value); + var content = HtmlContentUtilities.HtmlContentToString(output.PostElement, new HtmlTestEncoder()); + Assert.Equal( + "", + content); + } + private static LinkTagHelper GetHelper( IWebHostEnvironment hostingEnvironment = null, IUrlHelperFactory urlHelperFactory = null, @@ -948,7 +1121,7 @@ private static LinkTagHelper GetHelper( private static ViewContext MakeViewContext(string requestPathBase = null) { - var actionContext = new ActionContext(new DefaultHttpContext(), new RouteData(), new ActionDescriptor()); + var actionContext = new ActionContext(new DefaultHttpContext(), new AspNetCore.Routing.RouteData(), new ActionDescriptor()); if (requestPathBase != null) { actionContext.HttpContext.Request.PathBase = new PathString(requestPathBase); @@ -1015,13 +1188,27 @@ private static IWebHostEnvironment MakeHostingEnvironment() return hostingEnvironment.Object; } - private static IUrlHelperFactory MakeUrlHelperFactory() + private Endpoint CreateEndpoint() + { + return new Endpoint( + (context) => Task.CompletedTask, + new EndpointMetadataCollection( + [new ResourceAssetCollection([ + new("css/site.fingerprint.css", [new ResourceAssetProperty("label", "css/site.css")]), + new("base.fingerprint.css", [new ResourceAssetProperty("label", "base.css")]), + new("fallback.fingerprint.css", [new ResourceAssetProperty("label", "fallback.css")]), + ])]), + "Test"); + } + + private static IUrlHelperFactory MakeUrlHelperFactory(Func content = null) { var urlHelper = new Mock(); + content ??= (url) => url; urlHelper .Setup(helper => helper.Content(It.IsAny())) - .Returns(new Func(url => url)); + .Returns(new Func(content)); var urlHelperFactory = new Mock(); urlHelperFactory .Setup(f => f.GetUrlHelper(It.IsAny())) diff --git a/src/Mvc/Mvc.TagHelpers/test/ScriptTagHelperTest.cs b/src/Mvc/Mvc.TagHelpers/test/ScriptTagHelperTest.cs index ccee2f22d48a..e6877cf7e8b3 100644 --- a/src/Mvc/Mvc.TagHelpers/test/ScriptTagHelperTest.cs +++ b/src/Mvc/Mvc.TagHelpers/test/ScriptTagHelperTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Text; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; @@ -13,7 +14,6 @@ using Microsoft.AspNetCore.Mvc.ViewEngines; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; -using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Logging; @@ -638,6 +638,176 @@ public void RenderScriptTags_WithFileVersion() Assert.Equal("/js/site.js?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", output.Attributes["src"].Value); } + [Theory] + [InlineData("~/js/site.js", "/js/site.fingerprint.js")] + [InlineData("/js/site.js", "/js/site.fingerprint.js")] + [InlineData("js/site.js", "js/site.fingerprint.js")] + public void RenderScriptTags_WithFileVersion_UsingResourceCollection(string src, string expected) + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + new TagHelperAttribute("src", src), + new TagHelperAttribute("asp-append-version", "true") + }); + var output = MakeTagHelperOutput("script", attributes: new TagHelperAttributeList()); + + var helper = GetHelper(urlHelperFactory: MakeUrlHelperFactory(value => + value.StartsWith("~/", StringComparison.Ordinal) ? value[1..] : value)); + + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.Src = src; + helper.AppendVersion = true; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("script", output.TagName); + Assert.Equal(expected, output.Attributes["src"].Value); + } + + [Theory] + [InlineData("~/js/site.js")] + [InlineData("/approot/js/site.js")] + public void RenderScriptTags_PathBase_WithFileVersion_UsingResourceCollection(string path) + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + new TagHelperAttribute("src", path), + new TagHelperAttribute("asp-append-version", "true") + }); + var output = MakeTagHelperOutput("script", attributes: new TagHelperAttributeList()); + + var urlHelperFactory = MakeUrlHelperFactory(value => + { + if (value.StartsWith("~/", StringComparison.Ordinal)) + { + return value.Replace("~/", "/approot/"); + } + + return value; + }); + + var helper = GetHelper(urlHelperFactory: urlHelperFactory); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.ViewContext.HttpContext.Request.PathBase = "/approot"; + helper.Src = path; + helper.AppendVersion = true; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("script", output.TagName); + Assert.Equal("/approot/js/site.fingerprint.js", output.Attributes["src"].Value); + } + + [Fact] + public void ScriptTagHelper_RendersProvided_ImportMap() + { + // Arrange + var importMap = new ImportMapDefinition( + new Dictionary + { + { "jquery", "https://code.jquery.com/jquery-3.5.1.min.js" }, + { "bootstrap", "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" } + }, + new Dictionary> + { + ["development"] = new Dictionary + { + { "jquery", "https://code.jquery.com/jquery-3.5.1.js" }, + { "bootstrap", "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.js" } + }.AsReadOnly() + }, + new Dictionary + { + { "https://code.jquery.com/jquery-3.5.1.js", "sha384-jquery" }, + { "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.js", "sha256-bootstrap" } + }); + + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + new TagHelperAttribute("type", "importmap"), + new TagHelperAttribute("asp-importmap", importMap) + }); + var output = MakeTagHelperOutput("script", attributes: new TagHelperAttributeList()); + + var helper = GetHelper(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.Type = "importmap"; + helper.ImportMap = importMap; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("script", output.TagName); + Assert.Equal(importMap.ToJson(), output.Content.GetContent()); + } + + [Fact] + public void ScriptTagHelper_RendersImportMap_FromEndpoint() + { + // Arrange + var importMap = new ImportMapDefinition( + new Dictionary + { + { "jquery", "https://code.jquery.com/jquery-3.5.1.min.js" }, + { "bootstrap", "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" } + }, + new Dictionary> + { + ["development"] = new Dictionary + { + { "jquery", "https://code.jquery.com/jquery-3.5.1.js" }, + { "bootstrap", "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.js" } + }.AsReadOnly() + }, + new Dictionary + { + { "https://code.jquery.com/jquery-3.5.1.js", "sha384-jquery" }, + { "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.js", "sha256-bootstrap" } + }); + + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + new TagHelperAttribute("type", "importmap"), + }); + var output = MakeTagHelperOutput("script", attributes: new TagHelperAttributeList()); + + var helper = GetHelper(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint(importMap)); + helper.Type = "importmap"; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("script", output.TagName); + Assert.Equal(importMap.ToJson(), output.Content.GetContent()); + } + + private Endpoint CreateEndpoint(ImportMapDefinition importMap = null) + { + return new Endpoint( + (context) => Task.CompletedTask, + new EndpointMetadataCollection( + [new ResourceAssetCollection([ + new("js/site.fingerprint.js", [new ResourceAssetProperty("label", "js/site.js")]), + new("common.fingerprint.js", [new ResourceAssetProperty("label", "common.js")]), + new("fallback.fingerprint.js", [new ResourceAssetProperty("label", "fallback.js")]), + ]), + importMap ?? new ImportMapDefinition(null, null, null)]), + "Test"); + } + [Fact] public void RenderScriptTags_WithFileVersion_AndRequestPathBase() { @@ -694,6 +864,38 @@ public void RenderScriptTags_FallbackSrc_WithFileVersion() "]]\"));", output.PostElement.GetContent()); } + [Fact] + public void RenderScriptTags_FallbackSrc_AppendVersion_WithStaticAssets() + { + // Arrange + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + new TagHelperAttribute("src", "/js/site.js"), + new TagHelperAttribute("asp-fallback-src-include", "fallback.js"), + new TagHelperAttribute("asp-fallback-test", "isavailable()"), + new TagHelperAttribute("asp-append-version", "true") + }); + var output = MakeTagHelperOutput("script", attributes: new TagHelperAttributeList()); + + var helper = GetHelper(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.FallbackSrc = "fallback.js"; + helper.FallbackTestExpression = "isavailable()"; + helper.AppendVersion = true; + helper.Src = "/js/site.js"; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("script", output.TagName); + Assert.Equal("/js/site.fingerprint.js", output.Attributes["src"].Value); + Assert.Equal(Environment.NewLine + "]]\"));", output.PostElement.GetContent()); + } + [Fact] public void RenderScriptTags_FallbackSrc_WithFileVersion_EncodesAsExpected() { @@ -784,6 +986,45 @@ public void RenderScriptTags_GlobbedSrc_WithFileVersion() Assert.Equal(expectedContent, content); } + [Fact] + public void RenderScriptTags_GlobbedSrc_WithFileVersion_WithStaticAssets() + { + // Arrange + var expectedContent = "" + + ""; + var context = MakeTagHelperContext( + attributes: new TagHelperAttributeList + { + new TagHelperAttribute("src", "/js/site.js"), + new TagHelperAttribute("asp-src-include", "*.js"), + new TagHelperAttribute("asp-append-version", "true") + }); + var output = MakeTagHelperOutput("script", attributes: new TagHelperAttributeList()); + var globbingUrlBuilder = new Mock( + new TestFileProvider(), + Mock.Of(), + PathString.Empty); + globbingUrlBuilder.Setup(g => g.BuildUrlList(null, "*.js", null)) + .Returns(new[] { "/common.js" }); + + var helper = GetHelper(); + helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); + helper.GlobbingUrlBuilder = globbingUrlBuilder.Object; + helper.SrcInclude = "*.js"; + helper.AppendVersion = true; + helper.Src = "/js/site.js"; + + // Act + helper.Process(context, output); + + // Assert + Assert.Equal("script", output.TagName); + Assert.Equal("/js/site.fingerprint.js", output.Attributes["src"].Value); + var content = HtmlContentUtilities.HtmlContentToString(output, new HtmlTestEncoder()); + Assert.Equal(expectedContent, content); + } + private static ScriptTagHelper GetHelper( IWebHostEnvironment hostingEnvironment = null, IUrlHelperFactory urlHelperFactory = null, @@ -823,10 +1064,10 @@ private TagHelperContext MakeTagHelperContext( private static ViewContext MakeViewContext(string requestPathBase = null) { - var actionContext = new ActionContext(new DefaultHttpContext(), new RouteData(), new ActionDescriptor()); + var actionContext = new ActionContext(new DefaultHttpContext(), new AspNetCore.Routing.RouteData(), new ActionDescriptor()); if (requestPathBase != null) { - actionContext.HttpContext.Request.PathBase = new Http.PathString(requestPathBase); + actionContext.HttpContext.Request.PathBase = new PathString(requestPathBase); } var metadataProvider = new EmptyModelMetadataProvider(); @@ -876,13 +1117,13 @@ private static IWebHostEnvironment MakeHostingEnvironment() return hostingEnvironment.Object; } - private static IUrlHelperFactory MakeUrlHelperFactory() + private static IUrlHelperFactory MakeUrlHelperFactory(Func urlResolver = null) { var urlHelper = new Mock(); - + urlResolver ??= (url) => url; urlHelper .Setup(helper => helper.Content(It.IsAny())) - .Returns(new Func(url => url)); + .Returns(new Func(urlResolver)); var urlHelperFactory = new Mock(); urlHelperFactory diff --git a/src/Mvc/Mvc.ViewFeatures/src/Builder/ControllerActionEndpointConventionBuilderResourceCollectionExtensions.cs b/src/Mvc/Mvc.ViewFeatures/src/Builder/ControllerActionEndpointConventionBuilderResourceCollectionExtensions.cs new file mode 100644 index 000000000000..9e1d1b7234d6 --- /dev/null +++ b/src/Mvc/Mvc.ViewFeatures/src/Builder/ControllerActionEndpointConventionBuilderResourceCollectionExtensions.cs @@ -0,0 +1,61 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Endpoints; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Routing; +using static Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions; + +namespace Microsoft.AspNetCore.Builder; + +/// +/// Extensions for . +/// +public static class ControllerActionEndpointConventionBuilderResourceCollectionExtensions +{ + private const string ResourceCollectionResolverKey = "__ResourceCollectionResolver"; + + /// + /// Adds a metadata instance to the endpoints. + /// + /// The . + /// The manifest associated with the assets. + /// + public static ControllerActionEndpointConventionBuilder WithStaticAssets( + this ControllerActionEndpointConventionBuilder builder, + string manifestPath = null) + { + ArgumentNullException.ThrowIfNull(builder); + + if (builder.Items.TryGetValue(EndpointRouteBuilderKey, out var endpointBuilder)) + { + var (resolver, registered) = builder.Items.TryGetValue(ResourceCollectionResolverKey, out var value) + ? ((ResourceCollectionResolver)value, true) + : (new ResourceCollectionResolver((IEndpointRouteBuilder)endpointBuilder), false); + + resolver.ManifestName = manifestPath; + if (!registered) + { + builder.Items[ResourceCollectionResolverKey] = resolver; + builder.Add(endpointBuilder => + { + // Do not add metadata to API controllers + if (endpointBuilder.Metadata.OfType().Any()) + { + return; + } + + var collection = resolver.ResolveResourceCollection(); + var importMap = resolver.ResolveImportMap(); + + endpointBuilder.Metadata.Add(collection); + endpointBuilder.Metadata.Add(importMap); + }); + } + } + + return builder; + } +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj index c6af4f42a00d..24dd476f1022 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -15,6 +15,7 @@ true false disable + $(DefineConstants);MVC_VIEWFEATURES @@ -31,6 +32,7 @@ + diff --git a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..db29399a5c9e 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt +++ b/src/Mvc/Mvc.ViewFeatures/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilderResourceCollectionExtensions +~static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilderResourceCollectionExtensions.WithStaticAssets(this Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder builder, string manifestPath = null) -> Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder diff --git a/src/Mvc/Mvc.ViewFeatures/test/Builder/ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs b/src/Mvc/Mvc.ViewFeatures/test/Builder/ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs new file mode 100644 index 000000000000..84806020d64f --- /dev/null +++ b/src/Mvc/Mvc.ViewFeatures/test/Builder/ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs @@ -0,0 +1,362 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics; +using System.Reflection; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.FileProviders; + +namespace Microsoft.AspNetCore.Builder; + +public class ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest +{ + [Fact] + public void WithStaticAssets_AddsEmptyResourceCollection_ToEndpoints_NoStaticAssetsMapped() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + var builder = endpointBuilder.MapControllers(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(0, list.Count); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsEmptyResourceCollection_ToEndpoints_NoMatchingStaticAssetsMapped() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapControllers(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(1).First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(0, list.Count); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsResourceCollection_ToEndpoints_NamedManifest() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapControllers(); + + // Act + builder.WithStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + + // Assert + var endpoints = endpointBuilder.DataSources.Skip(1).First().Endpoints; + Assert.All(endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("named.css", list[0].Url); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsResourceCollection_ToEndpoints_DefaultManifest() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + var builder = endpointBuilder.MapControllers(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(1).First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("default.css", list[0].Url); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsDefaultResourceCollectionToEndpoints_WhenNoManifestProvided_EvenIfManyAvailable() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapControllers(); + + // Act + builder.WithStaticAssets(); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(2).First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("default.css", list[0].Url); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsMatchingResourceCollectionToEndpoints_WhenExplicitManifestProvided_EvenIfManyAvailable() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + endpointBuilder.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = endpointBuilder.MapControllers(); + + // Act + builder.WithStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + + // Assert + Assert.All(endpointBuilder.DataSources.Skip(2).First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("named.css", list[0].Url); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsCollectionFromGroup_WhenMappedInsideAnEndpointGroup() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + + var group = endpointBuilder.MapGroup("/group"); + group.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = group.MapControllers(); + + // Act + builder.WithStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + + // Assert + var groupEndpoints = Assert.IsAssignableFrom(group).DataSources; + Assert.All(groupEndpoints.Skip(1).First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(1, list.Count); + Assert.Equal("named.css", list[0].Url); + } + }); + } + + [Fact] + public void WithStaticAssets_AddsEmptyCollectionFromGroup_WhenMappingNotFound_InsideGroup() + { + // Arrange + var endpointBuilder = new TestEndpointRouteBuilder(); + endpointBuilder.MapStaticAssets(); + + var group = endpointBuilder.MapGroup("/group"); + group.MapStaticAssets("TestManifests/Test.staticwebassets.endpoints.json"); + var builder = group.MapControllers(); + + // Act + builder.WithStaticAssets(); + + // Assert + var groupEndpoints = Assert.IsAssignableFrom(group).DataSources; + Assert.All(groupEndpoints.Skip(1).First().Endpoints, e => + { + var apiController = e.Metadata.GetMetadata(); + if (apiController != null) + { + var metadata = e.Metadata.GetMetadata(); + Assert.Null(metadata); + } + else + { + var metadata = e.Metadata.GetMetadata(); + Assert.NotNull(metadata); + var list = Assert.IsAssignableFrom>(metadata); + Assert.Equal(0, list.Count); + } + }); + } + + private class TestEndpointRouteBuilder : IEndpointRouteBuilder + { + private readonly ApplicationBuilder _applicationBuilder; + + public TestEndpointRouteBuilder() + { + _applicationBuilder = new ApplicationBuilder(ServiceProvider); + } + + public IServiceProvider ServiceProvider { get; } = CreateServiceProvider(); + + private static IServiceProvider CreateServiceProvider() + { + var collection = new ServiceCollection(); + collection.AddSingleton(new ConfigurationBuilder().Build()); + collection.AddSingleton(new TestWebHostEnvironment()); + collection.AddSingleton(new ApplicationPartManager()); + collection.AddSingleton(new DiagnosticListener("Microsoft.AspNetCore")); + collection.AddSingleton(new TestDiagnosticSource()); + collection.AddLogging(); + collection.AddOptions(); + collection.AddMvcCore() + .ConfigureApplicationPartManager(apm => + { + apm.FeatureProviders.Clear(); + apm.FeatureProviders.Add(new TestControllerFeatureProvider()); + }); + return collection.BuildServiceProvider(); + } + + public ICollection DataSources { get; } = []; + + public IApplicationBuilder CreateApplicationBuilder() + { + return _applicationBuilder.New(); + } + + private class TestControllerFeatureProvider : IApplicationFeatureProvider + { + public void PopulateFeature(IEnumerable parts, ControllerFeature feature) + { + feature.Controllers.Clear(); + feature.Controllers.Add(typeof(TestController).GetTypeInfo()); + feature.Controllers.Add(typeof(MyApiController).GetTypeInfo()); + } + } + + private class TestController : Controller + { + [HttpGet("/")] + public void Index() { } + } + + [ApiController] + private class MyApiController : ControllerBase + { + [HttpGet("other")] + public void Index() { } + } + + private class TestWebHostEnvironment : IWebHostEnvironment + { + public string ApplicationName { get; set; } = "TestApplication"; + public string EnvironmentName { get; set; } = "TestEnvironment"; + public string WebRootPath { get; set; } = ""; + public IFileProvider WebRootFileProvider { get => ContentRootFileProvider; set { } } + public string ContentRootPath { get; set; } = Directory.GetCurrentDirectory(); + public IFileProvider ContentRootFileProvider { get; set; } = CreateTestFileProvider(); + + private static TestFileProvider CreateTestFileProvider() + { + var provider = new TestFileProvider(); + provider.AddFile("site.css", "body { color: red; }"); + return provider; + } + } + + private class TestDiagnosticSource : DiagnosticSource + { + public override bool IsEnabled(string name) + { + return false; + } + + public override void Write(string name, object value) { } + } + } +} diff --git a/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj b/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj index 2957fc97c638..1231fc4ce0b1 100644 --- a/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj +++ b/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj @@ -4,6 +4,16 @@ $(DefaultNetCoreTargetFramework) + + + + + + + + + + diff --git a/src/Mvc/Mvc.ViewFeatures/test/TestApplication.staticwebassets.endpoints.json b/src/Mvc/Mvc.ViewFeatures/test/TestApplication.staticwebassets.endpoints.json new file mode 100644 index 000000000000..586241880352 --- /dev/null +++ b/src/Mvc/Mvc.ViewFeatures/test/TestApplication.staticwebassets.endpoints.json @@ -0,0 +1,17 @@ +{ + "Version": 1, + "Endpoints": [ + { + "Route": "default.css", + "AssetFile": "default.css", + "Selectors": [], + "EndpointProperties": [], + "ResponseHeaders": [ + { + "Name": "ETag", + "Value": "\"Fake\"" + } + ] + } + ] +} diff --git a/src/Mvc/Mvc.ViewFeatures/test/TestManifests/Test.staticwebassets.endpoints.json b/src/Mvc/Mvc.ViewFeatures/test/TestManifests/Test.staticwebassets.endpoints.json new file mode 100644 index 000000000000..77815b7c379c --- /dev/null +++ b/src/Mvc/Mvc.ViewFeatures/test/TestManifests/Test.staticwebassets.endpoints.json @@ -0,0 +1,17 @@ +{ + "Version": 1, + "Endpoints": [ + { + "Route": "named.css", + "AssetFile": "named.css", + "Selectors": [], + "EndpointProperties": [], + "ResponseHeaders": [ + { + "Name": "ETag", + "Value": "\"Fake\"" + } + ] + } + ] +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/App.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/App.razor index 0a2cdaa5391c..caa3e2244442 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/App.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Components/App.razor @@ -6,10 +6,11 @@ @*#if (SampleContent) - + ##endif*@ - - + + + @*#if (SampleContent) ##endif*@ diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_Layout.cshtml b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_Layout.cshtml index 0ad799723ae6..8fc776a1fd58 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_Layout.cshtml +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_Layout.cshtml @@ -4,6 +4,7 @@ @ViewData["Title"] - Company.WebApplication1 + @@ -53,4 +54,4 @@ @await RenderSectionAsync("Scripts", required: false) - \ No newline at end of file + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs index 3d1056838dc8..c61cdfd6e37f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.Main.cs @@ -142,7 +142,8 @@ public static void Main(string[] args) app.UseAuthorization(); app.MapStaticAssets(); - app.MapRazorPages(); + app.MapRazorPages() + .WithStaticAssets(); #if (IndividualB2CAuth || OrganizationalAuth) app.MapControllers(); #endif diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs index 289247647714..16643fae132c 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs @@ -136,7 +136,8 @@ app.UseAuthorization(); app.MapStaticAssets(); -app.MapRazorPages(); +app.MapRazorPages() + .WithStaticAssets(); #if (IndividualB2CAuth || OrganizationalAuth) app.MapControllers(); #endif diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs index b386e6f6840c..e54cde90c009 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.Main.cs @@ -145,9 +145,11 @@ public static void Main(string[] args) app.MapStaticAssets(); app.MapControllerRoute( name: "default", - pattern: "{controller=Home}/{action=Index}/{id?}"); + pattern: "{controller=Home}/{action=Index}/{id?}") + .WithStaticAssets(); #if (OrganizationalAuth || IndividualAuth) - app.MapRazorPages(); + app.MapRazorPages() + .WithStaticAssets(); #endif app.Run(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs index f8425822e284..44a1ff4df5cb 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs @@ -140,9 +140,12 @@ app.MapControllerRoute( name: "default", - pattern: "{controller=Home}/{action=Index}/{id?}"); + pattern: "{controller=Home}/{action=Index}/{id?}") + .WithStaticAssets(); + #if (OrganizationalAuth || IndividualAuth) -app.MapRazorPages(); +app.MapRazorPages() + .WithStaticAssets(); #endif app.Run(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_Layout.cshtml b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_Layout.cshtml index 553992a8978c..279f53d40fa5 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_Layout.cshtml +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_Layout.cshtml @@ -4,6 +4,7 @@ @ViewData["Title"] - Company.WebApplication1 + diff --git a/src/Shared/Components/ResourceCollectionResolver.cs b/src/Shared/Components/ResourceCollectionResolver.cs new file mode 100644 index 000000000000..a0b39aa8208e --- /dev/null +++ b/src/Shared/Components/ResourceCollectionResolver.cs @@ -0,0 +1,133 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Routing; +using Microsoft.AspNetCore.StaticAssets; +using Microsoft.AspNetCore.StaticAssets.Infrastructure; + +namespace Microsoft.AspNetCore.Components.Endpoints; + +internal class ResourceCollectionResolver(IEndpointRouteBuilder endpoints) +{ +#if !MVC_VIEWFEATURES +#else + private ResourceAssetCollection _resourceCollection; + private ImportMapDefinition _importMapDefinition; + + public string ManifestName { get; set; } +#endif + +#if !MVC_VIEWFEATURES + public ResourceAssetCollection ResolveResourceCollection(string? manifestName = null) + { + var descriptors = StaticAssetsEndpointDataSourceHelper.ResolveStaticAssetDescriptors(endpoints, manifestName); +#else + public ResourceAssetCollection ResolveResourceCollection() + { + if (_resourceCollection != null) + { + return _resourceCollection; + } + + var descriptors = StaticAssetsEndpointDataSourceHelper.ResolveStaticAssetDescriptors(endpoints, ManifestName); +#endif + var resources = new List(); + + // We are converting a subset of the descriptors to resources and including a subset of the properties exposed by the + // descriptors that are useful for the resources in the context of Blazor. Specifically, we pass in the `label` property + // which contains the human-readable identifier for fingerprinted assets, and the integrity, which can be used to apply + // subresource integrity to things like images, script tags, etc. + foreach (var descriptor in descriptors) + { +#if !MVC_VIEWFEATURES + string? label = null; + string? integrity = null; +#else + string label = null; + string integrity = null; +#endif + + // If there's a selector this means that this is an alternative representation for a resource, so skip it. + if (descriptor.Selectors.Count == 0) + { + var foundProperties = 0; + for (var i = 0; i < descriptor.Properties.Count; i++) + { + var property = descriptor.Properties[i]; + if (property.Name.Equals("label", StringComparison.OrdinalIgnoreCase)) + { + label = property.Value; + foundProperties++; + } + + else if (property.Name.Equals("integrity", StringComparison.OrdinalIgnoreCase)) + { + integrity = property.Value; + foundProperties++; + } + } + + AddResource(resources, descriptor, label, integrity, foundProperties); + } + } + + // Sort the resources because we are going to generate a hash for the collection to use when we expose it as an endpoint + // for webassembly to consume. This way, we can cache this collection forever until it changes. + resources.Sort((a, b) => string.Compare(a.Url, b.Url, StringComparison.Ordinal)); + + var result = new ResourceAssetCollection(resources); +#if MVC_VIEWFEATURES + _resourceCollection = result; +#endif + return result; + } + +#if !MVC_VIEWFEATURES + public bool IsRegistered(string? manifestName = null) +#else + public bool IsRegistered(string manifestName = null) +#endif + { + return StaticAssetsEndpointDataSourceHelper.HasStaticAssetsDataSource(endpoints, manifestName); + } + + private static void AddResource( + List resources, + StaticAssetDescriptor descriptor, +#if !MVC_VIEWFEATURES + string? label, + string? integrity, +#else + string label, + string integrity, +#endif + int foundProperties) + { + if (label != null || integrity != null) + { + var properties = new ResourceAssetProperty[foundProperties]; + var index = 0; + if (label != null) + { + properties[index++] = new ResourceAssetProperty("label", label); + } + if (integrity != null) + { + properties[index++] = new ResourceAssetProperty("integrity", integrity); + } + + resources.Add(new ResourceAsset(descriptor.Route, properties)); + } + else + { + resources.Add(new ResourceAsset(descriptor.Route, null)); + } + } + +#if MVC_VIEWFEATURES + internal ImportMapDefinition ResolveImportMap() + { + return _importMapDefinition ??= ImportMapDefinition.FromResourceCollection(_resourceCollection); + } +#endif +} diff --git a/src/Shared/WebEncoders/WebEncoders.cs b/src/Shared/WebEncoders/WebEncoders.cs index 4dc85bb8a227..5d31b0789ebb 100644 --- a/src/Shared/WebEncoders/WebEncoders.cs +++ b/src/Shared/WebEncoders/WebEncoders.cs @@ -339,7 +339,17 @@ public static string Base64UrlEncode(ReadOnlySpan input) return base64Url; } +#if NET9_0_OR_GREATER + /// + /// Encodes using base64url encoding. + /// + /// The binary input to encode. + /// The buffer to place the result in. + /// + public static int Base64UrlEncode(ReadOnlySpan input, Span output) +#else private static int Base64UrlEncode(ReadOnlySpan input, Span output) +#endif { Debug.Assert(output.Length >= GetArraySizeRequiredToEncode(input.Length)); diff --git a/src/StaticAssets/src/Development/StaticAssetDevelopmentRuntimeHandler.cs b/src/StaticAssets/src/Development/StaticAssetDevelopmentRuntimeHandler.cs index 95d59b6437e3..c57917d0edb4 100644 --- a/src/StaticAssets/src/Development/StaticAssetDevelopmentRuntimeHandler.cs +++ b/src/StaticAssets/src/Development/StaticAssetDevelopmentRuntimeHandler.cs @@ -42,7 +42,7 @@ public void AttachRuntimePatching(EndpointBuilder builder) builder.RequestDelegate = async context => { var originalFeature = context.Features.GetRequiredFeature(); - var fileInfo = context.RequestServices.GetRequiredService().WebRootFileProvider.GetFileInfo(asset.AssetFile); + var fileInfo = context.RequestServices.GetRequiredService().WebRootFileProvider.GetFileInfo(asset.AssetPath); if (fileInfo.Length != asset.GetContentLength() || fileInfo.LastModified != asset.GetLastModified()) { // At this point, we know that the file has changed from what was generated at build time. @@ -93,12 +93,12 @@ public void DisableBuffering() public Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellationToken = default) { - var fileInfo = _context.RequestServices.GetRequiredService().WebRootFileProvider.GetFileInfo(_asset.AssetFile); + var fileInfo = _context.RequestServices.GetRequiredService().WebRootFileProvider.GetFileInfo(_asset.AssetPath); var endpoint = _context.GetEndpoint()!; var assetDescriptor = endpoint.Metadata.OfType().Single(); _context.Response.Headers.ETag = ""; - if (assetDescriptor.AssetFile != _asset.AssetFile) + if (assetDescriptor.AssetPath != _asset.AssetPath) { // This was a compressed asset, asset contains the path to the original file, we'll re-compress the asset on the fly and replace the body // and the content length. @@ -139,7 +139,7 @@ public Task SendFileAsync(string path, long offset, long? count, CancellationTok public Task StartAsync(CancellationToken cancellationToken = default) { - throw new NotImplementedException(); + return _original.StartAsync(cancellationToken); } } @@ -172,7 +172,22 @@ internal static void EnableSupport( var config = endpoints.ServiceProvider.GetRequiredService(); var hotReloadHandler = new StaticAssetDevelopmentRuntimeHandler(descriptors); builder.Add(hotReloadHandler.AttachRuntimePatching); - var disableFallback = bool.TryParse(config["DisableStaticAssetNotFoundRuntimeFallback"], out var disableFallbackValue) && disableFallbackValue; + var disableFallback = IsEnabled(config, "DisableStaticAssetNotFoundRuntimeFallback"); + + foreach (var descriptor in descriptors) + { + var enableDevelopmentCaching = IsEnabled(config, "EnableStaticAssetsDevelopmentCaching"); + if (!enableDevelopmentCaching) + { + DisableCachingHeaders(descriptor); + } + + var enableDevelopmentIntegrity = IsEnabled(config, "EnableStaticAssetsDevelopmentIntegrity"); + if (!enableDevelopmentIntegrity) + { + RemoveIntegrityProperty(descriptor); + } + } if (!disableFallback) { @@ -227,6 +242,62 @@ internal static void EnableSupport( } } + private static bool IsEnabled(IConfiguration config, string key) + { + return bool.TryParse(config[key], out var value) && value; + } + + private static void DisableCachingHeaders(StaticAssetDescriptor descriptor) + { + if (descriptor.ResponseHeaders.Count == 0) + { + return; + } + + var responseHeaders = new List(descriptor.ResponseHeaders); + var replaced = false; + for (var i = 0; i < descriptor.ResponseHeaders.Count; i++) + { + var responseHeader = descriptor.ResponseHeaders[i]; + if (string.Equals(responseHeader.Name, HeaderNames.CacheControl, StringComparison.OrdinalIgnoreCase)) + { + if (!string.Equals(responseHeader.Value, "no-cache", StringComparison.OrdinalIgnoreCase)) + { + responseHeaders.RemoveAt(i); + responseHeaders.Insert(i, new StaticAssetResponseHeader(HeaderNames.CacheControl, "no-cache")); + replaced = true; + } + } + } + + if (replaced) + { + descriptor.ResponseHeaders = responseHeaders; + } + } + + private static void RemoveIntegrityProperty(StaticAssetDescriptor descriptor) + { + if (descriptor.Properties.Count == 0) + { + return; + } + var propertiesList = new List(descriptor.Properties); + for (var i = 0; i < descriptor.Properties.Count; i++) + { + var property = descriptor.Properties[i]; + if (string.Equals(property.Name, "integrity", StringComparison.OrdinalIgnoreCase)) + { + propertiesList.RemoveAt(i); + } + } + + if (propertiesList.Count < descriptor.Properties.Count) + { + descriptor.Properties = propertiesList; + } + } + private static partial class Log { private const string StaticAssetNotFoundInManifestMessage = """The static asset '{Path}' was not found in the built time manifest. This file will not be available at runtime if it is not available at compile time during the publish process. If the file was not added to the project during development, and is created at runtime, use the StaticFiles middleware to serve it instead."""; diff --git a/src/StaticAssets/src/Infrastructure/StaticAssetsEndpointDataSourceHelper.cs b/src/StaticAssets/src/Infrastructure/StaticAssetsEndpointDataSourceHelper.cs index a89d556ac496..a72bda103a35 100644 --- a/src/StaticAssets/src/Infrastructure/StaticAssetsEndpointDataSourceHelper.cs +++ b/src/StaticAssets/src/Infrastructure/StaticAssetsEndpointDataSourceHelper.cs @@ -15,22 +15,51 @@ public static class StaticAssetsEndpointDataSourceHelper /// /// For internal framework use only. /// - public static bool IsStaticAssetsDataSource(EndpointDataSource dataSource, string? staticAssetsManifestPath = null) + public static bool HasStaticAssetsDataSource(IEndpointRouteBuilder builder, string? staticAssetsManifestPath = null) { - if (dataSource is StaticAssetsEndpointDataSource staticAssetsDataSource) + staticAssetsManifestPath = ApplyStaticAssetManifestPathConventions(staticAssetsManifestPath, builder.ServiceProvider); + foreach (var dataSource in builder.DataSources) { - if (staticAssetsManifestPath is null) + if (dataSource is StaticAssetsEndpointDataSource staticAssetsDataSource) { - var serviceProvider = staticAssetsDataSource.ServiceProvider; - var environment = serviceProvider.GetRequiredService(); - staticAssetsManifestPath = Path.Combine(AppContext.BaseDirectory, $"{environment.ApplicationName}.staticwebassets.endpoints.json"); + if (string.Equals(staticAssetsDataSource.ManifestPath, staticAssetsManifestPath, StringComparison.Ordinal)) + { + return true; + } } + } - staticAssetsManifestPath = Path.IsPathRooted(staticAssetsManifestPath) ? staticAssetsManifestPath : Path.Combine(AppContext.BaseDirectory, staticAssetsManifestPath); + return false; + } - return string.Equals(staticAssetsDataSource.ManifestPath, staticAssetsManifestPath, StringComparison.Ordinal); + /// + /// For internal framework use only. + /// + public static IReadOnlyList ResolveStaticAssetDescriptors( + IEndpointRouteBuilder endpointRouteBuilder, + string? manifestPath) + { + manifestPath = ApplyStaticAssetManifestPathConventions(manifestPath, endpointRouteBuilder.ServiceProvider); + foreach (var dataSource in endpointRouteBuilder.DataSources) + { + if (dataSource is StaticAssetsEndpointDataSource staticAssetsDataSource && + string.Equals(staticAssetsDataSource.ManifestPath, manifestPath, StringComparison.Ordinal)) + { + return staticAssetsDataSource.Descriptors; + } } - return false; + return []; + } + + internal static string ApplyStaticAssetManifestPathConventions(string? staticAssetsManifestPath, IServiceProvider services) + { + if (staticAssetsManifestPath is null) + { + var environment = services.GetRequiredService(); + return Path.Combine(AppContext.BaseDirectory, $"{environment.ApplicationName}.staticwebassets.endpoints.json"); + } + + return Path.IsPathRooted(staticAssetsManifestPath) ? staticAssetsManifestPath : Path.Combine(AppContext.BaseDirectory, staticAssetsManifestPath); } } diff --git a/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj b/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj index c385473e7147..c5a47fce08f1 100644 --- a/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj +++ b/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj @@ -24,4 +24,5 @@ + diff --git a/src/StaticAssets/src/PublicAPI.Unshipped.txt b/src/StaticAssets/src/PublicAPI.Unshipped.txt index 8cf8331aa2ad..ded8dc823703 100644 --- a/src/StaticAssets/src/PublicAPI.Unshipped.txt +++ b/src/StaticAssets/src/PublicAPI.Unshipped.txt @@ -1,7 +1,33 @@ Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.AssetPath.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.AssetPath.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Properties.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Properties.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.ResponseHeaders.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.ResponseHeaders.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Route.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Route.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Selectors.get -> System.Collections.Generic.IReadOnlyList! +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.Selectors.set -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor.StaticAssetDescriptor() -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.Name.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.StaticAssetProperty(string! name, string! value) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetProperty.Value.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.Name.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.StaticAssetResponseHeader(string! name, string! value) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader.Value.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Name.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Quality.get -> string! +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.StaticAssetSelector(string! name, string! value, string! quality) -> void +Microsoft.AspNetCore.StaticAssets.StaticAssetSelector.Value.get -> string! Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder.Add(System.Action! convention) -> void Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder.Finally(System.Action! convention) -> void static Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string? staticAssetsManifestPath = null) -> Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder! -static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.IsStaticAssetsDataSource(Microsoft.AspNetCore.Routing.EndpointDataSource! dataSource, string? staticAssetsManifestPath = null) -> bool +static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.HasStaticAssetsDataSource(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! builder, string? staticAssetsManifestPath = null) -> bool +static Microsoft.AspNetCore.StaticAssets.Infrastructure.StaticAssetsEndpointDataSourceHelper.ResolveStaticAssetDescriptors(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpointRouteBuilder, string? manifestPath) -> System.Collections.Generic.IReadOnlyList! diff --git a/src/StaticAssets/src/StaticAssetDescriptor.cs b/src/StaticAssets/src/StaticAssetDescriptor.cs index c34150117c82..11fb3e2b709d 100644 --- a/src/StaticAssets/src/StaticAssetDescriptor.cs +++ b/src/StaticAssets/src/StaticAssetDescriptor.cs @@ -2,26 +2,79 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Text.Json.Serialization; namespace Microsoft.AspNetCore.StaticAssets; -// Represents a static resource. +/// +/// The description of a static asset that was generated during the build process. +/// [DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] -internal sealed class StaticAssetDescriptor( - string route, - string assetFile, - StaticAssetSelector[] selectors, - EndpointProperty[] endpointProperties, - ResponseHeader[] responseHeaders) +public sealed class StaticAssetDescriptor { - public string Route { get; } = route; - public string AssetFile { get; } = assetFile; - public StaticAssetSelector[] Selectors { get; } = selectors; - public EndpointProperty[] EndpointProperties { get; } = endpointProperties; - public ResponseHeader[] ResponseHeaders { get; } = responseHeaders; + bool _isFrozen; + private string? _route; + private string? _assetFile; + private IReadOnlyList _selectors = []; + private IReadOnlyList _endpointProperties = []; + private IReadOnlyList _responseHeaders = []; + + /// + /// The route that the asset is served from. + /// + public required string Route + { + get => _route ?? throw new InvalidOperationException("Route is required"); + set => _route = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); + } + + /// + /// The path to the asset file from the wwwroot folder. + /// + [JsonPropertyName("AssetFile")] + public required string AssetPath + { + get => _assetFile ?? throw new InvalidOperationException("AssetPath is required"); + set => _assetFile = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); + } + + /// + /// A list of selectors that are used to discriminate between two or more assets with the same route. + /// + [JsonPropertyName("Selectors")] + public IReadOnlyList Selectors + { + get => _selectors; + set => _selectors = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); + } + + /// + /// A list of properties that are associated with the endpoint. + /// + [JsonPropertyName("EndpointProperties")] + public IReadOnlyList Properties + { + get => _endpointProperties; + set => _endpointProperties = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); + } + + /// + /// A list of headers to apply to the response when this resource is served. + /// + [JsonPropertyName("ResponseHeaders")] + public IReadOnlyList ResponseHeaders + { + get => _responseHeaders; + set => _responseHeaders = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); + } private string GetDebuggerDisplay() { - return $"Route: {Route} Path: {AssetFile}"; + return $"Route: {Route} Path: {AssetPath}"; + } + + internal void Freeze() + { + _isFrozen = true; } } diff --git a/src/StaticAssets/src/StaticAssetEndpointDataSource.cs b/src/StaticAssets/src/StaticAssetEndpointDataSource.cs index 8c8968dc19ed..0420689dff4c 100644 --- a/src/StaticAssets/src/StaticAssetEndpointDataSource.cs +++ b/src/StaticAssets/src/StaticAssetEndpointDataSource.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.StaticAssets; internal class StaticAssetsEndpointDataSource : EndpointDataSource { private readonly object _lock = new(); - private readonly StaticAssetsManifest _manifest; + private readonly List _descriptors; private readonly StaticAssetEndpointFactory _endpointFactory; private readonly List> _conventions = []; private readonly List> _finallyConventions = []; @@ -24,10 +24,14 @@ internal class StaticAssetsEndpointDataSource : EndpointDataSource private CancellationTokenSource _cancellationTokenSource; private CancellationChangeToken _changeToken; - internal StaticAssetsEndpointDataSource(IServiceProvider serviceProvider, StaticAssetsManifest manifest, StaticAssetEndpointFactory endpointFactory, string manifestName, List descriptors) + internal StaticAssetsEndpointDataSource( + IServiceProvider serviceProvider, + StaticAssetEndpointFactory endpointFactory, + string manifestName, + List descriptors) { ServiceProvider = serviceProvider; - _manifest = manifest; + _descriptors = descriptors; ManifestPath = manifestName; _endpointFactory = endpointFactory; _cancellationTokenSource = new CancellationTokenSource(); @@ -45,6 +49,8 @@ internal StaticAssetsEndpointDataSource(IServiceProvider serviceProvider, Static /// public string ManifestPath { get; } + internal IReadOnlyList Descriptors => _descriptors; + /// internal StaticAssetsEndpointConventionBuilder DefaultBuilder { get; set; } @@ -89,9 +95,11 @@ private void UpdateEndpoints() { var endpoints = new List(); - foreach (var resource in _manifest.Endpoints) + foreach (var asset in _descriptors) { - endpoints.Add(_endpointFactory.Create(resource, _conventions, _finallyConventions)); + // At this point the descriptor becomes immutable. + asset.Freeze(); + endpoints.Add(_endpointFactory.Create(asset, _conventions, _finallyConventions)); } var oldCancellationTokenSource = _cancellationTokenSource; diff --git a/src/StaticAssets/src/StaticAssetEndpointFactory.cs b/src/StaticAssets/src/StaticAssetEndpointFactory.cs index 9340fe9cf33a..3417a4e52128 100644 --- a/src/StaticAssets/src/StaticAssetEndpointFactory.cs +++ b/src/StaticAssets/src/StaticAssetEndpointFactory.cs @@ -39,10 +39,8 @@ public Endpoint Create(StaticAssetDescriptor resource, List>(); - var fileInfo = serviceProvider.GetRequiredService().WebRootFileProvider.GetFileInfo(resource.AssetFile) ?? - throw new InvalidOperationException($"The file '{resource.AssetFile}' could not be found."); - - var invoker = new StaticAssetsInvoker(resource, fileInfo, logger); + var fileProvider = serviceProvider.GetRequiredService().WebRootFileProvider; + var invoker = new StaticAssetsInvoker(resource, fileProvider, logger); routeEndpointBuilder.RequestDelegate = invoker.Invoke; diff --git a/src/StaticAssets/src/EndpointProperty.cs b/src/StaticAssets/src/StaticAssetProperty.cs similarity index 60% rename from src/StaticAssets/src/EndpointProperty.cs rename to src/StaticAssets/src/StaticAssetProperty.cs index 944dcd61ca6c..e25157c0abf8 100644 --- a/src/StaticAssets/src/EndpointProperty.cs +++ b/src/StaticAssets/src/StaticAssetProperty.cs @@ -5,11 +5,20 @@ namespace Microsoft.AspNetCore.StaticAssets; -// Represents a property of an endpoint. +/// +/// A property associated with a static asset. +/// [DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] -internal sealed class EndpointProperty(string name, string value) +public sealed class StaticAssetProperty(string name, string value) { + /// + /// The name of the property. + /// public string Name { get; } = name; + + /// + /// The value of the property. + /// public string Value { get; } = value; private string GetDebuggerDisplay() => $"Name: {Name} Value:{Value}"; diff --git a/src/StaticAssets/src/ResponseHeader.cs b/src/StaticAssets/src/StaticAssetResponseHeader.cs similarity index 50% rename from src/StaticAssets/src/ResponseHeader.cs rename to src/StaticAssets/src/StaticAssetResponseHeader.cs index 0c57a463331c..3a1c9b7b0410 100644 --- a/src/StaticAssets/src/ResponseHeader.cs +++ b/src/StaticAssets/src/StaticAssetResponseHeader.cs @@ -5,11 +5,22 @@ namespace Microsoft.AspNetCore.StaticAssets; -// Represents a response header for a static resource. +/// +/// A response header to apply to the response when a static asset is served. +/// +/// The name of the header. +/// The value of the header. [DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] -internal sealed class ResponseHeader(string name, string value) +public sealed class StaticAssetResponseHeader(string name, string value) { + /// + /// The name of the header. + /// public string Name { get; } = name; + + /// + /// The value of the header. + /// public string Value { get; } = value; private string GetDebuggerDisplay() => $"Name: {Name} Value: {Value}"; diff --git a/src/StaticAssets/src/StaticAssetSelector.cs b/src/StaticAssets/src/StaticAssetSelector.cs index e155e387fbf9..51aa92dd3437 100644 --- a/src/StaticAssets/src/StaticAssetSelector.cs +++ b/src/StaticAssets/src/StaticAssetSelector.cs @@ -5,12 +5,29 @@ namespace Microsoft.AspNetCore.StaticAssets; -// Represents a selector for a static resource. +/// +/// A static asset selector. Selectors are used to discriminate between two or more assets with the same route. +/// +/// The name associated to the selector. +/// The value associated to the selector and used to match against incoming requests. +/// The static server quality associated to this selector. [DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] -internal sealed class StaticAssetSelector(string name, string value, string quality) +public sealed class StaticAssetSelector(string name, string value, string quality) { + /// + /// The name associated to the selector. + /// public string Name { get; } = name; + + /// + /// The value associated to the selector and used to match against incoming requests. + /// public string Value { get; } = value; + + /// + /// The static asset server quality associated to this selector. Used to break ties when a request matches multiple values + /// with the same degree of specificity. + /// public string Quality { get; } = quality; private string GetDebuggerDisplay() => $"Name: {Name} Value: {Value} Quality: {Quality}"; diff --git a/src/StaticAssets/src/StaticAssetsEndpointRouteBuilderExtensions.cs b/src/StaticAssets/src/StaticAssetsEndpointRouteBuilderExtensions.cs index 3ede03b92212..6d0c8ba0cbe3 100644 --- a/src/StaticAssets/src/StaticAssetsEndpointRouteBuilderExtensions.cs +++ b/src/StaticAssets/src/StaticAssetsEndpointRouteBuilderExtensions.cs @@ -56,7 +56,7 @@ private static StaticAssetsEndpointConventionBuilder MapStaticAssetsCore( var manifest = ResolveManifest(manifestPath); - var dataSource = manifest.CreateDataSource(endpoints, manifestPath, manifest.Endpoints); + var dataSource = StaticAssetsManifest.CreateDataSource(endpoints, manifestPath, manifest.Endpoints); return dataSource.DefaultBuilder; } @@ -89,7 +89,7 @@ internal static StaticAssetsEndpointConventionBuilder MapStaticAssets(this IEndp ArgumentNullException.ThrowIfNull(endpoints); var environment = endpoints.ServiceProvider.GetRequiredService(); - var result = manifest.CreateDataSource(endpoints, "", manifest.Endpoints).DefaultBuilder; + var result = StaticAssetsManifest.CreateDataSource(endpoints, "", manifest.Endpoints).DefaultBuilder; if (StaticAssetDevelopmentRuntimeHandler.IsEnabled(endpoints.ServiceProvider, environment)) { diff --git a/src/StaticAssets/src/StaticAssetsInvoker.cs b/src/StaticAssets/src/StaticAssetsInvoker.cs index e43ed498c6c4..e7f42ca19795 100644 --- a/src/StaticAssets/src/StaticAssetsInvoker.cs +++ b/src/StaticAssets/src/StaticAssetsInvoker.cs @@ -15,23 +15,22 @@ namespace Microsoft.AspNetCore.StaticAssets; internal class StaticAssetsInvoker { private readonly StaticAssetDescriptor _resource; - + private readonly IFileProvider _fileProvider; private readonly ILogger _logger; private readonly string? _contentType; - private readonly IFileInfo _fileInfo; - private readonly EntityTagHeaderValue _etag; private readonly long _length; private readonly DateTimeOffset _lastModified; - private readonly List _remainingHeaders; + private readonly List _remainingHeaders; + + private IFileInfo? _fileInfo; - public StaticAssetsInvoker(StaticAssetDescriptor resource, IFileInfo fileInfo, ILogger logger) + public StaticAssetsInvoker(StaticAssetDescriptor resource, IFileProvider fileProvider, ILogger logger) { _resource = resource; - _fileInfo = fileInfo; + _fileProvider = fileProvider; _logger = logger; - _fileInfo = fileInfo; _remainingHeaders ??= []; foreach (var responseHeader in resource.ResponseHeaders) @@ -46,7 +45,7 @@ public StaticAssetsInvoker(StaticAssetDescriptor resource, IFileInfo fileInfo, I { if (_etag != null) { - _remainingHeaders.Add(new ResponseHeader("ETag", _etag.ToString())); + _remainingHeaders.Add(new StaticAssetResponseHeader("ETag", _etag.ToString())); } _etag = EntityTagHeaderValue.Parse(etag); @@ -77,7 +76,12 @@ public StaticAssetsInvoker(StaticAssetDescriptor resource, IFileInfo fileInfo, I public string Route => _resource.Route; - public string PhysicalPath => _fileInfo.PhysicalPath ?? string.Empty; + public string PhysicalPath => FileInfo.PhysicalPath ?? string.Empty; + + public IFileInfo FileInfo => _fileInfo ??= + _fileProvider.GetFileInfo(_resource.AssetPath) is IFileInfo file and { Exists: true } ? + file : + throw new InvalidOperationException($"The file '{_resource.AssetPath}' could not be found."); private Task ApplyResponseHeadersAsync(StaticAssetInvocationContext context, int statusCode) { @@ -176,7 +180,7 @@ private async Task SendAsync(StaticAssetInvocationContext context) await ApplyResponseHeadersAsync(context, StatusCodes.Status200OK); try { - await context.Response.SendFileAsync(_fileInfo, 0, _length, context.CancellationToken); + await context.Response.SendFileAsync(FileInfo, 0, _length, context.CancellationToken); } catch (OperationCanceledException ex) { @@ -214,9 +218,9 @@ private async Task SendRangeAsync(StaticAssetInvocationContext requestContext, R try { - var logPath = !string.IsNullOrEmpty(_fileInfo.PhysicalPath) ? _fileInfo.PhysicalPath : Route; + var logPath = !string.IsNullOrEmpty(FileInfo.PhysicalPath) ? FileInfo.PhysicalPath : Route; _logger.SendingFileRange(requestContext.Response.Headers.ContentRange, logPath); - await requestContext.Response.SendFileAsync(_fileInfo, start, length, requestContext.CancellationToken); + await requestContext.Response.SendFileAsync(FileInfo, start, length, requestContext.CancellationToken); } catch (OperationCanceledException ex) { @@ -238,13 +242,11 @@ private readonly struct StaticAssetInvocationContext { private readonly HttpContext _context = null!; private readonly HttpRequest _request = null!; - private readonly HttpResponse _response = null!; private readonly EntityTagHeaderValue _etag; private readonly DateTimeOffset _lastModified; private readonly long _length; private readonly ILogger _logger; private readonly RequestHeaders _requestHeaders; - private readonly ResponseHeaders _responseHeaders; public StaticAssetInvocationContext( HttpContext context, @@ -255,9 +257,9 @@ public StaticAssetInvocationContext( { _context = context; _request = context.Request; - _responseHeaders = context.Response.GetTypedHeaders(); + ResponseHeaders = context.Response.GetTypedHeaders(); _requestHeaders = _request.GetTypedHeaders(); - _response = context.Response; + Response = context.Response; _etag = entityTag; _lastModified = lastModified; _length = length; @@ -266,9 +268,9 @@ public StaticAssetInvocationContext( public CancellationToken CancellationToken => _context.RequestAborted; - public ResponseHeaders ResponseHeaders => _responseHeaders; + public ResponseHeaders ResponseHeaders { get; } - public HttpResponse Response => _response; + public HttpResponse Response { get; } public (PreconditionState, bool isRange, RangeItemHeaderValue? range) ComprehendRequestHeaders() { @@ -395,11 +397,9 @@ public static PreconditionState GetPreconditionState( PreconditionState ifMatchState, PreconditionState ifNoneMatchState, PreconditionState ifModifiedSinceState, - PreconditionState ifUnmodifiedSinceState) => - GetMaxPreconditionState(ifMatchState, ifNoneMatchState, ifModifiedSinceState, ifUnmodifiedSinceState); - - private static PreconditionState GetMaxPreconditionState(params Span states) + PreconditionState ifUnmodifiedSinceState) { + Span states = [ifMatchState, ifNoneMatchState, ifModifiedSinceState, ifUnmodifiedSinceState]; var max = PreconditionState.Unspecified; for (var i = 0; i < states.Length; i++) { diff --git a/src/StaticAssets/src/StaticAssetsManifest.cs b/src/StaticAssets/src/StaticAssetsManifest.cs index 0bb70b10246e..a92526ef5212 100644 --- a/src/StaticAssets/src/StaticAssetsManifest.cs +++ b/src/StaticAssets/src/StaticAssetsManifest.cs @@ -35,13 +35,14 @@ internal static StaticAssetsManifest Parse(string manifestPath) return result; } - internal StaticAssetsEndpointDataSource CreateDataSource(IEndpointRouteBuilder endpoints, string manifestName, List descriptors) + internal static StaticAssetsEndpointDataSource CreateDataSource(IEndpointRouteBuilder endpoints, string manifestName, List descriptors) { - var dataSource = new StaticAssetsEndpointDataSource(endpoints.ServiceProvider, this, new StaticAssetEndpointFactory(endpoints.ServiceProvider), manifestName, descriptors); + var dataSource = new StaticAssetsEndpointDataSource(endpoints.ServiceProvider, new StaticAssetEndpointFactory(endpoints.ServiceProvider), manifestName, descriptors); endpoints.DataSources.Add(dataSource); return dataSource; } public int Version { get; set; } + public List Endpoints { get; set; } = []; } diff --git a/src/StaticAssets/test/StaticAssetsIntegrationTests.cs b/src/StaticAssets/test/StaticAssetsIntegrationTests.cs index 9314865bd764..e388094fb533 100644 --- a/src/StaticAssets/test/StaticAssetsIntegrationTests.cs +++ b/src/StaticAssets/test/StaticAssetsIntegrationTests.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Globalization; -using System.IO; using System.IO.Compression; using System.Net; using System.Net.Http; @@ -70,6 +69,223 @@ public async Task CanServeAssetsFromManifestAsync() Directory.Delete(webRoot, true); } + [Fact] + public async Task CachingHeadersAreDisabled_InDevelopment() + { + // Arrange + var appName = nameof(CachingHeadersAreDisabled_InDevelopment); + var (contentRoot, webRoot) = ConfigureAppPaths(appName); + + CreateTestManifest( + appName, + webRoot, + [ + new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), + ]); + + var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions + { + ApplicationName = appName, + ContentRootPath = contentRoot, + EnvironmentName = "Development", + WebRootPath = webRoot + }); + builder.WebHost.ConfigureServices(services => + { + services.AddRouting(); + }); + builder.WebHost.UseTestServer(); + + var app = builder.Build(); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + endpoints.MapStaticAssets(); + }); + + await app.StartAsync(); + + var client = app.GetTestClient(); + + // Act + var response = await client.GetAsync("/sample.txt"); + Assert.NotNull(response); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag); + Assert.Equal(13, response.Content.Headers.ContentLength); + Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); + Assert.Equal("Hello, World!", await response.Content.ReadAsStringAsync()); + Assert.True(response.Headers.CacheControl.NoCache); + + Directory.Delete(webRoot, true); + } + + [Fact] + public async Task CanEnable_CachingHeadersAreDisabled_InDevelopment() + { + // Arrange + var appName = nameof(CanEnable_CachingHeadersAreDisabled_InDevelopment); + var (contentRoot, webRoot) = ConfigureAppPaths(appName); + + CreateTestManifest( + appName, + webRoot, + [ + new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), + ]); + + var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions + { + ApplicationName = appName, + ContentRootPath = contentRoot, + EnvironmentName = "Development", + WebRootPath = webRoot + }); + builder.WebHost.ConfigureServices(services => + { + services.AddRouting(); + }); + builder.Configuration["EnableStaticAssetsDevelopmentCaching"] = "true"; + builder.WebHost.UseTestServer(); + + var app = builder.Build(); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + endpoints.MapStaticAssets(); + }); + + await app.StartAsync(); + + var client = app.GetTestClient(); + + // Act + var response = await client.GetAsync("/sample.txt"); + Assert.NotNull(response); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag); + Assert.Equal(13, response.Content.Headers.ContentLength); + Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); + Assert.Equal("Hello, World!", await response.Content.ReadAsStringAsync()); + Assert.Equal("immutable", response.Headers.CacheControl.ToString()); + + Directory.Delete(webRoot, true); + } + + [Fact] + public async Task Integrity_IsDisabled_InDevelopment() + { + // Arrange + var appName = nameof(Integrity_IsDisabled_InDevelopment); + var (contentRoot, webRoot) = ConfigureAppPaths(appName); + + CreateTestManifest( + appName, + webRoot, + [ + new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), + ]); + + var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions + { + ApplicationName = appName, + ContentRootPath = contentRoot, + EnvironmentName = "Development", + WebRootPath = webRoot + }); + builder.WebHost.ConfigureServices(services => + { + services.AddRouting(); + }); + builder.WebHost.UseTestServer(); + + var app = builder.Build(); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + var builder = endpoints.MapStaticAssets(); + var descriptors = builder.Descriptors; + + endpoints.MapGet("/has-integrity", context => + { + var descriptor = descriptors[0]; + var integrity = descriptors[0].Properties.FirstOrDefault(p => p.Name == "integrity"); + if (integrity != null) + { + context.Response.StatusCode = 400; + } + return Task.CompletedTask; + }); + }); + + await app.StartAsync(); + + var client = app.GetTestClient(); + + // Act + var response = await client.GetAsync("/has-integrity"); + Assert.NotNull(response); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Directory.Delete(webRoot, true); + } + + [Fact] + public async Task CanEnableIntegrity_InDevelopment() + { + // Arrange + var appName = nameof(Integrity_IsDisabled_InDevelopment); + var (contentRoot, webRoot) = ConfigureAppPaths(appName); + + CreateTestManifest( + appName, + webRoot, + [ + new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), + ]); + + var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions + { + ApplicationName = appName, + ContentRootPath = contentRoot, + EnvironmentName = "Development", + WebRootPath = webRoot + }); + builder.WebHost.ConfigureServices(services => + { + services.AddRouting(); + }); + builder.WebHost.UseTestServer(); + builder.Configuration["EnableStaticAssetsDevelopmentIntegrity"] = "true"; + var app = builder.Build(); + app.UseRouting(); + app.UseEndpoints(endpoints => + { + var builder = endpoints.MapStaticAssets(); + var descriptors = builder.Descriptors; + + endpoints.MapGet("/has-integrity", context => + { + var descriptor = descriptors[0]; + var integrity = descriptors[0].Properties.FirstOrDefault(p => p.Name == "integrity"); + if (integrity == null) + { + context.Response.StatusCode = 400; + } + return Task.CompletedTask; + }); + }); + + await app.StartAsync(); + + var client = app.GetTestClient(); + + // Act + var response = await client.GetAsync("/has-integrity"); + Assert.NotNull(response); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Directory.Delete(webRoot, true); + } + [Fact] public async Task CanServeNewFilesAddedAfterBuildDuringDevelopment() { @@ -275,32 +491,35 @@ private static void CreateTestManifest(string appName, string webRoot, params Sp var filePath = Path.Combine(webRoot, resource.Path); var lastModified = DateTimeOffset.UtcNow; File.WriteAllText(filePath, resource.Content); - - manifest.Endpoints.Add(new StaticAssetDescriptor( - resource.Path, - resource.Path, - [], - [], - [ + var hash = GetEtag(resource.Content); + manifest.Endpoints.Add(new StaticAssetDescriptor + { + Route = resource.Path, + AssetPath = resource.Path, + Selectors = [], + Properties = [new("integrity", $"sha256-{hash}")], + ResponseHeaders = [ new ("Accept-Ranges", "bytes"), new("Content-Length", resource.Content.Length.ToString(CultureInfo.InvariantCulture)), new("Content-Type", GetContentType(filePath)), - new ("ETag", $"\"{GetEtag(resource.Content)}\""), - new("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)) + new ("ETag", $"\"{hash}\""), + new("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)), + ..(resource.AdditionalHeaders ?? []) ] - )); + }); if (resource.IncludeCompressedVersion) { var compressedFilePath = Path.Combine(webRoot, resource.Path + ".gz"); var length = CreateCompressedFile(compressedFilePath, resource); - manifest.Endpoints.Add(new StaticAssetDescriptor( - resource.Path, - $"{resource.Path}.gz", - [new StaticAssetSelector("Content-Encoding", "gzip", "1.0")], - [], - [ + manifest.Endpoints.Add(new StaticAssetDescriptor + { + Route = resource.Path, + AssetPath = $"{resource.Path}.gz", + Selectors = [new StaticAssetSelector("Content-Encoding", "gzip", "1.0")], + Properties = [], + ResponseHeaders = [ new ("Accept-Ranges", "bytes"), new ("Content-Type", GetContentType(filePath)), @@ -312,7 +531,7 @@ [new StaticAssetSelector("Content-Encoding", "gzip", "1.0")], new ("Content-Encoding", "gzip"), new ("Vary", "Accept-Encoding"), ] - )); + }); } } using var stream = File.Create(manifestPath); @@ -352,19 +571,20 @@ private static async Task CreateClient() { Version = 1 }; - manifest.Endpoints.Add(new StaticAssetDescriptor( - "sample.txt", - "sample.txt", - [], - [], - [ + manifest.Endpoints.Add(new StaticAssetDescriptor + { + Route = "sample.txt", + AssetPath = "sample.txt", + Selectors = [], + Properties = [], + ResponseHeaders = [ new ("Accept-Ranges", "bytes"), new("Content-Length", "Hello, World!".Length.ToString(CultureInfo.InvariantCulture)), new("Content-Type", GetContentType("sample.txt")), new ("ETag", $"\"{GetEtag("Hello, World!")}\""), new("Last-Modified", new DateTimeOffset(2023,03,03,0,0,0,TimeSpan.Zero).ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)) ] - )); + }); var builder = WebApplication.CreateEmptyBuilder(new WebApplicationOptions { @@ -799,9 +1019,9 @@ private static string GetContentType(string filePath) }; } - private record TestResource(string Path, string Content, bool IncludeCompressedVersion); + private record TestResource(string Path, string Content, bool IncludeCompressedVersion, StaticAssetResponseHeader[] AdditionalHeaders = null); - private class TestFileProvider(StaticAssetsIntegrationTests.TestResource[] testResources) : IFileProvider + private class TestFileProvider(TestResource[] testResources) : IFileProvider { public IDirectoryContents GetDirectoryContents(string subpath) { From 8ca8b6b7f7b991622e7dfafcb6e4d0d45ef1cb72 Mon Sep 17 00:00:00 2001 From: Kevin Pancake Date: Mon, 17 Jun 2024 12:48:00 +0200 Subject: [PATCH 051/257] Remove redundant check (#55945) Probably copy-paste'd. --- src/Components/Web.JS/src/Boot.Server.Common.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Components/Web.JS/src/Boot.Server.Common.ts b/src/Components/Web.JS/src/Boot.Server.Common.ts index f6c9c9bd7d23..f8b60ccb055d 100644 --- a/src/Components/Web.JS/src/Boot.Server.Common.ts +++ b/src/Components/Web.JS/src/Boot.Server.Common.ts @@ -25,10 +25,6 @@ export function setCircuitOptions(initializersReady: Promise>): Promise { From d57ef96c5c25e659e467d372da1468ced12e3daf Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Mon, 17 Jun 2024 16:17:58 +0200 Subject: [PATCH 052/257] [Blazor] Rename ComponentPlatform to RendererInfo (#56263) * Rename ComponentPlatform to RendererInfo --- .../Components/src/ComponentBase.cs | 4 +-- .../Components/src/PublicAPI.Unshipped.txt | 14 ++++----- src/Components/Components/src/RenderHandle.cs | 4 +-- .../src/RenderTree/ComponentPlatform.cs | 31 ------------------- .../Components/src/RenderTree/Renderer.cs | 4 +-- .../Components/src/RenderTree/RendererInfo.cs | 22 +++++++++++++ .../Server/src/Circuits/RemoteRenderer.cs | 4 +-- .../src/HtmlRendering/StaticHtmlRenderer.cs | 4 +-- .../Web/src/PublicAPI.Unshipped.txt | 2 +- .../src/Rendering/WebAssemblyRenderer.cs | 4 +-- .../WebView/src/Services/WebViewRenderer.cs | 4 +-- .../CascadingAuthenticationStateReader.razor | 4 +-- .../ComponentPlatformDetails.razor | 2 +- .../ResourceCollectionSample.razor | 4 +-- 14 files changed, 49 insertions(+), 58 deletions(-) delete mode 100644 src/Components/Components/src/RenderTree/ComponentPlatform.cs create mode 100644 src/Components/Components/src/RenderTree/RendererInfo.cs diff --git a/src/Components/Components/src/ComponentBase.cs b/src/Components/Components/src/ComponentBase.cs index d9c0f346b0ca..5de04ae8d70b 100644 --- a/src/Components/Components/src/ComponentBase.cs +++ b/src/Components/Components/src/ComponentBase.cs @@ -43,9 +43,9 @@ public ComponentBase() } /// - /// Gets the the component is running on. + /// Gets the the component is running on. /// - protected ComponentPlatform Platform => _renderHandle.Platform; + protected RendererInfo RendererInfo => _renderHandle.RendererInfo; /// /// Gets the for the application. diff --git a/src/Components/Components/src/PublicAPI.Unshipped.txt b/src/Components/Components/src/PublicAPI.Unshipped.txt index 77e24cf1f6e5..e8c43eb034cf 100644 --- a/src/Components/Components/src/PublicAPI.Unshipped.txt +++ b/src/Components/Components/src/PublicAPI.Unshipped.txt @@ -1,15 +1,15 @@ #nullable enable Microsoft.AspNetCore.Components.ComponentBase.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! Microsoft.AspNetCore.Components.ComponentBase.AssignedRenderMode.get -> Microsoft.AspNetCore.Components.IComponentRenderMode? -Microsoft.AspNetCore.Components.ComponentBase.Platform.get -> Microsoft.AspNetCore.Components.ComponentPlatform! -Microsoft.AspNetCore.Components.ComponentPlatform -Microsoft.AspNetCore.Components.ComponentPlatform.ComponentPlatform(string! platformName, bool isInteractive) -> void -Microsoft.AspNetCore.Components.ComponentPlatform.IsInteractive.get -> bool -Microsoft.AspNetCore.Components.ComponentPlatform.Name.get -> string! +Microsoft.AspNetCore.Components.ComponentBase.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! Microsoft.AspNetCore.Components.ExcludeFromInteractiveRoutingAttribute Microsoft.AspNetCore.Components.ExcludeFromInteractiveRoutingAttribute.ExcludeFromInteractiveRoutingAttribute() -> void +Microsoft.AspNetCore.Components.RendererInfo +Microsoft.AspNetCore.Components.RendererInfo.IsInteractive.get -> bool +Microsoft.AspNetCore.Components.RendererInfo.Name.get -> string! +Microsoft.AspNetCore.Components.RendererInfo.RendererInfo(string! rendererName, bool isInteractive) -> void Microsoft.AspNetCore.Components.RenderHandle.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! -Microsoft.AspNetCore.Components.RenderHandle.Platform.get -> Microsoft.AspNetCore.Components.ComponentPlatform! +Microsoft.AspNetCore.Components.RenderHandle.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! Microsoft.AspNetCore.Components.RenderHandle.RenderMode.get -> Microsoft.AspNetCore.Components.IComponentRenderMode? Microsoft.AspNetCore.Components.ResourceAsset Microsoft.AspNetCore.Components.ResourceAsset.Properties.get -> System.Collections.Generic.IReadOnlyList? @@ -25,4 +25,4 @@ Microsoft.AspNetCore.Components.ResourceAssetProperty.ResourceAssetProperty(stri Microsoft.AspNetCore.Components.ResourceAssetProperty.Value.get -> string! static readonly Microsoft.AspNetCore.Components.ResourceAssetCollection.Empty -> Microsoft.AspNetCore.Components.ResourceAssetCollection! virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.Assets.get -> Microsoft.AspNetCore.Components.ResourceAssetCollection! -virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.ComponentPlatform.get -> Microsoft.AspNetCore.Components.ComponentPlatform! +virtual Microsoft.AspNetCore.Components.RenderTree.Renderer.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! diff --git a/src/Components/Components/src/RenderHandle.cs b/src/Components/Components/src/RenderHandle.cs index 4af99006811a..6ac2b7b3cdec 100644 --- a/src/Components/Components/src/RenderHandle.cs +++ b/src/Components/Components/src/RenderHandle.cs @@ -52,9 +52,9 @@ public Dispatcher Dispatcher ?? throw new InvalidOperationException("No renderer has been initialized."); /// - /// Gets the the component is running on. + /// Gets the the component is running on. /// - public ComponentPlatform Platform => _renderer?.ComponentPlatform ?? throw new InvalidOperationException("No renderer has been initialized."); + public RendererInfo RendererInfo => _renderer?.RendererInfo ?? throw new InvalidOperationException("No renderer has been initialized."); /// /// Retrieves the assigned to the component. diff --git a/src/Components/Components/src/RenderTree/ComponentPlatform.cs b/src/Components/Components/src/RenderTree/ComponentPlatform.cs deleted file mode 100644 index 40a15d4f6081..000000000000 --- a/src/Components/Components/src/RenderTree/ComponentPlatform.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.AspNetCore.Components; - -/// -/// Provides information about the platform that the component is running on. -/// -public sealed class ComponentPlatform -{ - /// - /// Constructs a new instance of . - /// - /// The name of the platform. - /// A flag to indicate if the platform is interactive. - public ComponentPlatform(string platformName, bool isInteractive) - { - Name = platformName; - IsInteractive = isInteractive; - } - - /// - /// Gets the name of the platform. - /// - public string Name { get; } - - /// - /// Gets a flag to indicate if the platform is interactive. - /// - public bool IsInteractive { get; } -} diff --git a/src/Components/Components/src/RenderTree/Renderer.cs b/src/Components/Components/src/RenderTree/Renderer.cs index 20be6ba7f07f..e0fcfd834340 100644 --- a/src/Components/Components/src/RenderTree/Renderer.cs +++ b/src/Components/Components/src/RenderTree/Renderer.cs @@ -154,9 +154,9 @@ protected internal ComponentState GetComponentState(IComponent component) => _componentStateByComponent.GetValueOrDefault(component); /// - /// Gets the associated with this . + /// Gets the associated with this . /// - protected internal virtual ComponentPlatform ComponentPlatform { get; } + protected internal virtual RendererInfo RendererInfo { get; } /// /// Gets the associated with this . diff --git a/src/Components/Components/src/RenderTree/RendererInfo.cs b/src/Components/Components/src/RenderTree/RendererInfo.cs new file mode 100644 index 000000000000..9c401b5ce006 --- /dev/null +++ b/src/Components/Components/src/RenderTree/RendererInfo.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.AspNetCore.Components; + +/// +/// Provides information about the platform that the component is running on. +/// +/// The name of the platform. +/// A flag to indicate if the platform is interactive. +public sealed class RendererInfo(string rendererName, bool isInteractive) +{ + /// + /// Gets the name of the platform. + /// + public string Name { get; } = rendererName; + + /// + /// Gets a flag to indicate if the platform is interactive. + /// + public bool IsInteractive { get; } = isInteractive; +} diff --git a/src/Components/Server/src/Circuits/RemoteRenderer.cs b/src/Components/Server/src/Circuits/RemoteRenderer.cs index c589d4eef88f..31b29206212b 100644 --- a/src/Components/Server/src/Circuits/RemoteRenderer.cs +++ b/src/Components/Server/src/Circuits/RemoteRenderer.cs @@ -18,7 +18,7 @@ internal partial class RemoteRenderer : WebRenderer #pragma warning restore CA1852 // Seal internal types { private static readonly Task CanceledTask = Task.FromCanceled(new CancellationToken(canceled: true)); - private static readonly ComponentPlatform _componentPlatform = new("Server", isInteractive: true); + private static readonly RendererInfo _componentPlatform = new("Server", isInteractive: true); private readonly CircuitClientProxy _client; private readonly CircuitOptions _options; @@ -62,7 +62,7 @@ public RemoteRenderer( protected override ResourceAssetCollection Assets => _resourceCollection ?? base.Assets; - protected override ComponentPlatform ComponentPlatform => _componentPlatform; + protected override RendererInfo RendererInfo => _componentPlatform; protected override IComponentRenderMode? GetComponentRenderMode(IComponent component) => RenderMode.InteractiveServer; diff --git a/src/Components/Web/src/HtmlRendering/StaticHtmlRenderer.cs b/src/Components/Web/src/HtmlRendering/StaticHtmlRenderer.cs index 1a1c3425c840..104dcb930d66 100644 --- a/src/Components/Web/src/HtmlRendering/StaticHtmlRenderer.cs +++ b/src/Components/Web/src/HtmlRendering/StaticHtmlRenderer.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure; /// public partial class StaticHtmlRenderer : Renderer { - private static readonly ComponentPlatform _componentPlatform = new ComponentPlatform("Static", isInteractive: false); + private static readonly RendererInfo _componentPlatform = new RendererInfo("Static", isInteractive: false); private static readonly Task CanceledRenderTask = Task.FromCanceled(new CancellationToken(canceled: true)); private readonly NavigationManager? _navigationManager; @@ -41,7 +41,7 @@ public StaticHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory logge public override Dispatcher Dispatcher { get; } = Dispatcher.CreateDefault(); /// - protected internal override ComponentPlatform ComponentPlatform => _componentPlatform; + protected internal override RendererInfo RendererInfo => _componentPlatform; /// /// Adds a root component of the specified type and begins rendering it. diff --git a/src/Components/Web/src/PublicAPI.Unshipped.txt b/src/Components/Web/src/PublicAPI.Unshipped.txt index d3c627905559..42e7a30fad5c 100644 --- a/src/Components/Web/src/PublicAPI.Unshipped.txt +++ b/src/Components/Web/src/PublicAPI.Unshipped.txt @@ -3,4 +3,4 @@ Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime Microsoft.AspNetCore.Components.Web.Internal.IInternalWebJSInProcessRuntime.InvokeJS(string! identifier, string? argsJson, Microsoft.JSInterop.JSCallResultType resultType, long targetInstanceId) -> string! Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.IsComposing.get -> bool Microsoft.AspNetCore.Components.Web.KeyboardEventArgs.IsComposing.set -> void -override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.ComponentPlatform.get -> Microsoft.AspNetCore.Components.ComponentPlatform! +override Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.RendererInfo.get -> Microsoft.AspNetCore.Components.RendererInfo! diff --git a/src/Components/WebAssembly/WebAssembly/src/Rendering/WebAssemblyRenderer.cs b/src/Components/WebAssembly/WebAssembly/src/Rendering/WebAssemblyRenderer.cs index cc9426e2607c..d71cd1d63fcb 100644 --- a/src/Components/WebAssembly/WebAssembly/src/Rendering/WebAssemblyRenderer.cs +++ b/src/Components/WebAssembly/WebAssembly/src/Rendering/WebAssemblyRenderer.cs @@ -25,7 +25,7 @@ internal sealed partial class WebAssemblyRenderer : WebRenderer private readonly Dispatcher _dispatcher; private readonly ResourceAssetCollection _resourceCollection; private readonly IInternalJSImportMethods _jsMethods; - private static readonly ComponentPlatform _componentPlatform = new("WebAssembly", isInteractive: true); + private static readonly RendererInfo _componentPlatform = new("WebAssembly", isInteractive: true); public WebAssemblyRenderer(IServiceProvider serviceProvider, ResourceAssetCollection resourceCollection, ILoggerFactory loggerFactory, JSComponentInterop jsComponentInterop) : base(serviceProvider, loggerFactory, DefaultWebAssemblyJSRuntime.Instance.ReadJsonSerializerOptions(), jsComponentInterop) @@ -85,7 +85,7 @@ public void NotifyEndUpdateRootComponents(long batchId) protected override ResourceAssetCollection Assets => _resourceCollection; - protected override ComponentPlatform ComponentPlatform => _componentPlatform; + protected override RendererInfo RendererInfo => _componentPlatform; public override Dispatcher Dispatcher => _dispatcher; diff --git a/src/Components/WebView/WebView/src/Services/WebViewRenderer.cs b/src/Components/WebView/WebView/src/Services/WebViewRenderer.cs index 538750239477..8e4ef855964e 100644 --- a/src/Components/WebView/WebView/src/Services/WebViewRenderer.cs +++ b/src/Components/WebView/WebView/src/Services/WebViewRenderer.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Components.WebView.Services; internal sealed class WebViewRenderer : WebRenderer { - private static readonly ComponentPlatform _componentPlatform = new("WebView", isInteractive: true); + private static readonly RendererInfo _componentPlatform = new("WebView", isInteractive: true); private readonly Queue _unacknowledgedRenderBatches = new(); private readonly Dispatcher _dispatcher; private readonly IpcSender _ipcSender; @@ -32,7 +32,7 @@ public WebViewRenderer( public override Dispatcher Dispatcher => _dispatcher; - protected override ComponentPlatform ComponentPlatform => _componentPlatform; + protected override RendererInfo RendererInfo => _componentPlatform; protected override int GetWebRendererId() => (int)WebRendererId.WebView; diff --git a/src/Components/test/testassets/TestContentPackage/CascadingAuthenticationStateReader.razor b/src/Components/test/testassets/TestContentPackage/CascadingAuthenticationStateReader.razor index 9f0e4830afea..77a7f86aa9e2 100644 --- a/src/Components/test/testassets/TestContentPackage/CascadingAuthenticationStateReader.razor +++ b/src/Components/test/testassets/TestContentPackage/CascadingAuthenticationStateReader.razor @@ -58,13 +58,13 @@ else

Interactive: - @Platform.IsInteractive + @RendererInfo.IsInteractive

Platform: - @Platform.Name + @RendererInfo.Name


diff --git a/src/Components/test/testassets/TestContentPackage/ComponentPlatformDetails.razor b/src/Components/test/testassets/TestContentPackage/ComponentPlatformDetails.razor index 76763edadb6b..2debc69acaec 100644 --- a/src/Components/test/testassets/TestContentPackage/ComponentPlatformDetails.razor +++ b/src/Components/test/testassets/TestContentPackage/ComponentPlatformDetails.razor @@ -26,7 +26,7 @@ _renderMode = "static"; } - if (Platform.IsInteractive) + if (RendererInfo.IsInteractive) { _isInteractive = true; } diff --git a/src/Components/test/testassets/TestContentPackage/ResourceCollectionSample.razor b/src/Components/test/testassets/TestContentPackage/ResourceCollectionSample.razor index 703d78fc3f9a..d4ef2c3d829e 100644 --- a/src/Components/test/testassets/TestContentPackage/ResourceCollectionSample.razor +++ b/src/Components/test/testassets/TestContentPackage/ResourceCollectionSample.razor @@ -2,11 +2,11 @@ @using Microsoft.AspNetCore.Components.Web; @inject IJSRuntime JSRuntime -

@Platform.Name

+

@RendererInfo.Name

@Assets["BasicTestApp.styles.css"]

-@if (!Platform.IsInteractive) +@if (!RendererInfo.IsInteractive) { }else From 4370d4ead5e2f469d752862e714459bb7766fde6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:05:43 +0000 Subject: [PATCH 053/257] Update dependencies from https://github.com/dotnet/extensions build 20240616.1 (#56268) [main] Update dependencies from dotnet/extensions --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8502f2c7f58c..171c6c41366f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -414,13 +414,13 @@ https://github.com/dotnet/arcade 2001d73c8ff942331a73300ba61fa6164805b231 - + https://github.com/dotnet/extensions - c227151c582799fd22c5fe1f093846a2dd1eb00a + 4329e1255047b5c739616eec5e491c9175d4eabc - + https://github.com/dotnet/extensions - c227151c582799fd22c5fe1f093846a2dd1eb00a + 4329e1255047b5c739616eec5e491c9175d4eabc https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index a4c4c1d98879..8eceac63a7cb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -138,8 +138,8 @@ 9.0.0-preview.6.24307.2 9.0.0-preview.6.24307.2 - 9.0.0-preview.5.24308.1 - 9.0.0-preview.5.24308.1 + 9.0.0-preview.6.24316.1 + 9.0.0-preview.6.24316.1 9.0.0-preview.6.24304.2 9.0.0-preview.6.24304.2 From 774663de1d971e12d830ebd0983545674fc60369 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:08:37 +0000 Subject: [PATCH 054/257] [main] Update dependencies from dotnet/runtime (#56258) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 171c6c41366f..c98ba9276543 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore 80e9dce280f69dd9e65c9018509eb562e6efb059 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 8fac5af2b11dc98fa0504f6fd06df790164ec958 + bcd9cb869fef000e62729d083750121bce0bf1c4 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 8eceac63a7cb..6e2ea8481e3d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,80 +63,80 @@ --> - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24307.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24317.2 9.0.0-preview.6.24316.1 9.0.0-preview.6.24316.1 From 76c2012091d6841cbd24ec35185e9e424d8e0d9f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:13:54 +0000 Subject: [PATCH 055/257] [main] Update dependencies from dotnet/arcade (#56035) --- .azure/pipelines/ci-public.yml | 4 +- .azure/pipelines/ci.yml | 4 +- eng/Version.Details.xml | 24 +-- eng/Versions.props | 8 +- eng/common/SetupNugetSources.ps1 | 159 ++++++++---------- eng/common/SetupNugetSources.sh | 60 +++---- eng/common/core-templates/job/job.yml | 56 +++--- eng/common/core-templates/job/onelocbuild.yml | 2 +- .../job/publish-build-assets.yml | 2 +- .../core-templates/job/source-build.yml | 13 ++ .../core-templates/jobs/codeql-build.yml | 2 +- eng/common/core-templates/jobs/jobs.yml | 6 +- .../core-templates/jobs/source-build.yml | 8 + .../core-templates/post-build/post-build.yml | 3 +- .../post-build/trigger-subscription.yml | 13 -- .../steps/add-build-to-channel.yml | 13 -- .../steps/enable-internal-runtimes.yml | 32 ++++ .../steps/enable-internal-sources.yml | 35 ++++ .../steps/get-delegation-sas.yml} | 3 + .../steps/get-federated-access-token.yml | 28 +++ .../core-templates/steps/source-build.yml | 13 +- eng/common/cross/armv6/sources.list.bookworm | 2 + eng/common/cross/build-android-rootfs.sh | 8 +- eng/common/cross/build-rootfs.sh | 20 ++- eng/common/cross/riscv64/sources.list.noble | 11 ++ eng/common/cross/tizen-fetch.sh | 2 +- eng/common/dotnet-install.sh | 2 +- .../post-build/add-build-to-channel.ps1 | 48 ------ .../post-build/check-channel-consistency.ps1 | 10 +- eng/common/post-build/nuget-validation.ps1 | 20 +-- eng/common/post-build/nuget-verification.ps1 | 121 +++++++++++++ eng/common/post-build/post-build-utils.ps1 | 91 ---------- eng/common/post-build/publish-using-darc.ps1 | 8 +- eng/common/post-build/redact-logs.ps1 | 10 +- .../post-build/sourcelink-validation.ps1 | 10 +- eng/common/post-build/symbols-validation.ps1 | 2 - .../post-build/trigger-subscriptions.ps1 | 64 ------- eng/common/template-guidance.md | 6 +- eng/common/templates-official/job/job.yml | 5 +- .../post-build/trigger-subscription.yml | 13 -- .../steps/enable-internal-runtimes.yml | 9 + .../steps/enable-internal-sources.yml | 7 + ...-to-channel.yml => get-delegation-sas.yml} | 2 +- .../steps/get-federated-access-token.yml | 7 + .../steps/publish-pipeline-artifacts.yml | 4 +- eng/common/templates/job/job.yml | 2 + .../post-build/trigger-subscription.yml | 13 -- .../steps/enable-internal-runtimes.yml | 10 ++ .../steps/enable-internal-sources.yml | 7 + ...-to-channel.yml => get-delegation-sas.yml} | 2 +- .../steps/get-federated-access-token.yml | 7 + eng/common/tools.ps1 | 4 +- eng/common/tools.sh | 12 +- global.json | 4 +- 54 files changed, 548 insertions(+), 483 deletions(-) delete mode 100644 eng/common/core-templates/post-build/trigger-subscription.yml delete mode 100644 eng/common/core-templates/steps/add-build-to-channel.yml create mode 100644 eng/common/core-templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/core-templates/steps/enable-internal-sources.yml rename eng/common/{templates/steps/get-delegate-sas.yml => core-templates/steps/get-delegation-sas.yml} (96%) create mode 100644 eng/common/core-templates/steps/get-federated-access-token.yml create mode 100644 eng/common/cross/armv6/sources.list.bookworm create mode 100644 eng/common/cross/riscv64/sources.list.noble delete mode 100644 eng/common/post-build/add-build-to-channel.ps1 create mode 100644 eng/common/post-build/nuget-verification.ps1 delete mode 100644 eng/common/post-build/post-build-utils.ps1 delete mode 100644 eng/common/post-build/trigger-subscriptions.ps1 delete mode 100644 eng/common/templates-official/post-build/trigger-subscription.yml create mode 100644 eng/common/templates-official/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates-official/steps/enable-internal-sources.yml rename eng/common/templates-official/steps/{add-build-to-channel.yml => get-delegation-sas.yml} (66%) create mode 100644 eng/common/templates-official/steps/get-federated-access-token.yml delete mode 100644 eng/common/templates/post-build/trigger-subscription.yml create mode 100644 eng/common/templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates/steps/enable-internal-sources.yml rename eng/common/templates/steps/{add-build-to-channel.yml => get-delegation-sas.yml} (66%) create mode 100644 eng/common/templates/steps/get-federated-access-token.yml diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index fb4f00051dd6..7fc827d228ab 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -573,7 +573,7 @@ stages: agentOs: macOS timeoutInMinutes: 90 isAzDOTestingJob: true - buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) + buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs) beforeBuild: - bash: "./eng/scripts/install-nginx-mac.sh" displayName: Installing Nginx @@ -594,7 +594,7 @@ stages: agentOs: Linux isAzDOTestingJob: true useHostedUbuntu: false - buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) + buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs) beforeBuild: - bash: "./eng/scripts/install-nginx-linux.sh" displayName: Installing Nginx diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 1b019b7343b6..92e67369cf51 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -637,7 +637,7 @@ extends: agentOs: macOS timeoutInMinutes: 90 isAzDOTestingJob: true - buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) + buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs) beforeBuild: - bash: "./eng/scripts/install-nginx-mac.sh" displayName: Installing Nginx @@ -658,7 +658,7 @@ extends: agentOs: Linux isAzDOTestingJob: true useHostedUbuntu: false - buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) + buildArgs: --all --test --binaryLog /p:RunTemplateTests=false /p:SkipHelixReadyTests=true $(_InternalRuntimeDownloadArgs) beforeBuild: - bash: "./eng/scripts/install-nginx-linux.sh" displayName: Installing Nginx diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c98ba9276543..c81f37550cc2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -388,31 +388,31 @@ https://github.com/dotnet/winforms 25717b4f5d6f00097dc9bc328a3d4652ad71414c - + https://github.com/dotnet/arcade - 2001d73c8ff942331a73300ba61fa6164805b231 + 92a725aa4d9d6c13dc5229597b51b0b165b8b535 - + https://github.com/dotnet/arcade - 2001d73c8ff942331a73300ba61fa6164805b231 + 92a725aa4d9d6c13dc5229597b51b0b165b8b535 - + https://github.com/dotnet/arcade - 2001d73c8ff942331a73300ba61fa6164805b231 + 92a725aa4d9d6c13dc5229597b51b0b165b8b535 - + https://github.com/dotnet/arcade - 2001d73c8ff942331a73300ba61fa6164805b231 + 92a725aa4d9d6c13dc5229597b51b0b165b8b535 - + https://github.com/dotnet/arcade - 2001d73c8ff942331a73300ba61fa6164805b231 + 92a725aa4d9d6c13dc5229597b51b0b165b8b535 - + https://github.com/dotnet/arcade - 2001d73c8ff942331a73300ba61fa6164805b231 + 92a725aa4d9d6c13dc5229597b51b0b165b8b535 https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index 6e2ea8481e3d..29a54e4f45df 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -161,10 +161,10 @@ 6.2.4 6.2.4 - 9.0.0-beta.24272.5 - 9.0.0-beta.24272.5 - 9.0.0-beta.24272.5 - 9.0.0-beta.24272.5 + 9.0.0-beta.24314.1 + 9.0.0-beta.24314.1 + 9.0.0-beta.24314.1 + 9.0.0-beta.24314.1 9.0.0-alpha.1.24303.2 diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index efa2fd72bfaa..c07f6a52601b 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -1,31 +1,32 @@ -# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. -# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# This script adds internal feeds required to build commits that depend on internal package sources. For instance, +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. +# +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. This credential +# is added via the standard environment variable VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. See +# https://github.com/microsoft/artifacts-credprovider/tree/v1.1.1?tab=readme-ov-file#environment-variables for more details # -# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry -# under for each Maestro managed private feed. Two additional credential -# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. -# -# This script needs to be called in every job that will restore packages and which the base repo has -# private AzDO feeds in the NuGet.config. -# -# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` -# from the AzureDevOps-Artifact-Feeds-Pats variable group. -# -# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing +# See example call for this script below. # # - task: PowerShell@2 -# displayName: Setup Private Feeds Credentials +# displayName: Setup Internal Feeds # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token -# env: -# Token: $(dn-bot-dnceng-artifact-feeds-rw) +# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config +# - task: NuGetAuthenticate@1 +# +# Note that the NuGetAuthenticate task should be called after SetupNugetSources. +# This ensures that: +# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) +# - The credential provider is installed +# +# This logic is also abstracted into enable-internal-sources.yml. [CmdletBinding()] param ( [Parameter(Mandatory = $true)][string]$ConfigFile, - [Parameter(Mandatory = $true)][string]$Password + [string]$Password ) $ErrorActionPreference = "Stop" @@ -34,12 +35,23 @@ Set-StrictMode -Version 2.0 . $PSScriptRoot\tools.ps1 +$feedEndpoints = $null + +# If a credential is provided, ensure that we don't overwrite the current set of +# credentials that may have been provided by a previous call to the credential provider. +if ($Password -and $null -ne $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS) { + $feedEndpoints = $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS | ConvertFrom-Json +} elseif ($Password) { + $feedEndpoints = @{ endpointCredentials = @() } +} + # Add source entry to PackageSources -function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) { +function AddPackageSource($sources, $SourceName, $SourceEndPoint, $pwd) { $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") - if ($packageSource -eq $null) + if ($null -eq $packageSource) { + Write-Host "`tAdding package source" $SourceName $packageSource = $doc.CreateElement("add") $packageSource.SetAttribute("key", $SourceName) $packageSource.SetAttribute("value", $SourceEndPoint) @@ -48,58 +60,34 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern else { Write-Host "Package source $SourceName already present." } - AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd -} - -# Add a credential node for the specified source -function AddCredential($creds, $source, $username, $pwd) { - # Looks for credential configuration for the given SourceName. Create it if none is found. - $sourceElement = $creds.SelectSingleNode($Source) - if ($sourceElement -eq $null) - { - $sourceElement = $doc.CreateElement($Source) - $creds.AppendChild($sourceElement) | Out-Null - } - # Add the node to the credential if none is found. - $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") - if ($usernameElement -eq $null) - { - $usernameElement = $doc.CreateElement("add") - $usernameElement.SetAttribute("key", "Username") - $sourceElement.AppendChild($usernameElement) | Out-Null + if ($pwd) { + $feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $SourceEndPoint -pwd $pwd } - $usernameElement.SetAttribute("value", $Username) +} - # Add the to the credential if none is found. - # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. - # -> https://github.com/NuGet/Home/issues/5526 - $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") - if ($passwordElement -eq $null) - { - $passwordElement = $doc.CreateElement("add") - $passwordElement.SetAttribute("key", "ClearTextPassword") - $sourceElement.AppendChild($passwordElement) | Out-Null +# Add a new feed endpoint credential +function AddCredential([array]$endpointCredentials, $source, $pwd) { + $endpointCredentials += @{ + endpoint = $source; + password = $pwd } - - $passwordElement.SetAttribute("value", $pwd) + return $endpointCredentials } -function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) { - $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") +function InsertMaestroInternalFeedCredentials($Sources, $pwd) { + $maestroInternalSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") - Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." - - ForEach ($PackageSource in $maestroPrivateSources) { - Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key - AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd + ForEach ($PackageSource in $maestroInternalSources) { + Write-Host "`tAdding credential for Maestro's feed:" $PackageSource.Key + $feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $PackageSource.value -pwd $pwd } } -function EnablePrivatePackageSources($DisabledPackageSources) { - $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") - ForEach ($DisabledPackageSource in $maestroPrivateSources) { - Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource" +function EnableInternalPackageSources($DisabledPackageSources) { + $maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") + ForEach ($DisabledPackageSource in $maestroInternalSources) { + Write-Host "`tEnsuring internal source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource" # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries $DisabledPackageSources.RemoveChild($DisabledPackageSource) } @@ -110,11 +98,6 @@ if (!(Test-Path $ConfigFile -PathType Leaf)) { ExitWithExitCode 1 } -if (!$Password) { - Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT' - ExitWithExitCode 1 -} - # Load NuGet.config $doc = New-Object System.Xml.XmlDocument $filename = (Get-Item $ConfigFile).FullName @@ -122,35 +105,27 @@ $doc.Load($filename) # Get reference to or create one if none exist already $sources = $doc.DocumentElement.SelectSingleNode("packageSources") -if ($sources -eq $null) { +if ($null -eq $sources) { $sources = $doc.CreateElement("packageSources") $doc.DocumentElement.AppendChild($sources) | Out-Null } -# Looks for a node. Create it if none is found. -$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") -if ($creds -eq $null) { - $creds = $doc.CreateElement("packageSourceCredentials") - $doc.DocumentElement.AppendChild($creds) | Out-Null -} - # Check for disabledPackageSources; we'll enable any darc-int ones we find there $disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources") -if ($disabledSources -ne $null) { +if ($null -ne $disabledSources) { Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node" - EnablePrivatePackageSources -DisabledPackageSources $disabledSources + EnableInternalPackageSources -DisabledPackageSources $disabledSources } -$userName = "dn-bot" - -# Insert credential nodes for Maestro's private feeds -InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password +if ($Password) { + InsertMaestroInternalFeedCredentials -Sources $sources -pwd $Password +} # 3.1 uses a different feed url format so it's handled differently here $dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") -if ($dotnet31Source -ne $null) { - AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password - AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password +if ($null -ne $dotnet31Source) { + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json" -pwd $Password + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json" -pwd $Password } $dotnetVersions = @('5','6','7','8') @@ -158,10 +133,18 @@ $dotnetVersions = @('5','6','7','8') foreach ($dotnetVersion in $dotnetVersions) { $feedPrefix = "dotnet" + $dotnetVersion; $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']") - if ($dotnetSource -ne $null) { - AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password - AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password + if ($dotnetSource) { + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedprefix-internal/nuget/v3/index.json" -pwd $Password + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v3/index.json" -pwd $Password } } -$doc.Save($filename) \ No newline at end of file +$doc.Save($filename) + +# If any credentials were added or altered, update the VSS_NUGET_EXTERNAL_FEED_ENDPOINTS environment variable +if ($null -ne $feedEndpoints) { + # ci is set to true so vso logging commands will be used. + $ci = $true + Write-PipelineSetVariable -Name 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' -Value $($feedEndpoints | ConvertTo-Json) -IsMultiJobVariable $false + Write-PipelineSetVariable -Name 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' -Value "False" -IsMultiJobVariable $false +} \ No newline at end of file diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index d387c7eac95e..16c1e29ea3b7 100755 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -1,28 +1,27 @@ #!/usr/bin/env bash -# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. -# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# This script adds internal feeds required to build commits that depend on intenral package sources. For instance, +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. +# +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. # -# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry -# under for each Maestro's managed private feed. Two additional credential -# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. -# -# This script needs to be called in every job that will restore packages and which the base repo has -# private AzDO feeds in the NuGet.config. -# -# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` -# from the AzureDevOps-Artifact-Feeds-Pats variable group. -# -# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing. +# See example call for this script below. # # - task: Bash@3 -# displayName: Setup Private Feeds Credentials +# displayName: Setup Internal Feeds # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(Build.SourcesDirectory)/NuGet.config $Token +# arguments: $(Build.SourcesDirectory)/NuGet.config # condition: ne(variables['Agent.OS'], 'Windows_NT') -# env: -# Token: $(dn-bot-dnceng-artifact-feeds-rw) +# - task: NuGetAuthenticate@1 +# +# Note that the NuGetAuthenticate task should be called after SetupNugetSources. +# This ensures that: +# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) +# - The credential provider is installed. +# +# This logic is also abstracted into enable-internal-sources.yml. ConfigFile=$1 CredToken=$2 @@ -48,11 +47,6 @@ if [ ! -f "$ConfigFile" ]; then ExitWithExitCode 1 fi -if [ -z "$CredToken" ]; then - Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT" - ExitWithExitCode 1 -fi - if [[ `uname -s` == "Darwin" ]]; then NL=$'\\\n' TB='' @@ -140,18 +134,20 @@ PackageSources+="$IFS" PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') IFS=$PrevIFS -for FeedName in ${PackageSources[@]} ; do - # Check if there is no existing credential for this FeedName - grep -i "<$FeedName>" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding credentials for $FeedName." +if [ "$CredToken" ]; then + for FeedName in ${PackageSources[@]} ; do + # Check if there is no existing credential for this FeedName + grep -i "<$FeedName>" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding credentials for $FeedName." - PackageSourceCredentialsNodeFooter="" - NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" + PackageSourceCredentialsNodeFooter="" + NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" - sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile - fi -done + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile + fi + done +fi # Re-enable any entries in disabledPackageSources where the feed name contains darc-int grep -i "" $ConfigFile diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 5836e4612ac0..7df58527978b 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -1,5 +1,5 @@ parameters: -# Job schema parameters - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job +# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job cancelTimeoutInMinutes: '' condition: '' container: '' @@ -83,7 +83,7 @@ jobs: - name: EnableRichCodeNavigation value: 'true' # Retry signature validation up to three times, waiting 2 seconds between attempts. - # See https://learn.microsoft.com/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures + # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY value: 3,2000 - ${{ each variable in parameters.variables }}: @@ -200,29 +200,28 @@ jobs: publishArtifacts: false # Publish test results - - ${{ if and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')) }}: - - ${{ if eq(parameters.testResultsFormat, 'xunit') }}: - - task: PublishTestResults@2 - displayName: Publish XUnit Test Results - inputs: - testResultsFormat: 'xUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit - mergeTestResults: ${{ parameters.mergeTestResults }} - continueOnError: true - condition: always() - - ${{ if eq(parameters.testResultsFormat, 'vstest') }}: - - task: PublishTestResults@2 - displayName: Publish TRX Test Results - inputs: - testResultsFormat: 'VSTest' - testResultsFiles: '*.trx' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx - mergeTestResults: ${{ parameters.mergeTestResults }} - continueOnError: true - condition: always() + - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}: + - task: PublishTestResults@2 + displayName: Publish XUnit Test Results + inputs: + testResultsFormat: 'xUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() + - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'vstest')) }}: + - task: PublishTestResults@2 + displayName: Publish TRX Test Results + inputs: + testResultsFormat: 'VSTest' + testResultsFiles: '*.trx' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() # gather artifacts - ${{ if ne(parameters.artifacts.publish, '') }}: @@ -246,6 +245,8 @@ jobs: SourceFolder: 'artifacts/log' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log' + continueOnError: true + condition: always() - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - task: CopyFiles@2 @@ -254,6 +255,8 @@ jobs: SourceFolder: 'artifacts/log/$(_BuildConfig)' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/log/$(_BuildConfig)' + continueOnError: true + condition: always() - ${{ if eq(parameters.enableBuildRetry, 'true') }}: - task: CopyFiles@2 displayName: Gather buildconfiguration for build retry @@ -261,6 +264,7 @@ jobs: SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration' - + continueOnError: true + condition: always() - ${{ each step in parameters.artifactPublishSteps }}: - ${{ step }} diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 84025d0bfe2f..00feec8ebbc3 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -2,7 +2,7 @@ parameters: # Optional: dependencies of the job dependsOn: '' - # Optional: A defined YAML pool - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool pool: '' CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 8b72fc5122b4..8fe9299542c5 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -13,7 +13,7 @@ parameters: # Optional: Include PublishBuildArtifacts task enablePublishBuildArtifacts: false - # Optional: A defined YAML pool - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool pool: {} # Optional: should run as a public build even in the internal project diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml index c0ce4b3c8618..c4713c8b6ede 100644 --- a/eng/common/core-templates/job/source-build.yml +++ b/eng/common/core-templates/job/source-build.yml @@ -33,6 +33,12 @@ parameters: is1ESPipeline: '' + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -74,6 +80,13 @@ jobs: - ${{ if eq(parameters.is1ESPipeline, '') }}: - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + - template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} - template: /eng/common/core-templates/steps/source-build.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml index 0ca1f8019ef0..f2144252cc65 100644 --- a/eng/common/core-templates/jobs/codeql-build.yml +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -1,7 +1,7 @@ parameters: # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md continueOnError: false - # Required: A collection of jobs to run - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] # Optional: if specified, restore and use this version of Guardian instead of the default. overrideGuardianVersion: '' diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index ace5a8339c8b..ea69be4341c6 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -21,7 +21,7 @@ parameters: # Optional: Include toolset dependencies in the generated graph files includeToolset: false - # Required: A collection of jobs to run - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] # Optional: Override automatically derived dependsOn value for "publish build assets" job @@ -51,7 +51,7 @@ jobs: - ${{ each job in parameters.jobs }}: - ${{ if eq(parameters.is1ESPipeline, 'true') }}: - template: /eng/common/templates-official/job/job.yml - parameters: + parameters: # pass along parameters ${{ each parameter in parameters }}: ${{ if ne(parameter.key, 'jobs') }}: @@ -66,7 +66,7 @@ jobs: - ${{ else }}: - template: /eng/common/templates/job/job.yml - parameters: + parameters: # pass along parameters ${{ each parameter in parameters }}: ${{ if ne(parameter.key, 'jobs') }}: diff --git a/eng/common/core-templates/jobs/source-build.yml b/eng/common/core-templates/jobs/source-build.yml index d8e5d0085226..a10ccfbee6de 100644 --- a/eng/common/core-templates/jobs/source-build.yml +++ b/eng/common/core-templates/jobs/source-build.yml @@ -23,6 +23,12 @@ parameters: is1ESPipeline: '' + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -41,6 +47,7 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/core-templates/job/source-build.yml @@ -48,3 +55,4 @@ jobs: is1ESPipeline: ${{ parameters.is1ESPipeline }} jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index 865bc1ecb4f0..fb15c40c03d4 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -145,8 +145,7 @@ stages: displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - job: displayName: Signing Validation diff --git a/eng/common/core-templates/post-build/trigger-subscription.yml b/eng/common/core-templates/post-build/trigger-subscription.yml deleted file mode 100644 index da669030daf6..000000000000 --- a/eng/common/core-templates/post-build/trigger-subscription.yml +++ /dev/null @@ -1,13 +0,0 @@ -parameters: - ChannelId: 0 - -steps: -- task: PowerShell@2 - displayName: Triggering subscriptions - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1 - arguments: -SourceRepo $(Build.Repository.Uri) - -ChannelId ${{ parameters.ChannelId }} - -MaestroApiAccessToken $(MaestroAccessToken) - -MaestroApiEndPoint $(MaestroApiEndPoint) - -MaestroApiVersion $(MaestroApiVersion) diff --git a/eng/common/core-templates/steps/add-build-to-channel.yml b/eng/common/core-templates/steps/add-build-to-channel.yml deleted file mode 100644 index f67a210d62f3..000000000000 --- a/eng/common/core-templates/steps/add-build-to-channel.yml +++ /dev/null @@ -1,13 +0,0 @@ -parameters: - ChannelId: 0 - -steps: -- task: PowerShell@2 - displayName: Add Build to Channel - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1 - arguments: -BuildId $(BARBuildId) - -ChannelId ${{ parameters.ChannelId }} - -MaestroApiAccessToken $(MaestroApiAccessToken) - -MaestroApiEndPoint $(MaestroApiEndPoint) - -MaestroApiVersion $(MaestroApiVersion) diff --git a/eng/common/core-templates/steps/enable-internal-runtimes.yml b/eng/common/core-templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..6bdbf62ac500 --- /dev/null +++ b/eng/common/core-templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,32 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true +- name: is1ESPipeline + type: boolean + default: false + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl + is1ESPipeline: ${{ parameters.is1ESPipeline }} \ No newline at end of file diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml new file mode 100644 index 000000000000..80deddafb1b6 --- /dev/null +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -0,0 +1,35 @@ +parameters: +# This is the Azure federated service connection that we log into to get an access token. +- name: nugetFederatedServiceConnection + type: string + default: 'dnceng-artifacts-feeds-read' +- name: is1ESPipeline + type: boolean + default: false + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. + # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that + # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + - task: NuGetAuthenticate@1 + - ${{ else }}: + - template: /eng/common/templates/steps/get-federated-access-token.yml + parameters: + federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} + outputVariableName: 'dnceng-artifacts-feeds-read-access-token' + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + # This is required in certain scenarios to install the ADO credential provider. + # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others + # (e.g. dotnet msbuild). + - task: NuGetAuthenticate@1 diff --git a/eng/common/templates/steps/get-delegate-sas.yml b/eng/common/core-templates/steps/get-delegation-sas.yml similarity index 96% rename from eng/common/templates/steps/get-delegate-sas.yml rename to eng/common/core-templates/steps/get-delegation-sas.yml index c0e8f91317f0..d2901470a7f0 100644 --- a/eng/common/templates/steps/get-delegate-sas.yml +++ b/eng/common/core-templates/steps/get-delegation-sas.yml @@ -16,6 +16,9 @@ parameters: - name: permissions type: string default: 'rl' +- name: is1ESPipeline + type: boolean + default: false steps: - task: AzureCLI@2 diff --git a/eng/common/core-templates/steps/get-federated-access-token.yml b/eng/common/core-templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..c8c49cc0e8f0 --- /dev/null +++ b/eng/common/core-templates/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index bdd725b496f9..16c778d92cb5 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -19,18 +19,10 @@ steps: set -x df -h - # If building on the internal project, the artifact feeds variable may be available (usually only if needed) - # In that case, call the feed setup script to add internal feeds corresponding to public ones. - # In addition, add an msbuild argument to copy the WIP from the repo to the target build location. - # This is because SetupNuGetSources.sh will alter the current NuGet.config file, and we need to preserve those - # changes. + # If file changes are detected, set CopyWipIntoInnerSourceBuildRepo to copy the WIP changes into the inner source build repo. internalRestoreArgs= - if [ '$(dn-bot-dnceng-artifact-feeds-rw)' != '$''(dn-bot-dnceng-artifact-feeds-rw)' ]; then - # Temporarily work around https://github.com/dotnet/arcade/issues/7709 - chmod +x $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh $(Build.SourcesDirectory)/NuGet.config $(dn-bot-dnceng-artifact-feeds-rw) + if ! git diff --quiet; then internalRestoreArgs='/p:CopyWipIntoInnerSourceBuildRepo=true' - # The 'Copy WIP' feature of source build uses git stash to apply changes from the original repo. # This only works if there is a username/email configured, which won't be the case in most CI runs. git config --get user.email @@ -123,6 +115,7 @@ steps: artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) continueOnError: true condition: succeededOrFailed() + sbomEnabled: false # we don't need SBOM for logs # Manually inject component detection so that we can ignore the source build upstream cache, which contains # a nupkg cache of input packages (a local feed). diff --git a/eng/common/cross/armv6/sources.list.bookworm b/eng/common/cross/armv6/sources.list.bookworm new file mode 100644 index 000000000000..10161135265c --- /dev/null +++ b/eng/common/cross/armv6/sources.list.bookworm @@ -0,0 +1,2 @@ +deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi +deb-src http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh index f163fb9dae96..7e9ba2b75ed3 100755 --- a/eng/common/cross/build-android-rootfs.sh +++ b/eng/common/cross/build-android-rootfs.sh @@ -5,15 +5,15 @@ __NDK_Version=r21 usage() { echo "Creates a toolchain and sysroot used for cross-compiling for Android." - echo. + echo echo "Usage: $0 [BuildArch] [ApiLevel]" - echo. + echo echo "BuildArch is the target architecture of Android. Currently only arm64 is supported." echo "ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html" - echo. + echo echo "By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior" echo "by setting the TOOLCHAIN_DIR environment variable" - echo. + echo echo "By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation," echo "you can set the NDK_DIR environment variable to have this script use that installation of the NDK." echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.28-arm64. This file is to replace '/etc/os-release', which is not available for Android." diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index a8e35df7cee1..8bb233ba25bf 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -131,6 +131,7 @@ __AlpineKeys=' __Keyring= __SkipSigCheck=0 __UseMirror=0 +__UseDeb822Format=0 __UnprocessedBuildArgs= while :; do @@ -181,7 +182,6 @@ while :; do __AlpinePackages="${__AlpinePackages// lldb-dev/}" __QEMUArch=riscv64 __UbuntuArch=riscv64 - __UbuntuRepo="http://deb.debian.org/debian" __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" unset __LLDB_Package @@ -288,6 +288,12 @@ while :; do __CodeName=jammy fi ;; + noble) # Ubuntu 24.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=noble + fi + __UseDeb822Format=1 + ;; jessie) # Debian 8 __CodeName=jessie @@ -314,6 +320,13 @@ while :; do bullseye) # Debian 11 __CodeName=bullseye + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi + ;; + bookworm) # Debian 12 + __CodeName=bookworm + if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" fi @@ -725,8 +738,11 @@ elif [[ -n "$__CodeName" ]]; then fi # shellcheck disable=SC2086 + echo running debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" - cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list" + mkdir -p "$__RootfsDir/etc/apt/sources.list.d/" + grep -q "Types:" "$__CrossDir/$__BuildArch/sources.list.$__CodeName" && filename="$__CodeName.sources" || filename="$__CodeName.list" + cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list.d/$filename" chroot "$__RootfsDir" apt-get update chroot "$__RootfsDir" apt-get -f -y install # shellcheck disable=SC2086 diff --git a/eng/common/cross/riscv64/sources.list.noble b/eng/common/cross/riscv64/sources.list.noble new file mode 100644 index 000000000000..4a5b56256dae --- /dev/null +++ b/eng/common/cross/riscv64/sources.list.noble @@ -0,0 +1,11 @@ +Types: deb +URIs: http://ports.ubuntu.com/ubuntu-ports/ +Suites: noble noble-updates noble-backports +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +Types: deb +URIs: http://ports.ubuntu.com/ubuntu-ports/ +Suites: noble-security +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg diff --git a/eng/common/cross/tizen-fetch.sh b/eng/common/cross/tizen-fetch.sh index c15c5066950d..28936ceef3a7 100644 --- a/eng/common/cross/tizen-fetch.sh +++ b/eng/common/cross/tizen-fetch.sh @@ -7,7 +7,7 @@ fi Log() { - if [ $VERBOSE -ge $1 ]; then + if [ $VERBOSE -ge 1 ]; then echo ${@:2} fi } diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index 7e69e3a9e24a..a2fba4703806 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -82,7 +82,7 @@ if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then dotnetRoot="$dotnetRoot/$architecture" fi -InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { +InstallDotNet "$dotnetRoot" $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { local exit_code=$? Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 ExitWithExitCode $exit_code diff --git a/eng/common/post-build/add-build-to-channel.ps1 b/eng/common/post-build/add-build-to-channel.ps1 deleted file mode 100644 index 49938f0c89f7..000000000000 --- a/eng/common/post-build/add-build-to-channel.ps1 +++ /dev/null @@ -1,48 +0,0 @@ -param( - [Parameter(Mandatory=$true)][int] $BuildId, - [Parameter(Mandatory=$true)][int] $ChannelId, - [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, - [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', - [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' -) - -try { - . $PSScriptRoot\post-build-utils.ps1 - - # Check that the channel we are going to promote the build to exist - $channelInfo = Get-MaestroChannel -ChannelId $ChannelId - - if (!$channelInfo) { - Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!" - ExitWithExitCode 1 - } - - # Get info about which channel(s) the build has already been promoted to - $buildInfo = Get-MaestroBuild -BuildId $BuildId - - if (!$buildInfo) { - Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!" - ExitWithExitCode 1 - } - - # Find whether the build is already assigned to the channel or not - if ($buildInfo.channels) { - foreach ($channel in $buildInfo.channels) { - if ($channel.Id -eq $ChannelId) { - Write-Host "The build with BAR ID $BuildId is already on channel $ChannelId!" - ExitWithExitCode 0 - } - } - } - - Write-Host "Promoting build '$BuildId' to channel '$ChannelId'." - - Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId - - Write-Host 'done.' -} -catch { - Write-Host $_ - Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'" - ExitWithExitCode 1 -} diff --git a/eng/common/post-build/check-channel-consistency.ps1 b/eng/common/post-build/check-channel-consistency.ps1 index 1728f035a93e..61208d2d1351 100644 --- a/eng/common/post-build/check-channel-consistency.ps1 +++ b/eng/common/post-build/check-channel-consistency.ps1 @@ -4,7 +4,15 @@ param( ) try { - . $PSScriptRoot\post-build-utils.ps1 + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + + # `tools.ps1` checks $ci to perform some actions. Since the post-build + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + $disableConfigureToolsetImport = $true + . $PSScriptRoot\..\tools.ps1 if ($PromoteToChannels -eq "") { Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1 index dab3534ab538..e5de00c89836 100644 --- a/eng/common/post-build/nuget-validation.ps1 +++ b/eng/common/post-build/nuget-validation.ps1 @@ -2,20 +2,18 @@ # tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage param( - [Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are - [Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to + [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are ) -try { - . $PSScriptRoot\post-build-utils.ps1 - - $url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1' - - New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force +# `tools.ps1` checks $ci to perform some actions. Since the post-build +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +$disableConfigureToolsetImport = $true +. $PSScriptRoot\..\tools.ps1 - Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1 - - & ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg +try { + & $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg } catch { Write-Host $_.ScriptStackTrace diff --git a/eng/common/post-build/nuget-verification.ps1 b/eng/common/post-build/nuget-verification.ps1 new file mode 100644 index 000000000000..a365194a9389 --- /dev/null +++ b/eng/common/post-build/nuget-verification.ps1 @@ -0,0 +1,121 @@ +<# +.SYNOPSIS + Verifies that Microsoft NuGet packages have proper metadata. +.DESCRIPTION + Downloads a verification tool and runs metadata validation on the provided NuGet packages. This script writes an + error if any of the provided packages fail validation. All arguments provided to this PowerShell script that do not + match PowerShell parameters are passed on to the verification tool downloaded during the execution of this script. +.PARAMETER NuGetExePath + The path to the nuget.exe binary to use. If not provided, nuget.exe will be downloaded into the -DownloadPath + directory. +.PARAMETER PackageSource + The package source to use to download the verification tool. If not provided, nuget.org will be used. +.PARAMETER DownloadPath + The directory path to download the verification tool and nuget.exe to. If not provided, + %TEMP%\NuGet.VerifyNuGetPackage will be used. +.PARAMETER args + Arguments that will be passed to the verification tool. +.EXAMPLE + PS> .\verify.ps1 *.nupkg + Verifies the metadata of all .nupkg files in the currect working directory. +.EXAMPLE + PS> .\verify.ps1 --help + Displays the help text of the downloaded verifiction tool. +.LINK + https://github.com/NuGet/NuGetGallery/blob/master/src/VerifyMicrosoftPackage/README.md +#> + +# This script was copied from https://github.com/NuGet/NuGetGallery/blob/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1 + +[CmdletBinding(PositionalBinding = $false)] +param( + [string]$NuGetExePath, + [string]$PackageSource = "https://api.nuget.org/v3/index.json", + [string]$DownloadPath, + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$args +) + +# The URL to download nuget.exe. +$nugetExeUrl = "https://dist.nuget.org/win-x86-commandline/v4.9.4/nuget.exe" + +# The package ID of the verification tool. +$packageId = "NuGet.VerifyMicrosoftPackage" + +# The location that nuget.exe and the verification tool will be downloaded to. +if (!$DownloadPath) { + $DownloadPath = (Join-Path $env:TEMP "NuGet.VerifyMicrosoftPackage") +} + +$fence = New-Object -TypeName string -ArgumentList '=', 80 + +# Create the download directory, if it doesn't already exist. +if (!(Test-Path $DownloadPath)) { + New-Item -ItemType Directory $DownloadPath | Out-Null +} +Write-Host "Using download path: $DownloadPath" + +if ($NuGetExePath) { + $nuget = $NuGetExePath +} else { + $downloadedNuGetExe = Join-Path $DownloadPath "nuget.exe" + + # Download nuget.exe, if it doesn't already exist. + if (!(Test-Path $downloadedNuGetExe)) { + Write-Host "Downloading nuget.exe from $nugetExeUrl..." + $ProgressPreference = 'SilentlyContinue' + try { + Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe + $ProgressPreference = 'Continue' + } catch { + $ProgressPreference = 'Continue' + Write-Error $_ + Write-Error "nuget.exe failed to download." + exit + } + } + + $nuget = $downloadedNuGetExe +} + +Write-Host "Using nuget.exe path: $nuget" +Write-Host " " + +# Download the latest version of the verification tool. +Write-Host "Downloading the latest version of $packageId from $packageSource..." +Write-Host $fence +& $nuget install $packageId ` + -Prerelease ` + -OutputDirectory $DownloadPath ` + -Source $PackageSource +Write-Host $fence +Write-Host " " + +if ($LASTEXITCODE -ne 0) { + Write-Error "nuget.exe failed to fetch the verify tool." + exit +} + +# Find the most recently downloaded tool +Write-Host "Finding the most recently downloaded verification tool." +$verifyProbePath = Join-Path $DownloadPath "$packageId.*" +$verifyPath = Get-ChildItem -Path $verifyProbePath -Directory ` + | Sort-Object -Property LastWriteTime -Descending ` + | Select-Object -First 1 +$verify = Join-Path $verifyPath "tools\NuGet.VerifyMicrosoftPackage.exe" +Write-Host "Using verification tool: $verify" +Write-Host " " + +# Execute the verification tool. +Write-Host "Executing the verify tool..." +Write-Host $fence +& $verify $args +Write-Host $fence +Write-Host " " + +# Respond to the exit code. +if ($LASTEXITCODE -ne 0) { + Write-Error "The verify tool found some problems." +} else { + Write-Output "The verify tool succeeded." +} diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1 deleted file mode 100644 index 534f6988d5b7..000000000000 --- a/eng/common/post-build/post-build-utils.ps1 +++ /dev/null @@ -1,91 +0,0 @@ -# Most of the functions in this file require the variables `MaestroApiEndPoint`, -# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available. - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -# `tools.ps1` checks $ci to perform some actions. Since the post-build -# scripts don't necessarily execute in the same agent that run the -# build.ps1/sh script this variable isn't automatically set. -$ci = $true -$disableConfigureToolsetImport = $true -. $PSScriptRoot\..\tools.ps1 - -function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') { - Validate-MaestroVars - - $headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $headers.Add('Accept', $ContentType) - $headers.Add('Authorization',"Bearer $MaestroApiAccessToken") - return $headers -} - -function Get-MaestroChannel([int]$ChannelId) { - Validate-MaestroVars - - $apiHeaders = Create-MaestroApiRequestHeaders - $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}?api-version=$MaestroApiVersion" - - $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - return $result -} - -function Get-MaestroBuild([int]$BuildId) { - Validate-MaestroVars - - $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken - $apiEndpoint = "$MaestroApiEndPoint/api/builds/${BuildId}?api-version=$MaestroApiVersion" - - $result = try { return Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - return $result -} - -function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) { - Validate-MaestroVars - - $SourceRepository = [System.Web.HttpUtility]::UrlEncode($SourceRepository) - $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken - $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions?sourceRepository=$SourceRepository&channelId=$ChannelId&api-version=$MaestroApiVersion" - - $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - return $result -} - -function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) { - Validate-MaestroVars - - $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken - $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion" - Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null -} - -function Trigger-Subscription([string]$SubscriptionId) { - Validate-MaestroVars - - $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken - $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion" - Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null -} - -function Validate-MaestroVars { - try { - Get-Variable MaestroApiEndPoint | Out-Null - Get-Variable MaestroApiVersion | Out-Null - Get-Variable MaestroApiAccessToken | Out-Null - - if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) { - Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'" - ExitWithExitCode 1 - } - - if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) { - Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'" - ExitWithExitCode 1 - } - } - catch { - Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.' - Write-Host $_ - ExitWithExitCode 1 - } -} diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 5a3a32ea8d75..8bc107fa7381 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -10,7 +10,12 @@ param( ) try { - . $PSScriptRoot\post-build-utils.ps1 + # `tools.ps1` checks $ci to perform some actions. Since the post-build + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + $disableConfigureToolsetImport = $true + . $PSScriptRoot\..\tools.ps1 $darc = Get-Darc @@ -38,6 +43,7 @@ try { --azdev-pat $AzdoToken ` --bar-uri $MaestroApiEndPoint ` --password $MaestroToken ` + --ci ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/post-build/redact-logs.ps1 b/eng/common/post-build/redact-logs.ps1 index 82d91f6fd022..b7fc19591507 100644 --- a/eng/common/post-build/redact-logs.ps1 +++ b/eng/common/post-build/redact-logs.ps1 @@ -11,7 +11,15 @@ param( ) try { - . $PSScriptRoot\post-build-utils.ps1 + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + + # `tools.ps1` checks $ci to perform some actions. Since the post-build + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + $disableConfigureToolsetImport = $true + . $PSScriptRoot\..\tools.ps1 $packageName = 'binlogtool' diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index 4011d324e739..1976ef70fb85 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -6,7 +6,15 @@ param( [Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use ) -. $PSScriptRoot\post-build-utils.ps1 +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +# `tools.ps1` checks $ci to perform some actions. Since the post-build +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +$disableConfigureToolsetImport = $true +. $PSScriptRoot\..\tools.ps1 # Cache/HashMap (File -> Exist flag) used to consult whether a file exist # in the repository at a specific commit point. This is populated by inserting diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index cd2181bafa05..7146e593ffae 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -322,8 +322,6 @@ function InstallDotnetSymbol { } try { - . $PSScriptRoot\post-build-utils.ps1 - InstallDotnetSymbol foreach ($Job in @(Get-Job)) { diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1 deleted file mode 100644 index ac9a95778fcd..000000000000 --- a/eng/common/post-build/trigger-subscriptions.ps1 +++ /dev/null @@ -1,64 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $SourceRepo, - [Parameter(Mandatory=$true)][int] $ChannelId, - [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, - [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', - [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' -) - -try { - . $PSScriptRoot\post-build-utils.ps1 - - # Get all the $SourceRepo subscriptions - $normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '') - $subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId - - if (!$subscriptions) { - Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'" - ExitWithExitCode 0 - } - - $subscriptionsToTrigger = New-Object System.Collections.Generic.List[string] - $failedTriggeredSubscription = $false - - # Get all enabled subscriptions that need dependency flow on 'everyBuild' - foreach ($subscription in $subscriptions) { - if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) { - Write-Host "Should trigger this subscription: ${$subscription.id}" - [void]$subscriptionsToTrigger.Add($subscription.id) - } - } - - foreach ($subscriptionToTrigger in $subscriptionsToTrigger) { - try { - Write-Host "Triggering subscription '$subscriptionToTrigger'." - - Trigger-Subscription -SubscriptionId $subscriptionToTrigger - - Write-Host 'done.' - } - catch - { - Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'" - Write-Host $_ - Write-Host $_.ScriptStackTrace - $failedTriggeredSubscription = $true - } - } - - if ($subscriptionsToTrigger.Count -eq 0) { - Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'." - } - elseif ($failedTriggeredSubscription) { - Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...' - ExitWithExitCode 1 - } - else { - Write-Host 'All subscriptions were triggered successfully!' - } -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_ - ExitWithExitCode 1 -} diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 48954b48b8da..5ef6c30ba924 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -20,7 +20,7 @@ The `templateIs1ESManaged` is available on most templates and affects which of t ## Multiple outputs -1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. +1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. Example: ``` yaml @@ -76,13 +76,11 @@ eng\common\ source-build.yml (shim) post-build\ post-build.yml (shim) - trigger-subscription.yml (shim) common-variabls.yml (shim) setup-maestro-vars.yml (shim) steps\ publish-build-artifacts.yml (logic) publish-pipeline-artifacts.yml (logic) - add-build-channel.yml (shim) component-governance.yml (shim) generate-sbom.yml (shim) publish-logs.yml (shim) @@ -107,9 +105,7 @@ eng\common\ common-variabls.yml (logic) post-build.yml (logic) setup-maestro-vars.yml (logic) - trigger-subscription.yml (logic) steps\ - add-build-to-channel.yml (logic) component-governance.yml (logic) generate-sbom.yml (logic) publish-build-artifacts.yml (redirect) diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 4724e9aaa809..0c2928d5c799 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -23,6 +23,7 @@ jobs: displayName: 'Publish logs' continueOnError: true condition: always() + sbomEnabled: false # we don't need SBOM for logs - ${{ if eq(parameters.enablePublishBuildArtifacts, true) }}: - output: buildArtifacts @@ -32,13 +33,15 @@ jobs: ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} continueOnError: true condition: always() + sbomEnabled: false # we don't need SBOM for logs - ${{ if eq(parameters.enableBuildRetry, 'true') }}: - output: pipelineArtifact targetPath: '$(Build.ArtifactStagingDirectory)/artifacts/eng/common/BuildConfiguration' artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' - continueOnError: true + continueOnError: true + sbomEnabled: false # we don't need SBOM for BuildConfiguration - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - output: pipelineArtifact diff --git a/eng/common/templates-official/post-build/trigger-subscription.yml b/eng/common/templates-official/post-build/trigger-subscription.yml deleted file mode 100644 index da669030daf6..000000000000 --- a/eng/common/templates-official/post-build/trigger-subscription.yml +++ /dev/null @@ -1,13 +0,0 @@ -parameters: - ChannelId: 0 - -steps: -- task: PowerShell@2 - displayName: Triggering subscriptions - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1 - arguments: -SourceRepo $(Build.Repository.Uri) - -ChannelId ${{ parameters.ChannelId }} - -MaestroApiAccessToken $(MaestroAccessToken) - -MaestroApiEndPoint $(MaestroApiEndPoint) - -MaestroApiVersion $(MaestroApiVersion) diff --git a/eng/common/templates-official/steps/enable-internal-runtimes.yml b/eng/common/templates-official/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..f9dd238c6cd5 --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -0,0 +1,9 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default +steps: +- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates-official/steps/enable-internal-sources.yml b/eng/common/templates-official/steps/enable-internal-sources.yml new file mode 100644 index 000000000000..e6d57182284d --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-sources.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/steps/add-build-to-channel.yml b/eng/common/templates-official/steps/get-delegation-sas.yml similarity index 66% rename from eng/common/templates-official/steps/add-build-to-channel.yml rename to eng/common/templates-official/steps/get-delegation-sas.yml index 543dea8c6969..c5a9c1f8275c 100644 --- a/eng/common/templates-official/steps/add-build-to-channel.yml +++ b/eng/common/templates-official/steps/get-delegation-sas.yml @@ -1,5 +1,5 @@ steps: -- template: /eng/common/core-templates/steps/add-build-to-channel.yml +- template: /eng/common/core-templates/steps/get-delegation-sas.yml parameters: is1ESPipeline: true diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..c8dcf6b81392 --- /dev/null +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/get-federated-access-token.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates-official/steps/publish-pipeline-artifacts.yml b/eng/common/templates-official/steps/publish-pipeline-artifacts.yml index d71eb0c74398..172f9f0fdc97 100644 --- a/eng/common/templates-official/steps/publish-pipeline-artifacts.yml +++ b/eng/common/templates-official/steps/publish-pipeline-artifacts.yml @@ -23,4 +23,6 @@ steps: ${{ if parameters.args.artifactName }}: artifactName: ${{ parameters.args.artifactName }} ${{ if parameters.args.properties }}: - properties: ${{ parameters.args.properties }} \ No newline at end of file + properties: ${{ parameters.args.properties }} + ${{ if parameters.args.sbomEnabled }}: + sbomEnabled: ${{ parameters.args.sbomEnabled }} diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 1cf9a6d48127..5920952c5ba6 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -37,6 +37,7 @@ jobs: displayName: 'Publish logs' continueOnError: true condition: always() + sbomEnabled: false # we don't need SBOM for logs - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - template: /eng/common/core-templates/steps/publish-build-artifacts.yml @@ -59,3 +60,4 @@ jobs: artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' continueOnError: true + sbomEnabled: false # we don't need SBOM for BuildConfiguration diff --git a/eng/common/templates/post-build/trigger-subscription.yml b/eng/common/templates/post-build/trigger-subscription.yml deleted file mode 100644 index da669030daf6..000000000000 --- a/eng/common/templates/post-build/trigger-subscription.yml +++ /dev/null @@ -1,13 +0,0 @@ -parameters: - ChannelId: 0 - -steps: -- task: PowerShell@2 - displayName: Triggering subscriptions - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1 - arguments: -SourceRepo $(Build.Repository.Uri) - -ChannelId ${{ parameters.ChannelId }} - -MaestroApiAccessToken $(MaestroAccessToken) - -MaestroApiEndPoint $(MaestroApiEndPoint) - -MaestroApiVersion $(MaestroApiVersion) diff --git a/eng/common/templates/steps/enable-internal-runtimes.yml b/eng/common/templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..b21a8038cc1c --- /dev/null +++ b/eng/common/templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,10 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +steps: +- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/eng/common/templates/steps/enable-internal-sources.yml b/eng/common/templates/steps/enable-internal-sources.yml new file mode 100644 index 000000000000..5f87e9abb8aa --- /dev/null +++ b/eng/common/templates/steps/enable-internal-sources.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/templates/steps/add-build-to-channel.yml b/eng/common/templates/steps/get-delegation-sas.yml similarity index 66% rename from eng/common/templates/steps/add-build-to-channel.yml rename to eng/common/templates/steps/get-delegation-sas.yml index 42bbba161b9b..83760c9798e3 100644 --- a/eng/common/templates/steps/add-build-to-channel.yml +++ b/eng/common/templates/steps/get-delegation-sas.yml @@ -1,5 +1,5 @@ steps: -- template: /eng/common/core-templates/steps/add-build-to-channel.yml +- template: /eng/common/core-templates/steps/get-delegation-sas.yml parameters: is1ESPipeline: false diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..31e151d9d9e7 --- /dev/null +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/get-federated-access-token.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 204cb54af051..9574f4eb9df0 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -520,7 +520,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { # Two part minimal VS version, e.g. "15.9", "16.0", etc. # "components": ["componentId1", "componentId2", ...] # Array of ids of workload components that must be available in the VS instance. -# See e.g. https://learn.microsoft.com/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017 +# See e.g. https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017 # # Returns JSON describing the located VS instance (same format as returned by vswhere), # or $null if no instance meeting the requirements is found on the machine. @@ -653,7 +653,7 @@ function GetNuGetPackageCachePath() { $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' } else { $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' - $env:RESTORENOCACHE = $true + $env:RESTORENOHTTPCACHE = $true } } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index db64e298ff63..00473c9f918d 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -347,14 +347,14 @@ function InitializeBuildTool { fi } -# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 +# Set RestoreNoHttpCache as a workaround for https://github.com/NuGet/Home/issues/3116 function GetNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then - export NUGET_PACKAGES="$HOME/.nuget/packages" + export NUGET_PACKAGES="$HOME/.nuget/packages/" else - export NUGET_PACKAGES="$repo_root/.packages" - export RESTORENOCACHE=true + export NUGET_PACKAGES="$repo_root/.packages/" + export RESTORENOHTTPCACHE=true fi fi @@ -438,7 +438,7 @@ function StopProcesses { } function MSBuild { - local args=$@ + local args=( "$@" ) if [[ "$pipelines_log" == true ]]; then InitializeBuildTool InitializeToolset @@ -473,7 +473,7 @@ function MSBuild { args+=( "-logger:$selectedPath" ) fi - MSBuild-Core ${args[@]} + MSBuild-Core "${args[@]}" } function MSBuild-Core { diff --git a/global.json b/global.json index cc619c03c036..38b0423006f6 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ "jdk": "11" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24272.5", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24272.5" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24314.1", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24314.1" } } From 42925a4cebf501fd00aae1a1e899a969b4a2bd9a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:35:21 -0700 Subject: [PATCH 056/257] Update .NET SDK (#56267) Update .NET SDK to version 9.0.100-preview.6.24316.4. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 38b0423006f6..bd07cb04f3f7 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.6.24311.23" + "version": "9.0.100-preview.6.24316.4" }, "tools": { - "dotnet": "9.0.100-preview.6.24311.23", + "dotnet": "9.0.100-preview.6.24316.4", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 05ac25dbaa1ebb9550fab1974239119b349a4399 Mon Sep 17 00:00:00 2001 From: Mike Kistler Date: Tue, 18 Jun 2024 09:10:33 -0700 Subject: [PATCH 057/257] Improve doc in IAuthenticationHandler (#56196) Minor doc fix Co-authored-by: Stephen Halter --- .../Authentication.Abstractions/src/IAuthenticationHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Authentication.Abstractions/src/IAuthenticationHandler.cs b/src/Http/Authentication.Abstractions/src/IAuthenticationHandler.cs index 7b5287ddfdb2..4f2168c5b18a 100644 --- a/src/Http/Authentication.Abstractions/src/IAuthenticationHandler.cs +++ b/src/Http/Authentication.Abstractions/src/IAuthenticationHandler.cs @@ -14,7 +14,7 @@ public interface IAuthenticationHandler /// Initialize the authentication handler. The handler should initialize anything it needs from the request and scheme as part of this method. ///
/// The scheme. - /// The context. + /// The context for the current request. Task InitializeAsync(AuthenticationScheme scheme, HttpContext context); /// From c60c98722632032f38c26d98a18e742353bf87e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:42:58 -0700 Subject: [PATCH 058/257] Skip SpotBugs for now (#56297) Co-authored-by: William Godbe --- .azure/pipelines/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 92e67369cf51..783985415a41 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -143,6 +143,8 @@ extends: name: NetCore1ESPool-Svc-Internal image: windows.vs2022.amd64 os: windows + spotBugs: + enabled: false containers: alpine319WithNode: image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode From cad47d29b9243f8e4d4c9562a610d097a37cda6d Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 18 Jun 2024 12:26:55 -0700 Subject: [PATCH 059/257] Use exact runtime for non-servicing builds of Blazor DevServer (#56278) --- ...soft.AspNetCore.Components.WebAssembly.DevServer.csproj | 7 +++++-- .../DevServer/src/blazor-devserver.runtimeconfig.json.in | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj index 2030028ff87f..ff17430a5092 100644 --- a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj +++ b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj @@ -36,8 +36,11 @@ - <_RuntimeConfigProperties> - AspNetCoreMajorMinorVersion=$(AspNetCoreMajorMinorVersion); + <_RuntimeConfigProperties Condition="'$(IsServicingBuild)' == 'true'"> + FrameworkVersion=$(AspNetCoreMajorMinorVersion).0; + + <_RuntimeConfigProperties Condition="'$(IsServicingBuild)' != 'true'"> + FrameworkVersion=$(SharedFxVersion); <_RuntimeConfigPath>$(OutputPath)blazor-devserver.runtimeconfig.json diff --git a/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in b/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in index 352baf2b524a..9758c3a7ba71 100644 --- a/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in +++ b/src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in @@ -3,7 +3,7 @@ "tfm": "net9.0", "framework": { "name": "Microsoft.AspNetCore.App", - "version": "${AspNetCoreMajorMinorVersion}.0" + "version": "${FrameworkVersion}" }, "rollForwardOnNoCandidateFx": 2 } From 874aaf496bbe37ccc0a6acf1788c4ea3a884cba5 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Tue, 18 Jun 2024 16:15:27 -0700 Subject: [PATCH 060/257] Add support for reference-based schemas in OpenAPI document (#56175) * Add support for reference-based schemas in OpenAPI document * Use ReferenceEquals in equality checks and address feedback * Support generating friendly reference names * Add schema spec tests, move controller tests, move dedupe logic * Add more scenarios to snapsho tests * Harden OpenApi comparer implementations * Add tests for schema transformers + refs * Address more feedback --- .../OpenApiSchemaComparerBenchmark.cs | 63 ++++ .../sample/Controllers/TestController.cs | 1 + src/OpenApi/sample/Program.cs | 25 ++ .../src/Comparers/OpenApiAnyComparer.cs | 81 ++++ .../Comparers/OpenApiDiscriminatorComparer.cs | 40 ++ .../Comparers/OpenApiExternalDocsComparer.cs | 42 +++ .../src/Comparers/OpenApiReferenceComparer.cs | 44 +++ .../src/Comparers/OpenApiSchemaComparer.cs | 115 ++++++ .../OpenApiTagComparer.cs | 7 +- .../src/Comparers/OpenApiXmlComparer.cs | 48 +++ .../Extensions/JsonObjectSchemaExtensions.cs | 17 +- .../src/Extensions/JsonTypeInfoExtensions.cs | 121 ++++++ .../src/Schemas/OpenApiJsonSchema.Helpers.cs | 5 + .../src/Schemas/OpenApiSchemaKeywords.cs | 2 + src/OpenApi/src/Services/OpenApiConstants.cs | 1 + .../src/Services/OpenApiDocumentService.cs | 8 +- .../Services/Schemas/OpenApiSchemaService.cs | 4 +- .../Services/Schemas/OpenApiSchemaStore.cs | 153 +++++++- .../OpenApiSchemaReferenceTransformer.cs | 152 ++++++++ .../ScrubExtensionsTransformer.cs | 93 +++++ .../test/Comparers/OpenApiAnyComparerTests.cs | 49 +++ .../OpenApiDiscriminatorComparerTests.cs | 23 ++ .../OpenApiExternalDocsComparerTests.cs | 23 ++ .../OpenApiReferenceComparerTests.cs | 26 ++ .../Comparers/OpenApiSchemaComparerTests.cs | 307 +++++++++++++++ .../test/Comparers/OpenApiXmlComparerTests.cs | 24 ++ .../Extensions/JsonTypeInfoExtensionsTests.cs | 70 ++++ .../OpenApiDocumentIntegrationTests.cs | 2 + ...ment_documentName=controllers.verified.txt | 111 ++++++ ...piDocument_documentName=forms.verified.txt | 226 +++--------- ...cument_documentName=responses.verified.txt | 195 ++-------- ...t_documentName=schemas-by-ref.verified.txt | 348 ++++++++++++++++++ ...enApiDocument_documentName=v1.verified.txt | 174 ++------- ...enApiDocument_documentName=v2.verified.txt | 93 +---- ...OpenApiDocumentServiceTests.RequestBody.cs | 36 +- .../OpenApiDocumentServiceTests.Responses.cs | 14 +- ...nApiComponentService.RequestBodySchemas.cs | 18 +- ...OpenApiComponentService.ResponseSchemas.cs | 43 ++- src/OpenApi/test/SharedTypes.cs | 12 + .../OpenApiSchemaReferenceTransformerTests.cs | 317 ++++++++++++++++ .../Transformers/SchemaTransformerTests.cs | 4 +- 41 files changed, 2517 insertions(+), 620 deletions(-) create mode 100644 src/OpenApi/perf/Microbenchmarks/OpenApiSchemaComparerBenchmark.cs create mode 100644 src/OpenApi/src/Comparers/OpenApiAnyComparer.cs create mode 100644 src/OpenApi/src/Comparers/OpenApiDiscriminatorComparer.cs create mode 100644 src/OpenApi/src/Comparers/OpenApiExternalDocsComparer.cs create mode 100644 src/OpenApi/src/Comparers/OpenApiReferenceComparer.cs create mode 100644 src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs rename src/OpenApi/src/{Helpers => Comparers}/OpenApiTagComparer.cs (87%) create mode 100644 src/OpenApi/src/Comparers/OpenApiXmlComparer.cs create mode 100644 src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs create mode 100644 src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs create mode 100644 src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs create mode 100644 src/OpenApi/test/Comparers/OpenApiDiscriminatorComparerTests.cs create mode 100644 src/OpenApi/test/Comparers/OpenApiExternalDocsComparerTests.cs create mode 100644 src/OpenApi/test/Comparers/OpenApiReferenceComparerTests.cs create mode 100644 src/OpenApi/test/Comparers/OpenApiSchemaComparerTests.cs create mode 100644 src/OpenApi/test/Comparers/OpenApiXmlComparerTests.cs create mode 100644 src/OpenApi/test/Extensions/JsonTypeInfoExtensionsTests.cs create mode 100644 src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt create mode 100644 src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt create mode 100644 src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs diff --git a/src/OpenApi/perf/Microbenchmarks/OpenApiSchemaComparerBenchmark.cs b/src/OpenApi/perf/Microbenchmarks/OpenApiSchemaComparerBenchmark.cs new file mode 100644 index 000000000000..efd0db85a59f --- /dev/null +++ b/src/OpenApi/perf/Microbenchmarks/OpenApiSchemaComparerBenchmark.cs @@ -0,0 +1,63 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Globalization; +using BenchmarkDotNet.Attributes; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Interfaces; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi.Microbenchmarks; + +public class OpenApiSchemaComparerBenchmark +{ + [Params(1, 10, 100)] + public int ElementCount { get; set; } + + private OpenApiSchema _schema; + + [GlobalSetup(Target = nameof(OpenApiSchema_GetHashCode))] + public void OpenApiSchema_Setup() + { + _schema = new OpenApiSchema + { + AdditionalProperties = GenerateInnerSchema(), + AdditionalPropertiesAllowed = true, + AllOf = Enumerable.Range(0, ElementCount).Select(_ => GenerateInnerSchema()).ToList(), + AnyOf = Enumerable.Range(0, ElementCount).Select(_ => GenerateInnerSchema()).ToList(), + Deprecated = true, + Default = new OpenApiString("default"), + Description = "description", + Discriminator = new OpenApiDiscriminator(), + Example = new OpenApiString("example"), + ExclusiveMaximum = true, + ExclusiveMinimum = true, + Extensions = new Dictionary + { + ["key"] = new OpenApiString("value") + }, + ExternalDocs = new OpenApiExternalDocs(), + Enum = Enumerable.Range(0, ElementCount).Select(_ => (IOpenApiAny)new OpenApiString("enum")).ToList(), + OneOf = Enumerable.Range(0, ElementCount).Select(_ => GenerateInnerSchema()).ToList(), + }; + + static OpenApiSchema GenerateInnerSchema() => new OpenApiSchema + { + Properties = Enumerable.Range(0, 10).ToDictionary(i => i.ToString(CultureInfo.InvariantCulture), _ => new OpenApiSchema()), + Deprecated = true, + Default = new OpenApiString("default"), + Description = "description", + Example = new OpenApiString("example"), + Extensions = new Dictionary + { + ["key"] = new OpenApiString("value") + }, + }; + } + + [Benchmark] + public void OpenApiSchema_GetHashCode() + { + OpenApiSchemaComparer.Instance.GetHashCode(_schema); + } +} diff --git a/src/OpenApi/sample/Controllers/TestController.cs b/src/OpenApi/sample/Controllers/TestController.cs index 3bc34d97b99f..cf1fed79abb2 100644 --- a/src/OpenApi/sample/Controllers/TestController.cs +++ b/src/OpenApi/sample/Controllers/TestController.cs @@ -7,6 +7,7 @@ [ApiController] [Route("[controller]")] +[ApiExplorerSettings(GroupName = "controllers")] public class TestController : ControllerBase { [HttpGet] diff --git a/src/OpenApi/sample/Program.cs b/src/OpenApi/sample/Program.cs index 7053cdcb2395..9d8df2a2b470 100644 --- a/src/OpenApi/sample/Program.cs +++ b/src/OpenApi/sample/Program.cs @@ -1,6 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Frozen; +using System.Collections.Immutable; +using System.ComponentModel; +using Microsoft.AspNetCore.Http.HttpResults; using Microsoft.AspNetCore.Mvc; using Microsoft.OpenApi.Models; using Sample.Transformers; @@ -24,8 +28,10 @@ return Task.CompletedTask; }); }); +builder.Services.AddOpenApi("controllers"); builder.Services.AddOpenApi("responses"); builder.Services.AddOpenApi("forms"); +builder.Services.AddOpenApi("schemas-by-ref"); var app = builder.Build(); @@ -38,6 +44,9 @@ var forms = app.MapGroup("forms") .WithGroupName("forms"); +var schemas = app.MapGroup("schemas-by-ref") + .WithGroupName("schemas-by-ref"); + if (app.Environment.IsDevelopment()) { forms.DisableAntiforgery(); @@ -84,6 +93,22 @@ responses.MapGet("/triangle", () => new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 }); responses.MapGet("/shape", () => new Shape { Color = "blue", Sides = 4 }); +schemas.MapGet("/typed-results", () => TypedResults.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })); +schemas.MapGet("/multiple-results", Results, NotFound> () => Random.Shared.Next(0, 2) == 0 + ? TypedResults.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 }) + : TypedResults.NotFound("Item not found.")); +schemas.MapGet("/iresult-no-produces", () => Results.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })); +schemas.MapGet("/iresult-with-produces", () => Results.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })) + .Produces(200, "text/xml"); +schemas.MapGet("/primitives", ([Description("The ID associated with the Todo item.")] int id, [Description("The number of Todos to fetch")] int size) => { }); +schemas.MapGet("/product", (Product product) => TypedResults.Ok(product)); +schemas.MapGet("/account", (Account account) => TypedResults.Ok(account)); +schemas.MapPost("/array-of-ints", (int[] values) => values.Sum()); +schemas.MapPost("/list-of-ints", (List values) => values.Count); +schemas.MapPost("/ienumerable-of-ints", (IEnumerable values) => values.Count()); +schemas.MapGet("/dictionary-of-ints", () => new Dictionary { { "one", 1 }, { "two", 2 } }); +schemas.MapGet("/frozen-dictionary-of-ints", () => ImmutableDictionary.CreateRange(new Dictionary { { "one", 1 }, { "two", 2 } })); + app.MapControllers(); app.Run(); diff --git a/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs b/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs new file mode 100644 index 000000000000..7990446ab26e --- /dev/null +++ b/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs @@ -0,0 +1,81 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.OpenApi.Any; + +namespace Microsoft.AspNetCore.OpenApi; + +internal sealed class OpenApiAnyComparer : IEqualityComparer +{ + public static OpenApiAnyComparer Instance { get; } = new OpenApiAnyComparer(); + + public bool Equals(IOpenApiAny? x, IOpenApiAny? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + if (object.ReferenceEquals(x, y)) + { + return true; + } + + return x.AnyType == y.AnyType && + (x switch + { + OpenApiNull _ => y is OpenApiNull, + OpenApiArray arrayX => y is OpenApiArray arrayY && arrayX.SequenceEqual(arrayY, Instance), + OpenApiObject objectX => y is OpenApiObject objectY && objectX.Keys.Count == objectY.Keys.Count && objectX.Keys.All(key => objectY.ContainsKey(key) && Equals(objectX[key], objectY[key])), + OpenApiBinary binaryX => y is OpenApiBinary binaryY && binaryX.Value.SequenceEqual(binaryY.Value), + OpenApiInteger integerX => y is OpenApiInteger integerY && integerX.Value == integerY.Value, + OpenApiLong longX => y is OpenApiLong longY && longX.Value == longY.Value, + OpenApiDouble doubleX => y is OpenApiDouble doubleY && doubleX.Value == doubleY.Value, + OpenApiFloat floatX => y is OpenApiFloat floatY && floatX.Value == floatY.Value, + OpenApiBoolean booleanX => y is OpenApiBoolean booleanY && booleanX.Value == booleanY.Value, + OpenApiString stringX => y is OpenApiString stringY && stringX.Value == stringY.Value, + OpenApiPassword passwordX => y is OpenApiPassword passwordY && passwordX.Value == passwordY.Value, + OpenApiByte byteX => y is OpenApiByte byteY && byteX.Value.SequenceEqual(byteY.Value), + OpenApiDate dateX => y is OpenApiDate dateY && dateX.Value == dateY.Value, + OpenApiDateTime dateTimeX => y is OpenApiDateTime dateTimeY && dateTimeX.Value == dateTimeY.Value, + _ => x.Equals(y) + }); + } + + public int GetHashCode(IOpenApiAny obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.AnyType); + if (obj is IOpenApiPrimitive primitive) + { + hashCode.Add(primitive.PrimitiveType); + } + if (obj is OpenApiBinary binary) + { + hashCode.AddBytes(binary.Value); + } + if (obj is OpenApiByte bytes) + { + hashCode.AddBytes(bytes.Value); + } + hashCode.Add(obj switch + { + OpenApiInteger integer => integer.Value, + OpenApiLong @long => @long.Value, + OpenApiDouble @double => @double.Value, + OpenApiFloat @float => @float.Value, + OpenApiBoolean boolean => boolean.Value, + OpenApiString @string => @string.Value, + OpenApiPassword password => password.Value, + OpenApiDate date => date.Value, + OpenApiDateTime dateTime => dateTime.Value, + _ => null + }); + + return hashCode.ToHashCode(); + } +} diff --git a/src/OpenApi/src/Comparers/OpenApiDiscriminatorComparer.cs b/src/OpenApi/src/Comparers/OpenApiDiscriminatorComparer.cs new file mode 100644 index 000000000000..f81c13589b44 --- /dev/null +++ b/src/OpenApi/src/Comparers/OpenApiDiscriminatorComparer.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +internal sealed class OpenApiDiscriminatorComparer : IEqualityComparer +{ + public static OpenApiDiscriminatorComparer Instance { get; } = new OpenApiDiscriminatorComparer(); + + public bool Equals(OpenApiDiscriminator? x, OpenApiDiscriminator? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + if (object.ReferenceEquals(x, y)) + { + return true; + } + + return x.PropertyName == y.PropertyName && + x.Mapping.Count == y.Mapping.Count && + x.Mapping.Keys.All(key => y.Mapping.ContainsKey(key) && x.Mapping[key] == y.Mapping[key]); + } + + public int GetHashCode(OpenApiDiscriminator obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.PropertyName); + hashCode.Add(obj.Mapping.Count); + return hashCode.ToHashCode(); + } +} diff --git a/src/OpenApi/src/Comparers/OpenApiExternalDocsComparer.cs b/src/OpenApi/src/Comparers/OpenApiExternalDocsComparer.cs new file mode 100644 index 000000000000..493b5e154be3 --- /dev/null +++ b/src/OpenApi/src/Comparers/OpenApiExternalDocsComparer.cs @@ -0,0 +1,42 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +internal sealed class OpenApiExternalDocsComparer : IEqualityComparer +{ + public static OpenApiExternalDocsComparer Instance { get; } = new OpenApiExternalDocsComparer(); + + public bool Equals(OpenApiExternalDocs? x, OpenApiExternalDocs? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + if (object.ReferenceEquals(x, y)) + { + return true; + } + + return x.Description == y.Description && + x.Url == y.Url && + x.Extensions.Count == y.Extensions.Count + && x.Extensions.Keys.All(k => y.Extensions.ContainsKey(k) && y.Extensions[k] == x.Extensions[k]); + } + + public int GetHashCode(OpenApiExternalDocs obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.Description); + hashCode.Add(obj.Url); + hashCode.Add(obj.Extensions.Count); + return hashCode.ToHashCode(); + } +} diff --git a/src/OpenApi/src/Comparers/OpenApiReferenceComparer.cs b/src/OpenApi/src/Comparers/OpenApiReferenceComparer.cs new file mode 100644 index 000000000000..f4c95dfb1d14 --- /dev/null +++ b/src/OpenApi/src/Comparers/OpenApiReferenceComparer.cs @@ -0,0 +1,44 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +internal sealed class OpenApiReferenceComparer : IEqualityComparer +{ + public static OpenApiReferenceComparer Instance { get; } = new OpenApiReferenceComparer(); + + public bool Equals(OpenApiReference? x, OpenApiReference? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + if (object.ReferenceEquals(x, y)) + { + return true; + } + + return x.ExternalResource == y.ExternalResource && + x.HostDocument?.HashCode == y.HostDocument?.HashCode && + x.Id == y.Id && + x.Type == y.Type; + } + + public int GetHashCode(OpenApiReference obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.ExternalResource); + hashCode.Add(obj.Id); + if (obj.Type is not null) + { + hashCode.Add(obj.Type); + } + return hashCode.ToHashCode(); + } +} diff --git a/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs b/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs new file mode 100644 index 000000000000..daf42772d89c --- /dev/null +++ b/src/OpenApi/src/Comparers/OpenApiSchemaComparer.cs @@ -0,0 +1,115 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +internal sealed class OpenApiSchemaComparer : IEqualityComparer +{ + public static OpenApiSchemaComparer Instance { get; } = new OpenApiSchemaComparer(); + + public bool Equals(OpenApiSchema? x, OpenApiSchema? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + if (object.ReferenceEquals(x, y)) + { + return true; + } + + return Instance.Equals(x.AdditionalProperties, y.AdditionalProperties) && + x.AdditionalPropertiesAllowed == y.AdditionalPropertiesAllowed && + x.AllOf.SequenceEqual(y.AllOf, Instance) && + x.AnyOf.SequenceEqual(y.AnyOf, Instance) && + x.Deprecated == y.Deprecated && + OpenApiAnyComparer.Instance.Equals(x.Default, y.Default) && + x.Description == y.Description && + OpenApiDiscriminatorComparer.Instance.Equals(x.Discriminator, y.Discriminator) && + OpenApiAnyComparer.Instance.Equals(x.Example, y.Example) && + x.ExclusiveMaximum == y.ExclusiveMaximum && + x.ExclusiveMinimum == y.ExclusiveMinimum && + x.Extensions.Count == y.Extensions.Count + && x.Extensions.Keys.All(k => y.Extensions.ContainsKey(k) && x.Extensions[k] is IOpenApiAny anyX && y.Extensions[k] is IOpenApiAny anyY && OpenApiAnyComparer.Instance.Equals(anyX, anyY)) && + OpenApiExternalDocsComparer.Instance.Equals(x.ExternalDocs, y.ExternalDocs) && + x.Enum.SequenceEqual(y.Enum, OpenApiAnyComparer.Instance) && + x.Format == y.Format && + Instance.Equals(x.Items, y.Items) && + x.Title == y.Title && + x.Type == y.Type && + x.Maximum == y.Maximum && + x.MaxItems == y.MaxItems && + x.MaxLength == y.MaxLength && + x.MaxProperties == y.MaxProperties && + x.Minimum == y.Minimum && + x.MinItems == y.MinItems && + x.MinLength == y.MinLength && + x.MinProperties == y.MinProperties && + x.MultipleOf == y.MultipleOf && + x.OneOf.SequenceEqual(y.OneOf, Instance) && + Instance.Equals(x.Not, y.Not) && + x.Nullable == y.Nullable && + x.Pattern == y.Pattern && + x.Properties.Keys.All(k => y.Properties.ContainsKey(k) && Instance.Equals(x.Properties[k], y.Properties[k])) && + x.ReadOnly == y.ReadOnly && + x.Required.Order().SequenceEqual(y.Required.Order()) && + OpenApiReferenceComparer.Instance.Equals(x.Reference, y.Reference) && + x.UniqueItems == y.UniqueItems && + x.UnresolvedReference == y.UnresolvedReference && + x.WriteOnly == y.WriteOnly && + OpenApiXmlComparer.Instance.Equals(x.Xml, y.Xml); + } + + public int GetHashCode(OpenApiSchema obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.AdditionalProperties, Instance); + hashCode.Add(obj.AdditionalPropertiesAllowed); + hashCode.Add(obj.AllOf.Count); + hashCode.Add(obj.AnyOf.Count); + hashCode.Add(obj.Deprecated); + hashCode.Add(obj.Default, OpenApiAnyComparer.Instance); + hashCode.Add(obj.Description); + hashCode.Add(obj.Discriminator, OpenApiDiscriminatorComparer.Instance); + hashCode.Add(obj.Example, OpenApiAnyComparer.Instance); + hashCode.Add(obj.ExclusiveMaximum); + hashCode.Add(obj.ExclusiveMinimum); + hashCode.Add(obj.Extensions.Count); + hashCode.Add(obj.ExternalDocs, OpenApiExternalDocsComparer.Instance); + hashCode.Add(obj.Enum.Count); + hashCode.Add(obj.Format); + hashCode.Add(obj.Items, Instance); + hashCode.Add(obj.Title); + hashCode.Add(obj.Type); + hashCode.Add(obj.Maximum); + hashCode.Add(obj.MaxItems); + hashCode.Add(obj.MaxLength); + hashCode.Add(obj.MaxProperties); + hashCode.Add(obj.Minimum); + hashCode.Add(obj.MinItems); + hashCode.Add(obj.MinLength); + hashCode.Add(obj.MinProperties); + hashCode.Add(obj.MultipleOf); + hashCode.Add(obj.OneOf.Count); + hashCode.Add(obj.Not, Instance); + hashCode.Add(obj.Nullable); + hashCode.Add(obj.Pattern); + hashCode.Add(obj.Properties.Count); + hashCode.Add(obj.ReadOnly); + hashCode.Add(obj.Required.Count); + hashCode.Add(obj.Reference, OpenApiReferenceComparer.Instance); + hashCode.Add(obj.UniqueItems); + hashCode.Add(obj.UnresolvedReference); + hashCode.Add(obj.WriteOnly); + hashCode.Add(obj.Xml, OpenApiXmlComparer.Instance); + return hashCode.ToHashCode(); + } +} diff --git a/src/OpenApi/src/Helpers/OpenApiTagComparer.cs b/src/OpenApi/src/Comparers/OpenApiTagComparer.cs similarity index 87% rename from src/OpenApi/src/Helpers/OpenApiTagComparer.cs rename to src/OpenApi/src/Comparers/OpenApiTagComparer.cs index d24d12e79768..7154553e932c 100644 --- a/src/OpenApi/src/Helpers/OpenApiTagComparer.cs +++ b/src/OpenApi/src/Comparers/OpenApiTagComparer.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.OpenApi; /// This comparer is used to maintain a globally unique list of tags encountered /// in a particular OpenAPI document. /// -internal class OpenApiTagComparer : IEqualityComparer +internal sealed class OpenApiTagComparer : IEqualityComparer { public static OpenApiTagComparer Instance { get; } = new OpenApiTagComparer(); @@ -23,6 +23,11 @@ public bool Equals(OpenApiTag? x, OpenApiTag? y) { return false; } + if (object.ReferenceEquals(x, y)) + { + return true; + } + // Tag comparisons are case-sensitive by default. Although the OpenAPI specification // only outlines case sensitivity for property names, we extend this principle to // property values for tag names as well. diff --git a/src/OpenApi/src/Comparers/OpenApiXmlComparer.cs b/src/OpenApi/src/Comparers/OpenApiXmlComparer.cs new file mode 100644 index 000000000000..4ae4d9ea3ddd --- /dev/null +++ b/src/OpenApi/src/Comparers/OpenApiXmlComparer.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +internal sealed class OpenApiXmlComparer : IEqualityComparer +{ + public static OpenApiXmlComparer Instance { get; } = new OpenApiXmlComparer(); + + public bool Equals(OpenApiXml? x, OpenApiXml? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + if (object.ReferenceEquals(x, y)) + { + return true; + } + + return x.Name == y.Name && + x.Namespace == y.Namespace && + x.Prefix == y.Prefix && + x.Attribute == y.Attribute && + x.Wrapped == y.Wrapped && + x.Extensions.Count == y.Extensions.Count + && x.Extensions.Keys.All(k => y.Extensions.ContainsKey(k) && y.Extensions[k] == x.Extensions[k]); + } + + public int GetHashCode(OpenApiXml obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.Name); + hashCode.Add(obj.Namespace); + hashCode.Add(obj.Prefix); + hashCode.Add(obj.Attribute); + hashCode.Add(obj.Wrapped); + hashCode.Add(obj.Extensions.Count); + return hashCode.ToHashCode(); + } +} diff --git a/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs index 6b73c4d90df5..59e713014ff5 100644 --- a/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs @@ -164,14 +164,15 @@ internal static void ApplyDefaultValue(this JsonObject schema, object? defaultVa /// opposed to after the generated schemas have been mapped to OpenAPI schemas. /// /// The produced by the underlying schema generator. - /// The associated with the . - internal static void ApplyPrimitiveTypesAndFormats(this JsonObject schema, Type type) + /// The associated with the . + internal static void ApplyPrimitiveTypesAndFormats(this JsonObject schema, JsonSchemaGenerationContext context) { - if (_simpleTypeToOpenApiSchema.TryGetValue(type, out var openApiSchema)) + if (_simpleTypeToOpenApiSchema.TryGetValue(context.TypeInfo.Type, out var openApiSchema)) { schema[OpenApiSchemaKeywords.NullableKeyword] = openApiSchema.Nullable || (schema[OpenApiSchemaKeywords.TypeKeyword] is JsonArray schemaType && schemaType.GetValues().Contains("null")); schema[OpenApiSchemaKeywords.TypeKeyword] = openApiSchema.Type; schema[OpenApiSchemaKeywords.FormatKeyword] = openApiSchema.Format; + schema[OpenApiConstants.SchemaId] = context.TypeInfo.GetSchemaReferenceId(); } } @@ -324,4 +325,14 @@ internal static void ApplyPolymorphismOptions(this JsonObject schema, JsonSchema schema[OpenApiSchemaKeywords.DiscriminatorMappingKeyword] = mappings; } } + + /// + /// Set the x-schema-id property on the schema to the identifier associated with the type. + /// + /// The produced by the underlying schema generator. + /// The associated with the current type. + internal static void ApplySchemaReferenceId(this JsonObject schema, JsonSchemaGenerationContext context) + { + schema[OpenApiConstants.SchemaId] = context.TypeInfo.GetSchemaReferenceId(); + } } diff --git a/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs b/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs new file mode 100644 index 000000000000..fa5cc8e119e1 --- /dev/null +++ b/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs @@ -0,0 +1,121 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO.Pipelines; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization.Metadata; +using Microsoft.AspNetCore.Http; + +namespace Microsoft.AspNetCore.OpenApi; + +internal static class JsonTypeInfoExtensions +{ + private static readonly Dictionary _simpleTypeToName = new() + { + [typeof(bool)] = "boolean", + [typeof(byte)] = "byte", + [typeof(int)] = "int", + [typeof(uint)] = "uint", + [typeof(long)] = "long", + [typeof(ulong)] = "ulong", + [typeof(short)] = "short", + [typeof(ushort)] = "ushort", + [typeof(float)] = "float", + [typeof(double)] = "double", + [typeof(decimal)] = "decimal", + [typeof(DateTime)] = "DateTime", + [typeof(DateTimeOffset)] = "DateTimeOffset", + [typeof(Guid)] = "Guid", + [typeof(char)] = "char", + [typeof(Uri)] = "Uri", + [typeof(string)] = "string", + [typeof(IFormFile)] = "IFormFile", + [typeof(IFormFileCollection)] = "IFormFileCollection", + [typeof(PipeReader)] = "PipeReader", + [typeof(Stream)] = "Stream" + }; + + /// + /// The following method maps a JSON type to a schema reference ID that will eventually be used as the + /// schema reference name in the OpenAPI document. These schema reference names are considered URL fragments + /// in the context of JSON Schema's $ref keyword and must comply with the character restrictions of URL fragments. + /// In particular, the generated strings can contain alphanumeric characters and a subset of special symbols. This + /// means that certain symbols that appear commonly in .NET type names like ">" are not permitted in the + /// generated reference ID. + /// + /// The associated with the target schema. + /// The schema reference ID represented as a string name. + internal static string GetSchemaReferenceId(this JsonTypeInfo jsonTypeInfo) + { + var type = jsonTypeInfo.Type; + // Short-hand if the type we're generating a schema reference ID for is + // one of the simple types defined above. + if (_simpleTypeToName.TryGetValue(type, out var simpleName)) + { + return simpleName; + } + + if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Enumerable, ElementType: { } elementType }) + { + var elementTypeInfo = jsonTypeInfo.Options.GetTypeInfo(elementType); + return $"ArrayOf{elementTypeInfo.GetSchemaReferenceId()}"; + } + + if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Dictionary, KeyType: { } keyType, ElementType: { } valueType }) + { + var keyTypeInfo = jsonTypeInfo.Options.GetTypeInfo(keyType); + var valueTypeInfo = jsonTypeInfo.Options.GetTypeInfo(valueType); + return $"DictionaryOf{keyTypeInfo.GetSchemaReferenceId()}And{valueTypeInfo.GetSchemaReferenceId()}"; + } + + return type.GetSchemaReferenceId(jsonTypeInfo.Options); + } + + internal static string GetSchemaReferenceId(this Type type, JsonSerializerOptions options) + { + // Check the simple types map first to account for the element types + // of enumerables that have been processed above. + if (_simpleTypeToName.TryGetValue(type, out var simpleName)) + { + return simpleName; + } + + // Although arrays are enumerable types they are not encoded correctly + // with JsonTypeInfoKind.Enumerable so we handle that here + if (type.IsArray && type.GetElementType() is { } elementType) + { + var elementTypeInfo = options.GetTypeInfo(elementType); + return $"ArrayOf{elementTypeInfo.GetSchemaReferenceId()}"; + } + + // Special handling for anonymous types + if (type.Name.StartsWith("<>f", StringComparison.Ordinal)) + { + var typeName = "AnonymousType"; + var anonymousTypeProperties = type.GetGenericArguments(); + var propertyNames = string.Join("And", anonymousTypeProperties.Select(p => p.GetSchemaReferenceId(options))); + return $"{typeName}Of{propertyNames}"; + } + + if (type.IsGenericType) + { + // Nullable types are suffixed with `?` (e.g. `Todo?`) + if (type.GetGenericTypeDefinition() == typeof(Nullable<>) + && Nullable.GetUnderlyingType(type) is { } underlyingType) + { + return $"{underlyingType.GetSchemaReferenceId(options)}?"; + } + // Special handling for generic types that are collections + // Generic types become a concatenation of the generic type name and the type arguments + else + { + var genericTypeName = type.Name[..type.Name.LastIndexOf('`')]; + var genericArguments = type.GetGenericArguments(); + var argumentNames = string.Join("And", genericArguments.Select(arg => arg.GetSchemaReferenceId(options))); + return $"{genericTypeName}Of{argumentNames}"; + } + } + return type.Name; + } +} diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index 7493f4313732..aa9fa15626fe 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.OpenApi; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using OpenApiConstants = Microsoft.AspNetCore.OpenApi.OpenApiConstants; internal sealed partial class OpenApiJsonSchema { @@ -289,6 +290,10 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, var mappings = ReadDictionary(ref reader); schema.Discriminator.Mapping = mappings; break; + case OpenApiConstants.SchemaId: + reader.Read(); + schema.Extensions.Add(OpenApiConstants.SchemaId, new OpenApiString(reader.GetString())); + break; default: reader.Skip(); break; diff --git a/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs b/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs index 69ba96d77016..1c41c47e1973 100644 --- a/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs +++ b/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs @@ -23,4 +23,6 @@ internal class OpenApiSchemaKeywords public const string MaximumKeyword = "maximum"; public const string MinItemsKeyword = "minItems"; public const string MaxItemsKeyword = "maxItems"; + public const string RefKeyword = "$ref"; + public const string SchemaIdKeyword = "x-schema-id"; } diff --git a/src/OpenApi/src/Services/OpenApiConstants.cs b/src/OpenApi/src/Services/OpenApiConstants.cs index 28adba3f51d5..d0adb4e3d797 100644 --- a/src/OpenApi/src/Services/OpenApiConstants.cs +++ b/src/OpenApi/src/Services/OpenApiConstants.cs @@ -11,6 +11,7 @@ internal static class OpenApiConstants internal const string DefaultOpenApiVersion = "1.0.0"; internal const string DefaultOpenApiRoute = "/openapi/{documentName}.json"; internal const string DescriptionId = "x-aspnetcore-id"; + internal const string SchemaId = "x-schema-id"; internal const string DefaultOpenApiResponseKey = "default"; // Since there's a finite set of operation types that can be included in a given // OpenApiPaths, we can pre-allocate an array of these types and use a direct diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index d436cd6eb3c7..7e7ed1ef53a2 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Concurrent; using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -34,6 +33,7 @@ internal sealed class OpenApiDocumentService( private readonly OpenApiOptions _options = optionsMonitor.Get(documentName); private readonly OpenApiSchemaService _componentService = serviceProvider.GetRequiredKeyedService(documentName); private readonly IOpenApiDocumentTransformer _scrubExtensionsTransformer = new ScrubExtensionsTransformer(); + private readonly IOpenApiDocumentTransformer _schemaReferenceTransformer = new OpenApiSchemaReferenceTransformer(); private static readonly OpenApiEncoding _defaultFormEncoding = new OpenApiEncoding { Style = ParameterStyle.Form, Explode = true }; @@ -43,7 +43,7 @@ internal sealed class OpenApiDocumentService( /// are unique within the lifetime of an application and serve as helpful associators between /// operations, API descriptions, and their respective transformer contexts. ///
- private readonly ConcurrentDictionary _operationTransformerContextCache = new(); + private readonly Dictionary _operationTransformerContextCache = new(); private static readonly ApiResponseType _defaultApiResponseType = new ApiResponseType { StatusCode = StatusCodes.Status200OK }; internal bool TryGetCachedOperationTransformerContext(string descriptionId, [NotNullWhen(true)] out OpenApiOperationTransformerContext? context) @@ -78,7 +78,9 @@ private async Task ApplyTransformersAsync(OpenApiDocument document, Cancellation var transformer = _options.DocumentTransformers[i]; await transformer.TransformAsync(document, documentTransformerContext, cancellationToken); } - // Remove `x-aspnetcore-id` extension from operations after all transformers have run. + // Move duplicated JSON schemas to the global components.schemas object and map references after all transformers have run. + await _schemaReferenceTransformer.TransformAsync(document, documentTransformerContext, cancellationToken); + // Remove `x-aspnetcore-id` and `x-schema-id` extensions from operations after all transformers have run. await _scrubExtensionsTransformer.TransformAsync(document, documentTransformerContext, cancellationToken); } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 81f91b3c8c51..d51f8d32c80c 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -76,7 +76,8 @@ internal sealed class OpenApiSchemaService( [OpenApiSchemaKeywords.FormatKeyword] = "binary" }; } - schema.ApplyPrimitiveTypesAndFormats(type); + schema.ApplyPrimitiveTypesAndFormats(context); + schema.ApplySchemaReferenceId(context); if (context.GetCustomAttributes(typeof(ValidationAttribute)) is { } validationAttributes) { schema.ApplyValidationAttributes(validationAttributes); @@ -102,6 +103,7 @@ internal async Task GetOrCreateSchemaAsync(Type type, ApiParamete Debug.Assert(deserializedSchema != null, "The schema should have been deserialized successfully and materialize a non-null value."); var schema = deserializedSchema.Schema; await ApplySchemaTransformersAsync(schema, type, parameterDescription, cancellationToken); + _schemaStore.PopulateSchemaIntoReferenceCache(schema); return schema; } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index b37466ad0bae..4d27ee5792e9 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -1,10 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Concurrent; using System.IO.Pipelines; using System.Text.Json.Nodes; using Microsoft.AspNetCore.Http; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; namespace Microsoft.AspNetCore.OpenApi; @@ -14,19 +15,43 @@ namespace Microsoft.AspNetCore.OpenApi; ///
internal sealed class OpenApiSchemaStore { - private readonly ConcurrentDictionary _schemas = new() + private readonly Dictionary _schemas = new() { // Pre-populate OpenAPI schemas for well-defined types in ASP.NET Core. - [new OpenApiSchemaKey(typeof(IFormFile), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, + [new OpenApiSchemaKey(typeof(IFormFile), null)] = new JsonObject + { + ["type"] = "string", + ["format"] = "binary", + [OpenApiConstants.SchemaId] = "IFormFile" + }, [new OpenApiSchemaKey(typeof(IFormFileCollection), null)] = new JsonObject { ["type"] = "array", - ["items"] = new JsonObject { ["type"] = "string", ["format"] = "binary" } + ["items"] = new JsonObject + { + ["type"] = "string", + ["format"] = "binary", + [OpenApiConstants.SchemaId] = "IFormFile" + }, + [OpenApiConstants.SchemaId] = "IFormFileCollection" + }, + [new OpenApiSchemaKey(typeof(Stream), null)] = new JsonObject + { + ["type"] = "string", + ["format"] = "binary", + [OpenApiConstants.SchemaId] = "Stream" + }, + [new OpenApiSchemaKey(typeof(PipeReader), null)] = new JsonObject + { + ["type"] = "string", + ["format"] = "binary", + [OpenApiConstants.SchemaId] = "PipeReader" }, - [new OpenApiSchemaKey(typeof(Stream), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, - [new OpenApiSchemaKey(typeof(PipeReader), null)] = new JsonObject { ["type"] = "string", ["format"] = "binary" }, }; + public readonly Dictionary SchemasByReference = new(OpenApiSchemaComparer.Instance); + private readonly Dictionary _referenceIdCounter = new(); + /// /// Resolves the JSON schema for the given type and parameter description. /// @@ -35,6 +60,120 @@ internal sealed class OpenApiSchemaStore /// A representing the JSON schema associated with the key. public JsonObject GetOrAdd(OpenApiSchemaKey key, Func valueFactory) { - return _schemas.GetOrAdd(key, valueFactory); + if (_schemas.TryGetValue(key, out var schema)) + { + return schema; + } + var targetSchema = valueFactory(key); + _schemas.Add(key, targetSchema); + return targetSchema; + } + + /// + /// Add the provided schema to the schema-with-references cache that is eventually + /// used to populate the top-level components.schemas object. This method will + /// unwrap the provided schema and add any child schemas to the global cache. Child + /// schemas include those referenced in the schema.Items, schema.AdditionalProperties, or + /// schema.Properties collections. Schema reference IDs are only set for schemas that have + /// been encountered more than once in the document to avoid unnecessarily capturing unique + /// schemas into the top-level document. + /// + /// The to add to the schemas-with-references cache. + public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema) + { + AddOrUpdateSchemaByReference(schema); + if (schema.AdditionalProperties is not null) + { + AddOrUpdateSchemaByReference(schema.AdditionalProperties); + } + if (schema.Items is not null) + { + AddOrUpdateSchemaByReference(schema.Items); + } + if (schema.AllOf is not null) + { + foreach (var allOfSchema in schema.AllOf) + { + AddOrUpdateSchemaByReference(allOfSchema); + } + } + if (schema.AnyOf is not null) + { + foreach (var anyOfSchema in schema.AnyOf) + { + AddOrUpdateSchemaByReference(anyOfSchema); + } + } + if (schema.Properties is not null) + { + foreach (var property in schema.Properties.Values) + { + AddOrUpdateSchemaByReference(property); + } + } + } + + private void AddOrUpdateSchemaByReference(OpenApiSchema schema) + { + if (SchemasByReference.TryGetValue(schema, out var referenceId)) + { + // If we've already used this reference ID else where in the document, increment a counter value to the reference + // ID to avoid name collisions. These collisions are most likely to occur when the same .NET type produces a different + // schema in the OpenAPI document because of special annotations provided on it. For example, in the two type definitions + // below: + // public class Todo + // { + // public int Id { get; set; } + // public string Name { get; set; } + // } + // public class Project + // { + // public int Id { get; set; } + // [MinLength(5)] + // public string Title { get; set; } + // } + // The `Title` and `Name` properties are both strings but the `Title` property has a `minLength` annotation + // on it that will materialize into a different schema. + // { + // + // "type": "string", + // "minLength": 5 + // } + // { + // "type": "string" + // } + // In this case, although the reference ID based on the .NET type we would use is `string`, the + // two schemas are distinct. + if (referenceId == null) + { + var targetReferenceId = GetSchemaReferenceId(schema); + if (_referenceIdCounter.TryGetValue(targetReferenceId, out var counter)) + { + counter++; + _referenceIdCounter[targetReferenceId] = counter; + SchemasByReference[schema] = $"{targetReferenceId}{counter}"; + } + else + { + _referenceIdCounter[targetReferenceId] = 1; + SchemasByReference[schema] = targetReferenceId; + } + } + } + else + { + SchemasByReference[schema] = null; + } + } + + private static string GetSchemaReferenceId(OpenApiSchema schema) + { + if (schema.Extensions.TryGetValue(OpenApiConstants.SchemaId, out var referenceIdAny) + && referenceIdAny is OpenApiString { Value: string referenceId }) + { + return referenceId; + } + + throw new InvalidOperationException("The schema reference ID must be set on the schema."); } } diff --git a/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs b/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs new file mode 100644 index 000000000000..af9885d96b9a --- /dev/null +++ b/src/OpenApi/src/Transformers/Implementations/OpenApiSchemaReferenceTransformer.cs @@ -0,0 +1,152 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; + +namespace Microsoft.AspNetCore.OpenApi; + +/// +/// Document transformer to support mapping duplicate JSON schema instances +/// into JSON schema references across the document. +/// +internal sealed class OpenApiSchemaReferenceTransformer : IOpenApiDocumentTransformer +{ + public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken) + { + var schemaStore = context.ApplicationServices.GetRequiredKeyedService(context.DocumentName); + var schemasByReference = schemaStore.SchemasByReference; + + document.Components ??= new OpenApiComponents(); + document.Components.Schemas ??= new Dictionary(); + + foreach (var (schema, referenceId) in schemasByReference.Where(kvp => kvp.Value is not null).OrderBy(kvp => kvp.Value)) + { + // Reference IDs are only set for schemas that appear more than once in the OpenAPI + // document and should be represented as references instead of inlined in the document. + if (referenceId is not null) + { + // Note: we create a copy of the schema here to avoid modifying the original schema + // so that comparisons between the original schema and the resolved schema during + // the transformation process are consistent. + document.Components.Schemas.Add( + referenceId, + ResolveReferenceForSchema(new OpenApiSchema(schema), schemasByReference, isTopLevel: true)); + } + } + + foreach (var pathItem in document.Paths.Values) + { + for (var i = 0; i < OpenApiConstants.OperationTypes.Length; i++) + { + var operationType = OpenApiConstants.OperationTypes[i]; + if (pathItem.Operations.TryGetValue(operationType, out var operation)) + { + if (operation.Parameters is not null) + { + foreach (var parameter in operation.Parameters) + { + parameter.Schema = ResolveReferenceForSchema(parameter.Schema, schemasByReference); + } + } + + if (operation.RequestBody is not null) + { + foreach (var content in operation.RequestBody.Content) + { + content.Value.Schema = ResolveReferenceForSchema(content.Value.Schema, schemasByReference); + } + } + + if (operation.Responses is not null) + { + foreach (var response in operation.Responses.Values) + { + if (response.Content is not null) + { + foreach (var content in response.Content) + { + content.Value.Schema = ResolveReferenceForSchema(content.Value.Schema, schemasByReference); + } + } + } + } + } + } + } + + return Task.CompletedTask; + } + + /// + /// Resolves the provided schema into a reference if it is found in the schemas-by-reference cache. + /// + /// The inline schema to replace with a reference. + /// A cache of schemas and their associated reference IDs. + /// When , will skip resolving references for the top-most schema provided. + internal static OpenApiSchema? ResolveReferenceForSchema(OpenApiSchema? schema, Dictionary schemasByReference, bool isTopLevel = false) + { + if (schema is null) + { + return schema; + } + + // If we're resolving schemas for a top-level schema being referenced in the `components.schema` property + // we don't want to replace the top-level inline schema with a reference to itself. We want to replace + // inline schemas to reference schemas for all schemas referenced in the top-level schema though (such as + // `allOf`, `oneOf`, `anyOf`, `items`, `properties`, etc.) which is why `isTopLevel` is only set once. + if (!isTopLevel && schemasByReference.TryGetValue(schema, out var referenceId) && referenceId is not null) + { + return new OpenApiSchema { Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = referenceId } }; + } + + if (schema.AllOf is not null) + { + for (var i = 0; i < schema.AllOf.Count; i++) + { + schema.AllOf[i] = ResolveReferenceForSchema(schema.AllOf[i], schemasByReference); + } + } + + if (schema.OneOf is not null) + { + for (var i = 0; i < schema.OneOf.Count; i++) + { + schema.OneOf[i] = ResolveReferenceForSchema(schema.OneOf[i], schemasByReference); + } + } + + if (schema.AnyOf is not null) + { + for (var i = 0; i < schema.AnyOf.Count; i++) + { + schema.AnyOf[i] = ResolveReferenceForSchema(schema.AnyOf[i], schemasByReference); + } + } + + if (schema.AdditionalProperties is not null) + { + schema.AdditionalProperties = ResolveReferenceForSchema(schema.AdditionalProperties, schemasByReference); + } + + if (schema.Items is not null) + { + schema.Items = ResolveReferenceForSchema(schema.Items, schemasByReference); + } + + if (schema.Properties is not null) + { + foreach (var property in schema.Properties) + { + schema.Properties[property.Key] = ResolveReferenceForSchema(property.Value, schemasByReference); + } + } + + if (schema.Not is not null) + { + schema.Not = ResolveReferenceForSchema(schema.Not, schemasByReference); + } + return schema; + } +} diff --git a/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs b/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs index e12fc41c25a0..d47f8242bc2b 100644 --- a/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs +++ b/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs @@ -24,8 +24,101 @@ public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerC } operation.Extensions.Remove(OpenApiConstants.DescriptionId); + + if (operation.Parameters is not null) + { + foreach (var parameter in operation.Parameters) + { + ScrubSchemaIdExtension(parameter.Schema); + } + } + + if (operation.RequestBody is not null) + { + foreach (var content in operation.RequestBody.Content) + { + ScrubSchemaIdExtension(content.Value.Schema); + } + } + + if (operation.Responses is not null) + { + foreach (var response in operation.Responses.Values) + { + if (response.Content is not null) + { + foreach (var content in response.Content) + { + ScrubSchemaIdExtension(content.Value.Schema); + } + } + } + } } } + + foreach (var schema in document.Components.Schemas.Values) + { + ScrubSchemaIdExtension(schema); + } + return Task.CompletedTask; } + + internal static void ScrubSchemaIdExtension(OpenApiSchema? schema) + { + if (schema is null) + { + return; + } + + if (schema.AllOf is not null) + { + for (var i = 0; i < schema.AllOf.Count; i++) + { + ScrubSchemaIdExtension(schema.AllOf[i]); + } + } + + if (schema.OneOf is not null) + { + for (var i = 0; i < schema.OneOf.Count; i++) + { + ScrubSchemaIdExtension(schema.OneOf[i]); + } + } + + if (schema.AnyOf is not null) + { + for (var i = 0; i < schema.AnyOf.Count; i++) + { + ScrubSchemaIdExtension(schema.AnyOf[i]); + } + } + + if (schema.AdditionalProperties is not null) + { + ScrubSchemaIdExtension(schema.AdditionalProperties); + } + + if (schema.Items is not null) + { + ScrubSchemaIdExtension(schema.Items); + } + + if (schema.Properties is not null) + { + foreach (var property in schema.Properties) + { + ScrubSchemaIdExtension(schema.Properties[property.Key]); + } + } + + if (schema.Not is not null) + { + ScrubSchemaIdExtension(schema.Not); + } + + schema.Extensions.Remove(OpenApiConstants.SchemaId); + } } diff --git a/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs new file mode 100644 index 000000000000..da0ea895fafe --- /dev/null +++ b/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Text; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Any; + +public class OpenApiAnyComparerTests +{ + public static object[][] Data => [ + [new OpenApiNull(), new OpenApiNull(), true], + [new OpenApiNull(), new OpenApiBoolean(true), false], + [new OpenApiByte(1), new OpenApiByte(1), true], + [new OpenApiByte(1), new OpenApiByte(2), false], + [new OpenApiBinary(Encoding.UTF8.GetBytes("test")), new OpenApiBinary(Encoding.UTF8.GetBytes("test")), true], + [new OpenApiBinary(Encoding.UTF8.GetBytes("test2")), new OpenApiBinary(Encoding.UTF8.GetBytes("test")), false], + [new OpenApiBoolean(true), new OpenApiBoolean(true), true], + [new OpenApiBoolean(true), new OpenApiBoolean(false), false], + [new OpenApiInteger(1), new OpenApiInteger(1), true], + [new OpenApiInteger(1), new OpenApiInteger(2), false], + [new OpenApiInteger(1), new OpenApiLong(1), false], + [new OpenApiLong(1), new OpenApiLong(1), true], + [new OpenApiLong(1), new OpenApiLong(2), false], + [new OpenApiFloat(1.1f), new OpenApiFloat(1.1f), true], + [new OpenApiFloat(1.1f), new OpenApiFloat(1.2f), false], + [new OpenApiDouble(1.1), new OpenApiDouble(1.1), true], + [new OpenApiDouble(1.1), new OpenApiDouble(1.2), false], + [new OpenApiString("value"), new OpenApiString("value"), true], + [new OpenApiString("value"), new OpenApiString("value2"), false], + [new OpenApiObject(), new OpenApiObject(), true], + [new OpenApiObject(), new OpenApiObject { ["key"] = new OpenApiString("value") }, false], + [new OpenApiObject { ["key"] = new OpenApiString("value") }, new OpenApiObject { ["key"] = new OpenApiString("value") }, true], + [new OpenApiObject { ["key"] = new OpenApiString("value") }, new OpenApiObject { ["key"] = new OpenApiString("value2") }, false], + [new OpenApiObject { ["key2"] = new OpenApiString("value") }, new OpenApiObject { ["key"] = new OpenApiString("value") }, false], + [new OpenApiDate(DateTime.Today), new OpenApiDate(DateTime.Today), true], + [new OpenApiDate(DateTime.Today), new OpenApiDate(DateTime.Today.AddDays(1)), false], + [new OpenApiPassword("password"), new OpenApiPassword("password"), true], + [new OpenApiPassword("password"), new OpenApiPassword("password2"), false], + [new OpenApiArray { new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value") }, true], + [new OpenApiArray { new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value2") }, false], + [new OpenApiArray { new OpenApiString("value2"), new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value"), new OpenApiString("value2") }, false], + [new OpenApiArray { new OpenApiString("value"), new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value"), new OpenApiString("value") }, true] + ]; + + [Theory] + [MemberData(nameof(Data))] + public void ProducesCorrectEqualityForOpenApiAny(IOpenApiAny any, IOpenApiAny anotherAny, bool isEqual) + => Assert.Equal(isEqual, OpenApiAnyComparer.Instance.Equals(any, anotherAny)); +} diff --git a/src/OpenApi/test/Comparers/OpenApiDiscriminatorComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiDiscriminatorComparerTests.cs new file mode 100644 index 000000000000..bb411ab5198b --- /dev/null +++ b/src/OpenApi/test/Comparers/OpenApiDiscriminatorComparerTests.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Models; + +public class OpenApiDiscriminatorComparerTests +{ + public static object[][] Data => [ + [new OpenApiDiscriminator(), new OpenApiDiscriminator(), true], + [new OpenApiDiscriminator { PropertyName = "prop" }, new OpenApiDiscriminator(), false], + [new OpenApiDiscriminator { PropertyName = "prop" }, new OpenApiDiscriminator { PropertyName = "prop" }, true], + [new OpenApiDiscriminator { PropertyName = "prop2" }, new OpenApiDiscriminator { PropertyName = "prop" }, false], + [new OpenApiDiscriminator { PropertyName = "prop", Mapping = { ["key"] = "discriminatorValue" } }, new OpenApiDiscriminator { PropertyName = "prop", Mapping = { ["key"] = "discriminatorValue" } }, true], + [new OpenApiDiscriminator { PropertyName = "prop", Mapping = { ["key"] = "discriminatorValue" } }, new OpenApiDiscriminator { PropertyName = "prop2", Mapping = { ["key"] = "discriminatorValue" } }, false], + [new OpenApiDiscriminator { PropertyName = "prop", Mapping = { ["key"] = "discriminatorValue" } }, new OpenApiDiscriminator { PropertyName = "prop", Mapping = { ["key"] = "discriminatorValue2" } }, false] + ]; + + [Theory] + [MemberData(nameof(Data))] + public void ProducesCorrectEqualityForOpenApiDiscriminator(OpenApiDiscriminator discriminator, OpenApiDiscriminator anotherDiscriminator, bool isEqual) + => Assert.Equal(isEqual, OpenApiDiscriminatorComparer.Instance.Equals(discriminator, anotherDiscriminator)); +} diff --git a/src/OpenApi/test/Comparers/OpenApiExternalDocsComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiExternalDocsComparerTests.cs new file mode 100644 index 000000000000..d2487a54ba4f --- /dev/null +++ b/src/OpenApi/test/Comparers/OpenApiExternalDocsComparerTests.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; + +public class OpenApiExternalDocsComparerTests +{ + public static object[][] Data => [ + [new OpenApiExternalDocs(), new OpenApiExternalDocs(), true], + [new OpenApiExternalDocs(), new OpenApiExternalDocs { Description = "description" }, false], + [new OpenApiExternalDocs { Description = "description" }, new OpenApiExternalDocs { Description = "description" }, true], + [new OpenApiExternalDocs { Description = "description" }, new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, false], + [new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, true], + [new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, true], + ]; + + [Theory] + [MemberData(nameof(Data))] + public void ProducesCorrectEqualityForOpenApiExternalDocs(OpenApiExternalDocs externalDocs, OpenApiExternalDocs anotherExternalDocs, bool isEqual) + => Assert.Equal(isEqual, OpenApiExternalDocsComparer.Instance.Equals(externalDocs, anotherExternalDocs)); +} diff --git a/src/OpenApi/test/Comparers/OpenApiReferenceComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiReferenceComparerTests.cs new file mode 100644 index 000000000000..baa1526f50c9 --- /dev/null +++ b/src/OpenApi/test/Comparers/OpenApiReferenceComparerTests.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Models; + +public class OpenApiReferenceComparerTests +{ + public static object[][] Data => [ + [new OpenApiReference(), new OpenApiReference(), true], + [new OpenApiReference(), new OpenApiReference { Id = "id" }, false], + [new OpenApiReference { Id = "id" }, new OpenApiReference { Id = "id" }, true], + [new OpenApiReference { Id = "id" }, new OpenApiReference { Id = "id", Type = ReferenceType.Schema }, false], + [new OpenApiReference { Id = "id", Type = ReferenceType.Schema }, new OpenApiReference { Id = "id", Type = ReferenceType.Schema }, true], + [new OpenApiReference { Id = "id", Type = ReferenceType.Schema }, new OpenApiReference { Id = "id", Type = ReferenceType.Response }, false], + [new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet.json" }, new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet.json" }, true], + [new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet.json" }, new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet2.json" }, false], + [new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet.json", HostDocument = new OpenApiDocument() }, new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet.json", HostDocument = new OpenApiDocument() }, true], + [new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet.json", HostDocument = new OpenApiDocument { Info = new() { Title = "Test" }} }, new OpenApiReference { Id = "id", Type = ReferenceType.Response, ExternalResource = "http://localhost/pet2.json", HostDocument = new OpenApiDocument() }, false] + ]; + + [Theory] + [MemberData(nameof(Data))] + public void ProducesCorrectEqualityForOpenApiReference(OpenApiReference reference, OpenApiReference anotherReference, bool isEqual) + => Assert.Equal(isEqual, OpenApiReferenceComparer.Instance.Equals(reference, anotherReference)); +} diff --git a/src/OpenApi/test/Comparers/OpenApiSchemaComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiSchemaComparerTests.cs new file mode 100644 index 000000000000..3678c4c58734 --- /dev/null +++ b/src/OpenApi/test/Comparers/OpenApiSchemaComparerTests.cs @@ -0,0 +1,307 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Interfaces; +using Microsoft.OpenApi.Models; + +public class OpenApiSchemaComparerTests +{ + public static object[][] SinglePropertyData => [ + [new OpenApiSchema { Title = "Title" }, new OpenApiSchema { Title = "Title" }, true], + [new OpenApiSchema { Title = "Title" }, new OpenApiSchema { Title = "Another Title" }, false], + [new OpenApiSchema { Type = "string" }, new OpenApiSchema { Type = "string" }, true], + [new OpenApiSchema { Type = "string" }, new OpenApiSchema { Type = "integer" }, false], + [new OpenApiSchema { Format = "int32" }, new OpenApiSchema { Format = "int32" }, true], + [new OpenApiSchema { Format = "int32" }, new OpenApiSchema { Format = "int64" }, false], + [new OpenApiSchema { Maximum = 10 }, new OpenApiSchema { Maximum = 10 }, true], + [new OpenApiSchema { Maximum = 10 }, new OpenApiSchema { Maximum = 20 }, false], + [new OpenApiSchema { Minimum = 10 }, new OpenApiSchema { Minimum = 10 }, true], + [new OpenApiSchema { Minimum = 10 }, new OpenApiSchema { Minimum = 20 }, false], + [new OpenApiSchema { ExclusiveMaximum = true }, new OpenApiSchema { ExclusiveMaximum = true }, true], + [new OpenApiSchema { ExclusiveMaximum = true }, new OpenApiSchema { ExclusiveMaximum = false }, false], + [new OpenApiSchema { ExclusiveMinimum = true }, new OpenApiSchema { ExclusiveMinimum = true }, true], + [new OpenApiSchema { ExclusiveMinimum = true }, new OpenApiSchema { ExclusiveMinimum = false }, false], + [new OpenApiSchema { MaxLength = 10 }, new OpenApiSchema { MaxLength = 10 }, true], + [new OpenApiSchema { MaxLength = 10 }, new OpenApiSchema { MaxLength = 20 }, false], + [new OpenApiSchema { MinLength = 10 }, new OpenApiSchema { MinLength = 10 }, true], + [new OpenApiSchema { MinLength = 10 }, new OpenApiSchema { MinLength = 20 }, false], + [new OpenApiSchema { Pattern = "pattern" }, new OpenApiSchema { Pattern = "pattern" }, true], + [new OpenApiSchema { Pattern = "pattern" }, new OpenApiSchema { Pattern = "another pattern" }, false], + [new OpenApiSchema { MaxItems = 10 }, new OpenApiSchema { MaxItems = 10 }, true], + [new OpenApiSchema { MaxItems = 10 }, new OpenApiSchema { MaxItems = 20 }, false], + [new OpenApiSchema { MinItems = 10 }, new OpenApiSchema { MinItems = 10 }, true], + [new OpenApiSchema { MinItems = 10 }, new OpenApiSchema { MinItems = 20 }, false], + [new OpenApiSchema { UniqueItems = true }, new OpenApiSchema { UniqueItems = true }, true], + [new OpenApiSchema { UniqueItems = true }, new OpenApiSchema { UniqueItems = false }, false], + [new OpenApiSchema { MaxProperties = 10 }, new OpenApiSchema { MaxProperties = 10 }, true], + [new OpenApiSchema { MaxProperties = 10 }, new OpenApiSchema { MaxProperties = 20 }, false], + [new OpenApiSchema { MinProperties = 10 }, new OpenApiSchema { MinProperties = 10 }, true], + [new OpenApiSchema { MinProperties = 10 }, new OpenApiSchema { MinProperties = 20 }, false], + [new OpenApiSchema { Required = new HashSet() { "required" } }, new OpenApiSchema { Required = new HashSet { "required" } }, true], + [new OpenApiSchema { Required = new HashSet() { "name", "age" } }, new OpenApiSchema { Required = new HashSet { "age", "name" } }, true], + [new OpenApiSchema { Required = new HashSet() { "required" } }, new OpenApiSchema { Required = new HashSet { "another required" } }, false], + [new OpenApiSchema { Enum = [new OpenApiString("value")] }, new OpenApiSchema { Enum = [new OpenApiString("value")] }, true], + [new OpenApiSchema { Enum = [new OpenApiString("value")] }, new OpenApiSchema { Enum = [new OpenApiString("value2" )] }, false], + [new OpenApiSchema { Enum = [new OpenApiString("value"), new OpenApiString("value2")] }, new OpenApiSchema { Enum = [new OpenApiString("value2" ), new OpenApiString("value" )] }, false], + [new OpenApiSchema { Items = new OpenApiSchema { Type = "string" } }, new OpenApiSchema { Items = new OpenApiSchema { Type = "string" } }, true], + [new OpenApiSchema { Items = new OpenApiSchema { Type = "string" } }, new OpenApiSchema { Items = new OpenApiSchema { Type = "integer" } }, false], + [new OpenApiSchema { Properties = new Dictionary { ["name"] = new OpenApiSchema { Type = "string" } } }, new OpenApiSchema { Properties = new Dictionary { ["name"] = new OpenApiSchema { Type = "string" } } }, true], + [new OpenApiSchema { Properties = new Dictionary { ["name"] = new OpenApiSchema { Type = "string" } } }, new OpenApiSchema { Properties = new Dictionary { ["name"] = new OpenApiSchema { Type = "integer" } } }, false], + [new OpenApiSchema { AdditionalProperties = new OpenApiSchema { Type = "string" } }, new OpenApiSchema { AdditionalProperties = new OpenApiSchema { Type = "string" } }, true], + [new OpenApiSchema { AdditionalProperties = new OpenApiSchema { Type = "string" } }, new OpenApiSchema { AdditionalProperties = new OpenApiSchema { Type = "integer" } }, false], + [new OpenApiSchema { Description = "Description" }, new OpenApiSchema { Description = "Description" }, true], + [new OpenApiSchema { Description = "Description" }, new OpenApiSchema { Description = "Another Description" }, false], + [new OpenApiSchema { Deprecated = true }, new OpenApiSchema { Deprecated = true }, true], + [new OpenApiSchema { Deprecated = true }, new OpenApiSchema { Deprecated = false }, false], + [new OpenApiSchema { ExternalDocs = new OpenApiExternalDocs { Description = "Description" } }, new OpenApiSchema { ExternalDocs = new OpenApiExternalDocs { Description = "Description" } }, true], + [new OpenApiSchema { ExternalDocs = new OpenApiExternalDocs { Description = "Description" } }, new OpenApiSchema { ExternalDocs = new OpenApiExternalDocs { Description = "Another Description" } }, false], + [new OpenApiSchema { UnresolvedReference = true }, new OpenApiSchema { UnresolvedReference = true }, true], + [new OpenApiSchema { UnresolvedReference = true }, new OpenApiSchema { UnresolvedReference = false }, false], + [new OpenApiSchema { Reference = new OpenApiReference { Id = "Id", Type = ReferenceType.Schema } }, new OpenApiSchema { Reference = new OpenApiReference { Id = "Id", Type = ReferenceType.Schema } }, true], + [new OpenApiSchema { Reference = new OpenApiReference { Id = "Id", Type = ReferenceType.Schema } }, new OpenApiSchema { Reference = new OpenApiReference { Id = "Another Id", Type = ReferenceType.Schema } }, false], + [new OpenApiSchema { Extensions = new Dictionary { ["key"] = new OpenApiString("value") } }, new OpenApiSchema { Extensions = new Dictionary { ["key"] = new OpenApiString("value") } }, true], + [new OpenApiSchema { Extensions = new Dictionary { ["key"] = new OpenApiString("value") } }, new OpenApiSchema { Extensions = new Dictionary { ["key"] = new OpenApiString("another value") } }, false], + [new OpenApiSchema { Extensions = new Dictionary { ["key"] = new OpenApiString("value") } }, new OpenApiSchema { Extensions = new Dictionary { ["key2"] = new OpenApiString("value") } }, false], + [new OpenApiSchema { Xml = new OpenApiXml { Name = "Name" } }, new OpenApiSchema { Xml = new OpenApiXml { Name = "Name" } }, true], + [new OpenApiSchema { Xml = new OpenApiXml { Name = "Name" } }, new OpenApiSchema { Xml = new OpenApiXml { Name = "Another Name" } }, false], + [new OpenApiSchema { Nullable = true }, new OpenApiSchema { Nullable = true }, true], + [new OpenApiSchema { Nullable = true }, new OpenApiSchema { Nullable = false }, false], + [new OpenApiSchema { ReadOnly = true }, new OpenApiSchema { ReadOnly = true }, true], + [new OpenApiSchema { ReadOnly = true }, new OpenApiSchema { ReadOnly = false }, false], + [new OpenApiSchema { WriteOnly = true }, new OpenApiSchema { WriteOnly = true }, true], + [new OpenApiSchema { WriteOnly = true }, new OpenApiSchema { WriteOnly = false }, false], + [new OpenApiSchema { Discriminator = new OpenApiDiscriminator { PropertyName = "PropertyName" } }, new OpenApiSchema { Discriminator = new OpenApiDiscriminator { PropertyName = "PropertyName" } }, true], + [new OpenApiSchema { Discriminator = new OpenApiDiscriminator { PropertyName = "PropertyName" } }, new OpenApiSchema { Discriminator = new OpenApiDiscriminator { PropertyName = "AnotherPropertyName" } }, false], + [new OpenApiSchema { Example = new OpenApiString("example") }, new OpenApiSchema { Example = new OpenApiString("example") }, true], + [new OpenApiSchema { Example = new OpenApiString("example") }, new OpenApiSchema { Example = new OpenApiString("another example") }, false], + [new OpenApiSchema { Example = new OpenApiInteger(2) }, new OpenApiSchema { Example = new OpenApiString("another example") }, false], + [new OpenApiSchema { AdditionalPropertiesAllowed = true }, new OpenApiSchema { AdditionalPropertiesAllowed = true }, true], + [new OpenApiSchema { AdditionalPropertiesAllowed = true }, new OpenApiSchema { AdditionalPropertiesAllowed = false }, false], + [new OpenApiSchema { Not = new OpenApiSchema { Type = "string" } }, new OpenApiSchema { Not = new OpenApiSchema { Type = "string" } }, true], + [new OpenApiSchema { Not = new OpenApiSchema { Type = "string" } }, new OpenApiSchema { Not = new OpenApiSchema { Type = "integer" } }, false], + [new OpenApiSchema { AnyOf = [new OpenApiSchema { Type = "string" }] }, new OpenApiSchema { AnyOf = [new OpenApiSchema { Type = "string" }] }, true], + [new OpenApiSchema { AnyOf = [new OpenApiSchema { Type = "string" }] }, new OpenApiSchema { AnyOf = [new OpenApiSchema { Type = "integer" }] }, false], + [new OpenApiSchema { AllOf = [new OpenApiSchema { Type = "string" }] }, new OpenApiSchema { AllOf = [new OpenApiSchema { Type = "string" }] }, true], + [new OpenApiSchema { AllOf = [new OpenApiSchema { Type = "string" }] }, new OpenApiSchema { AllOf = [new OpenApiSchema { Type = "integer" }] }, false], + [new OpenApiSchema { OneOf = [new OpenApiSchema { Type = "string" }] }, new OpenApiSchema { OneOf = [new OpenApiSchema { Type = "string" }] }, true], + [new OpenApiSchema { OneOf = [new OpenApiSchema { Type = "string" }] }, new OpenApiSchema { OneOf = [new OpenApiSchema { Type = "integer" }] }, false], + [new OpenApiSchema { MultipleOf = 10 }, new OpenApiSchema { MultipleOf = 10 }, true], + [new OpenApiSchema { MultipleOf = 10 }, new OpenApiSchema { MultipleOf = 20 }, false], + [new OpenApiSchema { Default = new OpenApiString("default") }, new OpenApiSchema { Default = new OpenApiString("default") }, true], + [new OpenApiSchema { Default = new OpenApiString("default") }, new OpenApiSchema { Default = new OpenApiString("another default") }, false], + ]; + + [Theory] + [MemberData(nameof(SinglePropertyData))] + public void ProducesCorrectEqualityForOpenApiSchema(OpenApiSchema schema, OpenApiSchema anotherSchema, bool isEqual) + => Assert.Equal(isEqual, OpenApiSchemaComparer.Instance.Equals(schema, anotherSchema)); + + [Fact] + public void ValidatePropertiesOnOpenApiSchema() + { + var propertyNames = typeof(OpenApiSchema).GetProperties().Select(property => property.Name).ToList(); + var originalSchema = new OpenApiSchema + { + AdditionalProperties = new OpenApiSchema(), + AdditionalPropertiesAllowed = true, + AllOf = [new OpenApiSchema()], + AnyOf = [new OpenApiSchema()], + Deprecated = true, + Default = new OpenApiString("default"), + Description = "description", + Discriminator = new OpenApiDiscriminator(), + Example = new OpenApiString("example"), + ExclusiveMaximum = true, + ExclusiveMinimum = true, + Extensions = new Dictionary + { + ["key"] = new OpenApiString("value") + }, + ExternalDocs = new OpenApiExternalDocs(), + Enum = [new OpenApiString("test")], + Format = "object", + Items = new OpenApiSchema(), + Maximum = 10, + MaxItems = 10, + MaxLength = 10, + MaxProperties = 10, + Minimum = 10, + MinItems = 10, + MinLength = 10, + MinProperties = 10, + MultipleOf = 10, + OneOf = [new OpenApiSchema()], + Not = new OpenApiSchema(), + Nullable = false, + Pattern = "pattern", + Properties = new Dictionary { ["name"] = new OpenApiSchema() }, + ReadOnly = true, + Required = new HashSet { "required" }, + Reference = new OpenApiReference { Id = "Id", Type = ReferenceType.Schema }, + UniqueItems = false, + UnresolvedReference = true, + WriteOnly = true, + Xml = new OpenApiXml { Name = "Name" }, + }; + + OpenApiSchema modifiedSchema = new(originalSchema) { AdditionalProperties = new OpenApiSchema { Type = "string" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.AdditionalProperties))); + + modifiedSchema = new(originalSchema) { AdditionalPropertiesAllowed = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.AdditionalPropertiesAllowed))); + + modifiedSchema = new(originalSchema) { AllOf = [new OpenApiSchema { Type = "string" }] }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.AllOf))); + + modifiedSchema = new(originalSchema) { AnyOf = [new OpenApiSchema { Type = "string" }] }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.AnyOf))); + + modifiedSchema = new(originalSchema) { Deprecated = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Deprecated))); + + modifiedSchema = new(originalSchema) { Default = new OpenApiString("another default") }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Default))); + + modifiedSchema = new(originalSchema) { Description = "another description" }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Description))); + + modifiedSchema = new(originalSchema) { Discriminator = new OpenApiDiscriminator { PropertyName = "PropertyName" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Discriminator))); + + modifiedSchema = new(originalSchema) { Example = new OpenApiString("another example") }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Example))); + + modifiedSchema = new(originalSchema) { ExclusiveMaximum = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.ExclusiveMaximum))); + + modifiedSchema = new(originalSchema) { ExclusiveMinimum = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.ExclusiveMinimum))); + + modifiedSchema = new(originalSchema) { Extensions = new Dictionary { ["key"] = new OpenApiString("another value") } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Extensions))); + + modifiedSchema = new(originalSchema) { ExternalDocs = new OpenApiExternalDocs { Description = "another description" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.ExternalDocs))); + + modifiedSchema = new(originalSchema) { Enum = [new OpenApiString("another test")] }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Enum))); + + modifiedSchema = new(originalSchema) { Format = "string" }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Format))); + + modifiedSchema = new(originalSchema) { Items = new OpenApiSchema { Type = "string" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Items))); + + modifiedSchema = new(originalSchema) { Maximum = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Maximum))); + + modifiedSchema = new(originalSchema) { MaxItems = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MaxItems))); + + modifiedSchema = new(originalSchema) { MaxLength = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MaxLength))); + + modifiedSchema = new(originalSchema) { MaxProperties = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MaxProperties))); + + modifiedSchema = new(originalSchema) { Minimum = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Minimum))); + + modifiedSchema = new(originalSchema) { MinItems = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MinItems))); + + modifiedSchema = new(originalSchema) { MinLength = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MinLength))); + + modifiedSchema = new(originalSchema) { MinProperties = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MinProperties))); + + modifiedSchema = new(originalSchema) { MultipleOf = 20 }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.MultipleOf))); + + modifiedSchema = new(originalSchema) { OneOf = [new OpenApiSchema { Type = "string" }] }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.OneOf))); + + modifiedSchema = new(originalSchema) { Not = new OpenApiSchema { Type = "string" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Not))); + + modifiedSchema = new(originalSchema) { Nullable = true }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Nullable))); + + modifiedSchema = new(originalSchema) { Pattern = "another pattern" }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Pattern))); + + modifiedSchema = new(originalSchema) { Properties = new Dictionary { ["name"] = new OpenApiSchema { Type = "integer" } } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Properties))); + + modifiedSchema = new(originalSchema) { ReadOnly = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.ReadOnly))); + + modifiedSchema = new(originalSchema) { Required = new HashSet { "another required" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Required))); + + modifiedSchema = new(originalSchema) { Reference = new OpenApiReference { Id = "Another Id", Type = ReferenceType.Schema } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Reference))); + + modifiedSchema = new(originalSchema) { Title = "Another Title" }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Title))); + + modifiedSchema = new(originalSchema) { Type = "integer" }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Type))); + + modifiedSchema = new(originalSchema) { UniqueItems = true }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.UniqueItems))); + + modifiedSchema = new(originalSchema) { UnresolvedReference = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.UnresolvedReference))); + + modifiedSchema = new(originalSchema) { WriteOnly = false }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.WriteOnly))); + + modifiedSchema = new(originalSchema) { Xml = new OpenApiXml { Name = "Another Name" } }; + Assert.False(OpenApiSchemaComparer.Instance.Equals(originalSchema, modifiedSchema)); + Assert.True(propertyNames.Remove(nameof(OpenApiSchema.Xml))); + + Assert.Empty(propertyNames); + } +} diff --git a/src/OpenApi/test/Comparers/OpenApiXmlComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiXmlComparerTests.cs new file mode 100644 index 000000000000..49b116efb0f0 --- /dev/null +++ b/src/OpenApi/test/Comparers/OpenApiXmlComparerTests.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Models; + +public class OpenApiXmlComparerTests +{ + public static object[][] Data => [ + [new OpenApiXml(), new OpenApiXml(), true], + [new OpenApiXml(), new OpenApiXml { Name = "name" }, false], + [new OpenApiXml { Name = "name" }, new OpenApiXml { Name = "name" }, true], + [new OpenApiXml { Name = "name" }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, false], + [new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, true], + [new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace2") }, false], + [new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix" }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix" }, true], + [new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix" }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix2" }, false] + ]; + + [Theory] + [MemberData(nameof(Data))] + public void ProducesCorrectEqualityForOpenApiXml(OpenApiXml xml, OpenApiXml anotherXml, bool isEqual) + => Assert.Equal(isEqual, OpenApiXmlComparer.Instance.Equals(xml, anotherXml)); +} diff --git a/src/OpenApi/test/Extensions/JsonTypeInfoExtensionsTests.cs b/src/OpenApi/test/Extensions/JsonTypeInfoExtensionsTests.cs new file mode 100644 index 000000000000..1095798e7c97 --- /dev/null +++ b/src/OpenApi/test/Extensions/JsonTypeInfoExtensionsTests.cs @@ -0,0 +1,70 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO.Pipelines; +using System.Text.Json; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.OpenApi; + +public class JsonTypeInfoExtensionsTests +{ + private delegate void TestDelegate(int x, int y); + + private class Container + { + internal delegate void ContainedTestDelegate(int x, int y); + } + + /// + /// This data is used to test the method + /// which is used to generate reference IDs for OpenAPI schemas in the OpenAPI document. + /// + /// Some things of note: + /// - For generic types, we generate the reference ID by appending the type arguments to the type name. + /// Our implementation currently supports versions of OpenAPI up to v3.0 which do not include support for + /// generic types in schemas. This means that generic types must be resolved to their concrete types before + /// being encoded in teh OpenAPI document. + /// - Array-like types (List, IEnumerable, etc.) are represented as "ArrayOf" followed by the type name of the + /// element type. + /// - Dictionary-list types are represented as "DictionaryOf" followed by the key type and the value type. + /// - Supported primitive types are mapped to their corresponding names (string, char, Uri, etc.). + /// + /// + public static IEnumerable GetSchemaReferenceId_Data => + [ + [typeof(Todo), "Todo"], + [typeof(IEnumerable), "ArrayOfTodo"], + [typeof(List), "ArrayOfTodo"], + [typeof(TodoWithDueDate), "TodoWithDueDate"], + [typeof(IEnumerable), "ArrayOfTodoWithDueDate"], + [(new { Id = 1 }).GetType(), "AnonymousTypeOfint"], + [(new { Id = 1, Name = "Todo" }).GetType(), "AnonymousTypeOfintAndstring"], + [typeof(IFormFile), "IFormFile"], + [typeof(IFormFileCollection), "IFormFileCollection"], + [typeof(Stream), "Stream"], + [typeof(PipeReader), "PipeReader"], + [typeof(Results, Ok>), "ResultsOfOkOfTodoWithDueDateAndOkOfTodo"], + [typeof(Ok), "OkOfTodo"], + [typeof(NotFound), "NotFoundOfTodoWithDueDate"], + [typeof(TestDelegate), "TestDelegate"], + [typeof(Container.ContainedTestDelegate), "ContainedTestDelegate"], + [typeof(List), "ArrayOfint"], + [typeof(List>), "ArrayOfArrayOfint"], + [typeof(int[]), "ArrayOfint"], + [typeof(ValidationProblemDetails), "ValidationProblemDetails"], + [typeof(ProblemDetails), "ProblemDetails"], + [typeof(Dictionary), "DictionaryOfstringAndArrayOfstring"], + [typeof(Dictionary>), "DictionaryOfstringAndArrayOfArrayOfstring"], + [typeof(Dictionary>), "DictionaryOfstringAndArrayOfArrayOfstring"], + ]; + + [Theory] + [MemberData(nameof(GetSchemaReferenceId_Data))] + public void GetSchemaReferenceId_Works(Type type, string referenceId) + { + var jsonTypeInfo = JsonSerializerOptions.Default.GetTypeInfo(type); + Assert.Equal(referenceId, jsonTypeInfo.GetSchemaReferenceId()); + } +} diff --git a/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs b/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs index 5ae4b64d9215..def8474834f9 100644 --- a/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs +++ b/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs @@ -14,8 +14,10 @@ public sealed class OpenApiDocumentIntegrationTests(SampleAppFixture fixture) : [Theory] [InlineData("v1")] [InlineData("v2")] + [InlineData("controllers")] [InlineData("responses")] [InlineData("forms")] + [InlineData("schemas-by-ref")] public async Task VerifyOpenApiDocument(string documentName) { var documentService = fixture.Services.GetRequiredKeyedService(documentName); diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt new file mode 100644 index 000000000000..1381536d4b71 --- /dev/null +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt @@ -0,0 +1,111 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Sample | controllers", + "version": "1.0.0" + }, + "paths": { + "/getbyidandname/{id}/{name}": { + "get": { + "tags": [ + "Test" + ], + "parameters": [ + { + "name": "Id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/string2" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/string" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/string" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/string" + } + } + } + } + } + } + }, + "/forms": { + "post": { + "tags": [ + "Test" + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "Title": { + "$ref": "#/components/schemas/string2" + }, + "Description": { + "$ref": "#/components/schemas/string2" + }, + "IsCompleted": { + "type": "boolean" + } + } + }, + "encoding": { + "application/x-www-form-urlencoded": { + "style": "form", + "explode": true + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + } + }, + "components": { + "schemas": { + "string": { + "type": "string" + }, + "string2": { + "minLength": 5, + "type": "string" + } + } + }, + "tags": [ + { + "name": "Test" + } + ] +} \ No newline at end of file diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt index c21b849f0204..a82a5f4d0237 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt @@ -17,8 +17,7 @@ "type": "object", "properties": { "resume": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/IFormFile" } } }, @@ -51,11 +50,7 @@ "type": "object", "properties": { "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } + "$ref": "#/components/schemas/IFormFileCollection" } } }, @@ -91,8 +86,7 @@ "type": "object", "properties": { "resume": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/IFormFile" } } }, @@ -100,11 +94,7 @@ "type": "object", "properties": { "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } + "$ref": "#/components/schemas/IFormFileCollection" } } } @@ -136,29 +126,7 @@ "content": { "multipart/form-data": { "schema": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" }, "encoding": { "multipart/form-data": { @@ -169,29 +137,7 @@ }, "application/x-www-form-urlencoded": { "schema": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" }, "encoding": { "application/x-www-form-urlencoded": { @@ -222,36 +168,13 @@ "type": "object", "allOf": [ { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" }, { "type": "object", "properties": { "file": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/IFormFile" } } } @@ -273,92 +196,54 @@ } } } - }, - "/getbyidandname/{id}/{name}": { - "get": { - "tags": [ - "Test" - ], - "parameters": [ - { - "name": "Id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Name", - "in": "path", - "required": true, - "schema": { - "minLength": 5, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } + } + }, + "components": { + "schemas": { + "boolean": { + "type": "boolean" + }, + "DateTime": { + "type": "string", + "format": "date-time" + }, + "IFormFile": { + "type": "string", + "format": "binary" + }, + "IFormFileCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IFormFile" } - } - }, - "/forms": { - "post": { - "tags": [ - "Test" + }, + "int": { + "type": "integer", + "format": "int32" + }, + "string": { + "type": "string" + }, + "Todo": { + "required": [ + "id", + "title", + "completed", + "createdAt" ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "Title": { - "minLength": 5, - "type": "string" - }, - "Description": { - "minLength": 5, - "type": "string" - }, - "IsCompleted": { - "type": "boolean" - } - } - }, - "encoding": { - "application/x-www-form-urlencoded": { - "style": "form", - "explode": true - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/int" + }, + "title": { + "$ref": "#/components/schemas/string" + }, + "completed": { + "$ref": "#/components/schemas/boolean" + }, + "createdAt": { + "$ref": "#/components/schemas/DateTime" } } } @@ -367,9 +252,6 @@ "tags": [ { "name": "Sample" - }, - { - "name": "Test" } ] } \ No newline at end of file diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt index d09854500b2c..b829606d7471 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt @@ -16,56 +16,12 @@ "content": { "application/json": { "schema": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" } }, "text/xml": { "schema": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" } } } @@ -84,29 +40,7 @@ "content": { "text/xml": { "schema": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" } } } @@ -174,92 +108,44 @@ } } } - }, - "/getbyidandname/{id}/{name}": { - "get": { - "tags": [ - "Test" + } + }, + "components": { + "schemas": { + "boolean": { + "type": "boolean" + }, + "DateTime": { + "type": "string", + "format": "date-time" + }, + "int": { + "type": "integer", + "format": "int32" + }, + "string": { + "type": "string" + }, + "Todo": { + "required": [ + "id", + "title", + "completed", + "createdAt" ], - "parameters": [ - { - "name": "Id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/int" }, - { - "name": "Name", - "in": "path", - "required": true, - "schema": { - "minLength": 5, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/forms": { - "post": { - "tags": [ - "Test" - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "Title": { - "minLength": 5, - "type": "string" - }, - "Description": { - "minLength": 5, - "type": "string" - }, - "IsCompleted": { - "type": "boolean" - } - } - }, - "encoding": { - "application/x-www-form-urlencoded": { - "style": "form", - "explode": true - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" + "title": { + "$ref": "#/components/schemas/string" + }, + "completed": { + "$ref": "#/components/schemas/boolean" + }, + "createdAt": { + "$ref": "#/components/schemas/DateTime" } } } @@ -268,9 +154,6 @@ "tags": [ { "name": "Sample" - }, - { - "name": "Test" } ] } \ No newline at end of file diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt new file mode 100644 index 000000000000..f85c1f035a70 --- /dev/null +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt @@ -0,0 +1,348 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Sample | schemas-by-ref", + "version": "1.0.0" + }, + "paths": { + "/schemas-by-ref/typed-results": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + } + } + } + }, + "/schemas-by-ref/multiple-results": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/string" + } + } + } + } + } + } + }, + "/schemas-by-ref/iresult-no-produces": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/iresult-with-produces": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/xml": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + } + } + } + }, + "/schemas-by-ref/primitives": { + "get": { + "tags": [ + "Sample" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "description": "The ID associated with the Todo item.", + "format": "int32" + } + }, + { + "name": "size", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "description": "The number of Todos to fetch", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/product": { + "get": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } + }, + "/schemas-by-ref/account": { + "get": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + } + } + } + } + }, + "/schemas-by-ref/array-of-ints": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArrayOfint" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/int" + } + } + } + } + } + } + }, + "/schemas-by-ref/list-of-ints": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArrayOfint" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/int" + } + } + } + } + } + } + }, + "/schemas-by-ref/ienumerable-of-ints": { + "post": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/int" + } + } + } + } + } + } + }, + "/schemas-by-ref/dictionary-of-ints": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DictionaryOfstringAndint" + } + } + } + } + } + } + }, + "/schemas-by-ref/frozen-dictionary-of-ints": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DictionaryOfstringAndint" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Account": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/int" + }, + "name": { + "$ref": "#/components/schemas/string" + } + } + }, + "ArrayOfint": { + "type": "array", + "items": { + "$ref": "#/components/schemas/int" + } + }, + "DictionaryOfstringAndint": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/int" + } + }, + "int": { + "type": "integer", + "format": "int32" + }, + "Product": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/int" + }, + "name": { + "$ref": "#/components/schemas/string" + } + } + }, + "string": { + "type": "string" + }, + "Triangle": { + "type": "object" + } + } + }, + "tags": [ + { + "name": "Sample" + } + ] +} \ No newline at end of file diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt index 4004980ec53d..17594e92aecc 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt @@ -16,11 +16,7 @@ "in": "query", "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "$ref": "#/components/schemas/ArrayOfGuid" } }, { @@ -38,11 +34,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "$ref": "#/components/schemas/ArrayOfGuid" } } } @@ -79,18 +71,16 @@ "type": "object", "properties": { "id": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/int" }, "title": { - "type": "string" + "$ref": "#/components/schemas/string" }, "completed": { - "type": "boolean" + "$ref": "#/components/schemas/boolean" }, "createdAt": { - "type": "string", - "format": "date-time" + "$ref": "#/components/schemas/DateTime" } } } @@ -117,8 +107,7 @@ "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/int" } }, { @@ -146,22 +135,19 @@ "type": "object", "properties": { "dueDate": { - "type": "string", - "format": "date-time" + "$ref": "#/components/schemas/DateTime" }, "id": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/int" }, "title": { - "type": "string" + "$ref": "#/components/schemas/string" }, "completed": { - "type": "boolean" + "$ref": "#/components/schemas/boolean" }, "createdAt": { - "type": "string", - "format": "date-time" + "$ref": "#/components/schemas/DateTime" } } } @@ -170,116 +156,35 @@ } } } - }, - "/getbyidandname/{id}/{name}": { - "get": { - "tags": [ - "Test" - ], - "parameters": [ - { - "name": "Id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Name", - "in": "path", - "required": true, - "schema": { - "minLength": 5, - "type": "string" - } - }, - { - "name": "X-Version", - "in": "header", - "schema": { - "type": "string", - "default": "1.0" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/forms": { - "post": { - "tags": [ - "Test" - ], - "parameters": [ - { - "name": "X-Version", - "in": "header", - "schema": { - "type": "string", - "default": "1.0" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "Title": { - "minLength": 5, - "type": "string" - }, - "Description": { - "minLength": 5, - "type": "string" - }, - "IsCompleted": { - "type": "boolean" - } - } - }, - "encoding": { - "application/x-www-form-urlencoded": { - "style": "form", - "explode": true - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } } }, "components": { + "schemas": { + "ArrayOfGuid": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Guid" + } + }, + "boolean": { + "type": "boolean" + }, + "DateTime": { + "type": "string", + "format": "date-time" + }, + "Guid": { + "type": "string", + "format": "uuid" + }, + "int": { + "type": "integer", + "format": "int32" + }, + "string": { + "type": "string" + } + }, "securitySchemes": { "Bearer": { "type": "http", @@ -291,9 +196,6 @@ "tags": [ { "name": "Sample" - }, - { - "name": "Test" } ] } \ No newline at end of file diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt index 3ae26ab06892..62cb111a0e15 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt @@ -43,106 +43,15 @@ } } } - }, - "/getbyidandname/{id}/{name}": { - "get": { - "tags": [ - "Test" - ], - "parameters": [ - { - "name": "Id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Name", - "in": "path", - "required": true, - "schema": { - "minLength": 5, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/forms": { - "post": { - "tags": [ - "Test" - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "Title": { - "minLength": 5, - "type": "string" - }, - "Description": { - "minLength": 5, - "type": "string" - }, - "IsCompleted": { - "type": "boolean" - } - } - }, - "encoding": { - "application/x-www-form-urlencoded": { - "style": "form", - "explode": true - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } } }, + "components": { }, "tags": [ { "name": "users" }, { "name": "Sample" - }, - { - "name": "Test" } ] } \ No newline at end of file diff --git a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs index ad6d01ae8a79..7ebd6039bc2e 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs @@ -195,7 +195,7 @@ await VerifyOpenApiDocument(builder, document => { Assert.NotNull(allOfItem.Properties); Assert.Contains("formFile1", allOfItem.Properties); - var formFile1Property = allOfItem.Properties["formFile1"]; + var formFile1Property = allOfItem.Properties["formFile1"].GetEffective(document); Assert.Equal("string", formFile1Property.Type); Assert.Equal("binary", formFile1Property.Format); }, @@ -203,7 +203,7 @@ await VerifyOpenApiDocument(builder, document => { Assert.NotNull(allOfItem.Properties); Assert.Contains("formFile2", allOfItem.Properties); - var formFile2Property = allOfItem.Properties["formFile2"]; + var formFile2Property = allOfItem.Properties["formFile2"].GetEffective(document); Assert.Equal("string", formFile2Property.Type); Assert.Equal("binary", formFile2Property.Format); }); @@ -536,12 +536,12 @@ await VerifyOpenApiDocument(builder, document => Assert.Collection(allOfItem.Properties, property => { Assert.Equal("id", property.Key); - Assert.Equal("integer", property.Value.Type); + Assert.Equal("integer", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("title", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { @@ -561,12 +561,12 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("code", property.Key); - Assert.Equal("integer", property.Value.Type); + Assert.Equal("integer", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("message", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }); }); } @@ -601,12 +601,12 @@ await VerifyOpenApiDocument(action, document => Assert.Collection(allOfItem.Properties, property => { Assert.Equal("Id", property.Key); - Assert.Equal("integer", property.Value.Type); + Assert.Equal("integer", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("Title", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { @@ -626,12 +626,12 @@ await VerifyOpenApiDocument(action, document => property => { Assert.Equal("Code", property.Key); - Assert.Equal("integer", property.Value.Type); + Assert.Equal("integer", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("Message", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }); }); } @@ -701,18 +701,18 @@ await VerifyOpenApiDocument(action, document => property => { Assert.Equal("Name", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("Description", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("Resume", property.Key); - Assert.Equal("string", property.Value.Type); - Assert.Equal("binary", property.Value.Format); + Assert.Equal("string", property.Value.GetEffective(document).Type); + Assert.Equal("binary", property.Value.GetEffective(document).Format); }); }); } @@ -744,12 +744,12 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("name", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("description", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { @@ -1005,8 +1005,8 @@ await VerifyOpenApiDocument(builder, document => var content = Assert.Single(operation.RequestBody.Content); Assert.Equal("application/octet-stream", content.Key); Assert.NotNull(content.Value.Schema); - Assert.Equal("string", content.Value.Schema.Type); - Assert.Equal("binary", content.Value.Schema.Format); + Assert.Equal("string", content.Value.Schema.GetEffective(document).Type); + Assert.Equal("binary", content.Value.Schema.GetEffective(document).Format); } }); } diff --git a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs index cbbda42c57cf..af2d994fe972 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs @@ -264,14 +264,16 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(defaultResponse); Assert.Empty(defaultResponse.Description); var defaultContent = Assert.Single(defaultResponse.Content.Values); - Assert.Collection(defaultContent.Schema.Properties, property => + Assert.Collection(defaultContent.Schema.Properties, + property => { Assert.Equal("code", property.Key); - Assert.Equal("integer", property.Value.Type); - }, property => + Assert.Equal("integer", property.Value.GetEffective(document).Type); + }, + property => { Assert.Equal("message", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }); // Generates the 200 status code response with the `Todo` response type. var okResponse = operation.Responses["200"]; @@ -284,11 +286,11 @@ await VerifyOpenApiDocument(builder, document => Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); - Assert.Equal("integer", property.Value.Type); + Assert.Equal("integer", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("title", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("completed", property.Key); diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs index 624a71d77cfc..5677ea5c8cb2 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs @@ -174,8 +174,10 @@ await VerifyOpenApiDocument(builder, document => var operation = document.Paths[$"/{path}"].Operations[OperationType.Post]; var requestBody = operation.RequestBody; - Assert.Equal("string", requestBody.Content["application/octet-stream"].Schema.Type); - Assert.Equal("binary", requestBody.Content["application/octet-stream"].Schema.Format); + var effectiveSchema = requestBody.Content["application/octet-stream"].Schema; + + Assert.Equal("string", effectiveSchema.Type); + Assert.Equal("binary", effectiveSchema.Format); } }); } @@ -230,18 +232,22 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(arrayTodo.RequestBody); var parameter = Assert.Single(arrayParsable.Parameters); + var enumerableTodoSchema = enumerableTodo.RequestBody.Content["application/json"].Schema; + var arrayTodoSchema = arrayTodo.RequestBody.Content["application/json"].Schema; + // Assert that both IEnumerable and Todo[] map to the same schemas + Assert.Equal(enumerableTodoSchema.Reference.Id, arrayTodoSchema.Reference.Id); // Assert all types materialize as arrays - Assert.Equal("array", enumerableTodo.RequestBody.Content["application/json"].Schema.Type); - Assert.Equal("array", arrayTodo.RequestBody.Content["application/json"].Schema.Type); + Assert.Equal("array", enumerableTodoSchema.GetEffective(document).Type); + Assert.Equal("array", arrayTodoSchema.GetEffective(document).Type); Assert.Equal("array", parameter.Schema.Type); Assert.Equal("string", parameter.Schema.Items.Type); Assert.Equal("uuid", parameter.Schema.Items.Format); // Assert the array items are the same as the Todo schema - foreach (var element in new[] { enumerableTodo, arrayTodo }) + foreach (var element in new[] { enumerableTodoSchema, arrayTodoSchema }) { - Assert.Collection(element.RequestBody.Content["application/json"].Schema.Items.Properties, + Assert.Collection(element.GetEffective(document).Items.GetEffective(document).Properties, property => { Assert.Equal("id", property.Key); diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs index d1deebba81ec..33ef322a2b8a 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs @@ -225,8 +225,11 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("dueDate", property.Key); - Assert.Equal("string", property.Value.Type); - Assert.Equal("date-time", property.Value.Format); + // DateTime schema appears twice in the document so we expect + // this to map to a reference ID. + var dateTimeSchema = property.Value.GetEffective(document); + Assert.Equal("string", dateTimeSchema.Type); + Assert.Equal("date-time", dateTimeSchema.Format); }, property => { @@ -247,8 +250,11 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("createdAt", property.Key); - Assert.Equal("string", property.Value.Type); - Assert.Equal("date-time", property.Value.Format); + // DateTime schema appears twice in the document so we expect + // this to map to a reference ID. + var dateTimeSchema = property.Value.GetEffective(document); + Assert.Equal("string", dateTimeSchema.Type); + Assert.Equal("date-time", dateTimeSchema.Format); }); }); } @@ -485,14 +491,14 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("pageIndex", property.Key); - Assert.Equal("integer", property.Value.Type); - Assert.Equal("int32", property.Value.Format); + Assert.Equal("integer", property.Value.GetEffective(document).Type); + Assert.Equal("int32", property.Value.GetEffective(document).Format); }, property => { Assert.Equal("pageSize", property.Key); - Assert.Equal("integer", property.Value.Type); - Assert.Equal("int32", property.Value.Format); + Assert.Equal("integer", property.Value.GetEffective(document).Type); + Assert.Equal("int32", property.Value.GetEffective(document).Format); }, property => { @@ -503,8 +509,8 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("totalPages", property.Key); - Assert.Equal("integer", property.Value.Type); - Assert.Equal("int32", property.Value.Format); + Assert.Equal("integer", property.Value.GetEffective(document).Type); + Assert.Equal("int32", property.Value.GetEffective(document).Format); }, property => { @@ -516,8 +522,8 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("id", property.Key); - Assert.Equal("integer", property.Value.Type); - Assert.Equal("int32", property.Value.Format); + Assert.Equal("integer", property.Value.GetEffective(document).Type); + Assert.Equal("int32", property.Value.GetEffective(document).Format); }, property => { @@ -559,16 +565,19 @@ await VerifyOpenApiDocument(builder, document => var response = responses.Value; Assert.True(response.Content.TryGetValue("application/problem+json", out var mediaType)); Assert.Equal("object", mediaType.Schema.Type); + // `string` schemas appear multiple times in this document so they should + // all resolve to reference IDs, hence the use of `GetEffective` to resolve the + // final schema. Assert.Collection(mediaType.Schema.Properties, property => { Assert.Equal("type", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("title", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { @@ -579,12 +588,12 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("detail", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { Assert.Equal("instance", property.Key); - Assert.Equal("string", property.Value.Type); + Assert.Equal("string", property.Value.GetEffective(document).Type); }, property => { @@ -593,7 +602,7 @@ await VerifyOpenApiDocument(builder, document => // The errors object is a dictionary of string[]. Use `additionalProperties` // to indicate that the payload can be arbitrary keys with string[] values. Assert.Equal("array", property.Value.AdditionalProperties.Type); - Assert.Equal("string", property.Value.AdditionalProperties.Items.Type); + Assert.Equal("string", property.Value.AdditionalProperties.Items.GetEffective(document).Type); }); }); } diff --git a/src/OpenApi/test/SharedTypes.cs b/src/OpenApi/test/SharedTypes.cs index 781a29eb8d5e..15e09e44a099 100644 --- a/src/OpenApi/test/SharedTypes.cs +++ b/src/OpenApi/test/SharedTypes.cs @@ -101,3 +101,15 @@ internal class ProjectBoard public required bool IsPrivate { get; set; } } #nullable restore + +internal class Account +{ + public int Id { get; set; } + public string Name { get; set; } = string.Empty; +} + +internal class Product +{ + public int Id { get; set; } + public string Name { get; set; } = string.Empty; +} diff --git a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs new file mode 100644 index 000000000000..57578a37cc5b --- /dev/null +++ b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs @@ -0,0 +1,317 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; + +public class OpenApiSchemaReferenceTransformerTests : OpenApiDocumentServiceTestBase +{ + [Fact] + public async Task IdenticalParameterTypesAreStoredWithSchemaReference() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (IFormFile value) => { }); + builder.MapPost("/api-2", (IFormFile value) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var parameter = operation.RequestBody.Content["multipart/form-data"]; + var schema = parameter.Schema; + + var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; + var parameter2 = operation2.RequestBody.Content["multipart/form-data"]; + var schema2 = parameter2.Schema; + + // { + // "$ref": "#/components/schemas/IFormFileValue" + // } + // { + // "components": { + // "schemas": { + // "IFormFileValue": { + // "type": "object", + // "properties": { + // "value": { + // "$ref": "#/components/schemas/IFormFile" + // } + // } + // }, + // "IFormFile": { + // "type": "string", + // "format": "binary" + // } + // } + // } + Assert.Equal(schema.Reference, schema2.Reference); + + var effectiveSchema = schema.GetEffective(document); + Assert.Equal("object", effectiveSchema.Type); + Assert.Equal(1, effectiveSchema.Properties.Count); + var effectivePropertySchema = effectiveSchema.Properties["value"].GetEffective(document); + Assert.Equal("string", effectivePropertySchema.Type); + Assert.Equal("binary", effectivePropertySchema.Format); + }); + } + + [Fact] + public async Task TodoInRequestBodyAndResponseUsesSchemaReference() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Todo todo) => TypedResults.Ok(todo)); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody.Content["application/json"]; + var requestBodySchema = requestBody.Schema; + + var response = operation.Responses["200"]; + var responseContent = response.Content["application/json"]; + var responseSchema = responseContent.Schema; + + // { + // "$ref": "#/components/schemas/Todo" + // } + // { + // "components": { + // "schemas": { + // "Todo": { + // "type": "object", + // "properties": { + // "id": { + // "type": "integer" + // }, + // ... + // } + // } + // } + // } + Assert.Equal(requestBodySchema.Reference.Id, responseSchema.Reference.Id); + + var effectiveSchema = requestBodySchema.GetEffective(document); + Assert.Equal("object", effectiveSchema.Type); + Assert.Equal(4, effectiveSchema.Properties.Count); + var effectiveIdSchema = effectiveSchema.Properties["id"].GetEffective(document); + Assert.Equal("integer", effectiveIdSchema.Type); + var effectiveTitleSchema = effectiveSchema.Properties["title"].GetEffective(document); + Assert.Equal("string", effectiveTitleSchema.Type); + var effectiveCompletedSchema = effectiveSchema.Properties["completed"].GetEffective(document); + Assert.Equal("boolean", effectiveCompletedSchema.Type); + var effectiveCreatedAtSchema = effectiveSchema.Properties["createdAt"].GetEffective(document); + Assert.Equal("string", effectiveCreatedAtSchema.Type); + }); + } + + [Fact] + public async Task SameTypeInDictionaryAndListTypesUsesReferenceIds() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Todo[] todo) => { }); + builder.MapPost("/api-2", (Dictionary todo) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody.Content["application/json"]; + var requestBodySchema = requestBody.Schema; + + var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; + var requestBody2 = operation2.RequestBody.Content["application/json"]; + var requestBodySchema2 = requestBody2.Schema; + + // { + // "type": "array", + // "items": { + // "$ref": "#/components/schemas/Todo" + // } + // } + // { + // "type": "object", + // "additionalProperties": { + // "$ref": "#/components/schemas/Todo" + // } + // } + // { + // "components": { + // "schemas": { + // "Todo": { + // "type": "object", + // "properties": { + // "id": { + // "type": "integer" + // }, + // ... + // } + // } + // } + // } + // } + + // Parent types of schemas are different + Assert.Equal("array", requestBodySchema.Type); + Assert.Equal("object", requestBodySchema2.Type); + // Values of the list and dictionary point to the same reference ID + Assert.Equal(requestBodySchema.Items.Reference.Id, requestBodySchema2.AdditionalProperties.Reference.Id); + }); + } + + [Fact] + public async Task SameTypeInAllOfReferenceGetsHandledCorrectly() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (IFormFile resume, [FromForm] Todo todo) => { }); + builder.MapPost("/api-2", ([FromForm] string name, [FromForm] Todo todo2) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody.Content["multipart/form-data"]; + var requestBodySchema = requestBody.Schema; + + var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; + var requestBody2 = operation2.RequestBody.Content["multipart/form-data"]; + var requestBodySchema2 = requestBody2.Schema; + + // Todo parameter (second parameter) in allOf for each operation should point to the same reference ID. + Assert.Equal(requestBodySchema.AllOf[1].Reference.Id, requestBodySchema2.AllOf[1].Reference.Id); + + // IFormFile parameter should use inline schema since it only appears once in the application. + Assert.Equal("object", requestBodySchema.AllOf[0].Type); + Assert.Equal("string", requestBodySchema.AllOf[0].Properties["resume"].Type); + Assert.Equal("binary", requestBodySchema.AllOf[0].Properties["resume"].Format); + + // String parameter `name` should use reference ID shared by string properties in the + // Todo object. + Assert.Equal("object", requestBodySchema2.AllOf[0].Type); + var nameParameterReference = requestBodySchema2.AllOf[0].Properties["name"].Reference.Id; + var todoTitleReference = requestBodySchema.AllOf[1].GetEffective(document).Properties["title"].Reference.Id; + var todoTitleReference2 = requestBodySchema2.AllOf[1].GetEffective(document).Properties["title"].Reference.Id; + Assert.Equal(nameParameterReference, todoTitleReference); + Assert.Equal(nameParameterReference, todoTitleReference2); + }); + } + + [Fact] + public async Task DifferentTypesWithSameSchemaMapToSameReferenceId() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (IEnumerable todo) => { }); + builder.MapPost("/api-2", (Todo[] todo) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody.Content["application/json"]; + var requestBodySchema = requestBody.Schema; + + var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; + var requestBody2 = operation2.RequestBody.Content["application/json"]; + var requestBodySchema2 = requestBody2.Schema; + + // { + // "$ref": "#/components/schemas/TodoArray" + // } + // { + // "$ref": "#/components/schemas/TodoArray" + // } + // { + // "components": { + // "schemas": { + // "TodoArray": { + // "type": "array", + // "items": { + // "$ref": "#/components/schemas/Todo" + // } + // } + // } + // } + // } + + // Both list types should point to the same reference ID + Assert.Equal(requestBodySchema.Reference.Id, requestBodySchema2.Reference.Id); + // The referenced schema has an array type + Assert.Equal("array", requestBodySchema.GetEffective(document).Type); + // The items in the array are mapped to the Todo reference + Assert.NotNull(requestBodySchema.GetEffective(document).Items.Reference.Id); + Assert.Equal(4, requestBodySchema.GetEffective(document).Items.GetEffective(document).Properties.Count); + }); + } + + [Fact] + public async Task TypeModifiedWithSchemaTransformerMapsToDifferentReferenceId() + { + var builder = CreateBuilder(); + + builder.MapPost("/todo", (Todo todo) => { }); + builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); + + var options = new OpenApiOptions(); + options.UseSchemaTransformer((schema, context, cancellationToken) => + { + if (context.Type == typeof(Todo) && context.ParameterDescription is not null) + { + schema.Extensions["x-my-extension"] = new OpenApiString(context.ParameterDescription.Name); + } + return Task.CompletedTask; + }); + + await VerifyOpenApiDocument(builder, options, document => + { + var path = Assert.Single(document.Paths.Values); + var postOperation = path.Operations[OperationType.Post]; + var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; + // Schemas are distinct because of applied transformer so no reference is used. + Assert.Null(requestSchema.Reference); + Assert.Equal("todo", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); + var getOperation = path.Operations[OperationType.Get]; + var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; + Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _)); + // Schemas are distinct because of applied transformer so no reference is used. + Assert.Null(responseSchema.Reference); + + // References are still created for common types within the complex object (boolean, int, etc.) + Assert.Collection(document.Components.Schemas.Keys, + key => + { + Assert.Equal("boolean", key); + }, + key => + { + Assert.Equal("DateTime", key); + }, + key => + { + Assert.Equal("int", key); + }, + key => + { + Assert.Equal("string", key); + }); + }); + } +} diff --git a/src/OpenApi/test/Transformers/SchemaTransformerTests.cs b/src/OpenApi/test/Transformers/SchemaTransformerTests.cs index 841c4fd321e4..291a331e4fa8 100644 --- a/src/OpenApi/test/Transformers/SchemaTransformerTests.cs +++ b/src/OpenApi/test/Transformers/SchemaTransformerTests.cs @@ -134,10 +134,10 @@ await VerifyOpenApiDocument(builder, options, document => { var path = Assert.Single(document.Paths.Values); var postOperation = path.Operations[OperationType.Post]; - var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; + var requestSchema = postOperation.RequestBody.Content["application/json"].Schema.GetEffective(document); Assert.Equal("1", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); var getOperation = path.Operations[OperationType.Get]; - var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; + var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema.GetEffective(document); Assert.Equal("1", ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); }); } From 99f2ba5fd1d668fecbff1e1a9ba6a541c99bec79 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 18 Jun 2024 17:33:24 -0700 Subject: [PATCH 061/257] Work around auth issues with new internal source changes (#56308) For some reason, the new SetupNugetSources does not play well with aspnetcore. No known reason at this point. Workaround this by removing SetupNugetSources and replacing with commented-out forms of the new templates. When issues the new templates/scripts have been resolved, will re-enable. --- .azure/pipelines/ci.yml | 1 + .azure/pipelines/jobs/default-build.yml | 21 ++------------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 783985415a41..dadfd77e106f 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -706,6 +706,7 @@ extends: # Source build - template: /eng/common/templates-official/job/source-build.yml@self parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 22bed9724c73..20b19c4c20b4 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -419,25 +419,8 @@ jobs: - ${{ parameters.beforeBuild }} - - ${{ if eq(parameters.agentOs, 'Windows') }}: - - task: PowerShell@2 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - ${{ if ne(parameters.agentOs, 'Windows') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - # Call the NugetAuthenticate task to add creds for added feeds. - - task: NuGetAuthenticate@1 + # - template: /eng/common/templates-official/steps/enable-internal-sources.yml@self + # - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml@self # Add COMPlus_* environment variables to build steps. - ${{ if ne(parameters.steps, '')}}: From b8caae6140e5b79d5ffda0af460fb5b9d586dde0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:08:07 +0000 Subject: [PATCH 062/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#56279) [main] Update dependencies from dotnet/efcore, dotnet/runtime --- eng/Version.Details.xml | 320 ++++++++++++++++++++-------------------- eng/Versions.props | 160 ++++++++++---------- 2 files changed, 240 insertions(+), 240 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c81f37550cc2..39a1be696b9f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,325 +9,325 @@ --> - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/efcore - 80e9dce280f69dd9e65c9018509eb562e6efb059 + 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - bcd9cb869fef000e62729d083750121bce0bf1c4 + 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 29a54e4f45df..5e3ccb693c2e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,92 +63,92 @@ --> - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 - 9.0.0-preview.6.24317.2 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24318.7 9.0.0-preview.6.24316.1 9.0.0-preview.6.24316.1 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 - 9.0.0-preview.6.24304.2 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 + 9.0.0-preview.6.24318.1 4.11.0-1.24218.5 4.11.0-1.24218.5 From adf603f4de06d6e030c3f4e48ed499d032caff37 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 19 Jun 2024 16:47:42 +0200 Subject: [PATCH 063/257] [Blazor] Add mapping for .mjs files (#56316) Newer emscripten produces dotnet.native.worker.mjs instead of .js Context: https://github.com/dotnet/runtime/pull/100334#pullrequestreview-2115161601 --- .../src/ComponentsWebAssemblyApplicationBuilderExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs b/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs index 2fe8c3de1a73..7cf70b7d02d8 100644 --- a/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs +++ b/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs @@ -94,6 +94,7 @@ private static StaticFileOptions CreateStaticFilesOptions(IFileProvider webRootF AddMapping(contentTypeProvider, ".br", MediaTypeNames.Application.Octet); AddMapping(contentTypeProvider, ".dat", MediaTypeNames.Application.Octet); AddMapping(contentTypeProvider, ".blat", MediaTypeNames.Application.Octet); + AddMapping(contentTypeProvider, ".mjs", MediaTypeNames.Text.JavaScript); options.ContentTypeProvider = contentTypeProvider; From 560f931fd40d2942f40472f46b70f6f70218aec6 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Wed, 19 Jun 2024 13:16:20 -0700 Subject: [PATCH 064/257] Warn when [Authorize] is overridden by [AllowAnymous] from "farther" away (#56244) --- .../samples/WebAppSample/WebAppSample.csproj | 2 +- .../src/Analyzers/DiagnosticDescriptors.cs | 9 + .../Mvc/DetectOverriddenAuthorizeAttribute.cs | 223 +++++++ .../src/Analyzers/Mvc/MvcAnalyzer.cs | 80 ++- .../src/Analyzers/Resources.resx | 6 + .../DetectOverriddenAuthorizeAttributeTest.cs | 602 ++++++++++++++++++ src/Shared/Roslyn/CodeAnalysisExtensions.cs | 2 +- src/Shared/RoslynUtils/WellKnownTypeData.cs | 14 +- 8 files changed, 897 insertions(+), 41 deletions(-) create mode 100644 src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/DetectOverriddenAuthorizeAttribute.cs create mode 100644 src/Framework/AspNetCoreAnalyzers/test/Mvc/DetectOverriddenAuthorizeAttributeTest.cs diff --git a/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj b/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj index c818d959a8e3..764634e30066 100644 --- a/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj +++ b/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj @@ -1,4 +1,4 @@ - + $(DefaultNetCoreTargetFramework) diff --git a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs index 85bc320937b6..e0143542bff0 100644 --- a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs +++ b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs @@ -214,4 +214,13 @@ internal static class DiagnosticDescriptors DiagnosticSeverity.Info, isEnabledByDefault: true, helpLinkUri: "https://aka.ms/aspnet/analyzers"); + + internal static readonly DiagnosticDescriptor OverriddenAuthorizeAttribute = new( + "ASP0026", + new LocalizableResourceString(nameof(Resources.Analyzer_OverriddenAuthorizeAttribute_Title), Resources.ResourceManager, typeof(Resources)), + new LocalizableResourceString(nameof(Resources.Analyzer_OverriddenAuthorizeAttribute_Message), Resources.ResourceManager, typeof(Resources)), + "Security", + DiagnosticSeverity.Warning, + isEnabledByDefault: true, + helpLinkUri: "https://aka.ms/aspnet/analyzers"); } diff --git a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/DetectOverriddenAuthorizeAttribute.cs b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/DetectOverriddenAuthorizeAttribute.cs new file mode 100644 index 000000000000..86e490b723a4 --- /dev/null +++ b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/DetectOverriddenAuthorizeAttribute.cs @@ -0,0 +1,223 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Microsoft.AspNetCore.App.Analyzers.Infrastructure; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Diagnostics; + +namespace Microsoft.AspNetCore.Analyzers.Mvc; + +using WellKnownType = WellKnownTypeData.WellKnownType; + +public partial class MvcAnalyzer +{ + /// + /// This tries to detect [Authorize] attributes that are unwittingly overridden by [AllowAnonymous] attributes that are "farther" away from a controller. + /// + /// + /// This might report the same [Authorize] attribute multiple times if it's on a shared base type, but we'd have to disable parallelization of the + /// entire MvcAnalyzer to avoid that. We assume that this scenario is rare enough and that overreporting is benign enough to not warrant the performance hit. + /// See AuthorizeOnControllerBaseWithMultipleChildren_AllowAnonymousOnControllerBaseBaseType_HasMultipleDiagnostics. + /// + private static void DetectOverriddenAuthorizeAttributeOnController(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, + INamedTypeSymbol controllerSymbol, List authorizeAttributes, out string? allowAnonClass) + { + Debug.Assert(authorizeAttributes.Count is 0); + + var isCheckingBaseType = false; + allowAnonClass = null; + + foreach (var currentClass in controllerSymbol.GetTypeHierarchy()) + { + FindAuthorizeAndAllowAnonymous(wellKnownTypes, currentClass, isCheckingBaseType, authorizeAttributes, out var foundAllowAnonymous); + if (foundAllowAnonymous) + { + // Anything we find after this would be farther away, so we can short circuit. + ReportOverriddenAuthorizeAttributeDiagnosticsIfAny(context, authorizeAttributes, currentClass.Name); + // Keep track of the nearest class with [AllowAnonymous] for later reporting of action-level [Authorize] attributes. + allowAnonClass = currentClass.Name; + return; + } + + isCheckingBaseType = true; + } + } + + /// + /// This tries to detect [Authorize] attributes that are unwittingly overridden by [AllowAnonymous] attributes that are "farther" away from a controller action. + /// To do so, it first searches the action method and then the controller class. It repeats this process for each virtual method the action may override and for + /// each base class the controller may inherit from. Since it searches for the attributes closest to the action first, it short circuits as soon as [AllowAnonymous] is found. + /// If it has already detected a closer [Authorize] attribute, it reports a diagnostic at the [Authorize] attribute's location indicating that it will be overridden. + /// + private static void DetectOverriddenAuthorizeAttributeOnAction(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, + IMethodSymbol actionSymbol, List authorizeAttributes, string? allowAnonClass) + { + Debug.Assert(authorizeAttributes.Count is 0); + + var isCheckingBaseType = false; + var currentMethod = actionSymbol; + + foreach (var currentClass in actionSymbol.ContainingType.GetTypeHierarchy()) + { + bool foundAllowAnonymous; + + if (currentMethod is not null && IsSameSymbol(currentMethod.ContainingType, currentClass)) + { + FindAuthorizeAndAllowAnonymous(wellKnownTypes, currentMethod, isCheckingBaseType, authorizeAttributes, out foundAllowAnonymous); + if (foundAllowAnonymous) + { + // [AllowAnonymous] was found on the action method. Anything we find after this would be farther away, so we short circuit. + ReportOverriddenAuthorizeAttributeDiagnosticsIfAny(context, authorizeAttributes, currentMethod.ContainingType.Name, currentMethod.Name); + return; + } + + currentMethod = currentMethod.OverriddenMethod; + + // We've already checked the controller and any base classes for overridden attributes in DetectOverriddenAuthorizeAttributeOnController. + // If there are no more base methods, and we are not tracking any unreported [Authorize] attributes that might be overridden by a class, we're done. + if (currentMethod is null && (authorizeAttributes.Count is 0 || !isCheckingBaseType)) + { + if (allowAnonClass is not null) + { + // We don't use allowAnonClass once we start checking overrides to avoid false positives. But if we found [Authorize] directly on a non-virtual + // action, we can report it without rechecking the controller or its base types for [AllowAnonymous] when given a non-null allowAnonClass. + ReportOverriddenAuthorizeAttributeDiagnosticsIfAny(context, authorizeAttributes, allowAnonClass); + } + + return; + } + } + + // Now, we're mostly trying to detect [Authorize] on virtual actions which are not covered by allowAnonClass. Overridden [Authorize] attributes on classes + // have mostly been reported already, but we still need to track those too just in case there is [AllowAnonymous] on a base method farther away. + FindAuthorizeAndAllowAnonymous(wellKnownTypes, currentClass, isCheckingBaseType, authorizeAttributes, out foundAllowAnonymous); + if (foundAllowAnonymous) + { + // We are only concerned with method-level [Authorize] attributes that are overridden by the [AllowAnonymous] found on this class. + // Any child classes should have already been reported in DetectOverriddenAuthorizeAttributeOnController. + ReportOverriddenAuthorizeAttributeDiagnosticsIfAny(context, authorizeAttributes.Where(a => a.IsTargetingMethod), currentClass.Name); + return; + } + + isCheckingBaseType = true; + } + + Debug.Assert(currentMethod is null); + } + + private static bool IsSameSymbol(ISymbol? x, ISymbol? y) => SymbolEqualityComparer.Default.Equals(x, y); + + private static bool IsInheritableAttribute(WellKnownTypes wellKnownTypes, INamedTypeSymbol attribute) + { + // [AttributeUsage] is sealed but inheritable. + var attributeUsageAttributeType = wellKnownTypes.Get(WellKnownType.System_AttributeUsageAttribute); + var attributeUsage = attribute.GetAttributes(attributeUsageAttributeType, inherit: true).FirstOrDefault(); + + if (attributeUsage is not null) + { + foreach (var arg in attributeUsage.NamedArguments) + { + if (arg.Key == nameof(AttributeUsageAttribute.Inherited)) + { + return (bool)arg.Value.Value!; + } + } + } + + // If [AttributeUsage] is not found or the Inherited property is not set, the default is true. + return true; + } + + private static bool IsMatchingAttribute(WellKnownTypes wellKnownTypes, INamedTypeSymbol attribute, + INamedTypeSymbol commonAttribute, ITypeSymbol attributeInterface, bool mustBeInheritable) + { + // The "common" attribute is either [Authorize] or [AllowAnonymous] so we can skip the interface and inheritable checks. + if (IsSameSymbol(attribute, commonAttribute)) + { + return true; + } + + if (!attributeInterface.IsAssignableFrom(attribute)) + { + return false; + } + + return !mustBeInheritable || IsInheritableAttribute(wellKnownTypes, attribute); + } + + private static void FindAuthorizeAndAllowAnonymous(WellKnownTypes wellKnownTypes, ISymbol symbol, bool isCheckingBaseType, + List authorizeAttributes, out bool foundAllowAnonymous) + { + AttributeData? localAuthorizeAttribute = null; + List? localAuthorizeAttributeOverflow = null; + foundAllowAnonymous = false; + + foreach (var attribute in symbol.GetAttributes()) + { + if (attribute.AttributeClass is null) + { + continue; + } + + var authInterfaceType = wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Authorization_IAuthorizeData); + var authAttributeType = wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Authorization_AuthorizeAttribute); + if (IsMatchingAttribute(wellKnownTypes, attribute.AttributeClass, authAttributeType, authInterfaceType, isCheckingBaseType)) + { + if (localAuthorizeAttribute is null) + { + localAuthorizeAttribute = attribute; + } + else + { + // This is ony allocated if there are multiple [Authorize] attributes on the same symbol which we assume is rare. + localAuthorizeAttributeOverflow ??= []; + localAuthorizeAttributeOverflow.Add(attribute); + } + } + + var anonInterfaceType = wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Authorization_IAllowAnonymous); + var anonAttributeType = wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Authorization_AllowAnonymousAttribute); + if (IsMatchingAttribute(wellKnownTypes, attribute.AttributeClass, anonAttributeType, anonInterfaceType, isCheckingBaseType)) + { + // If localAuthorizeAttribute is not null, [AllowAnonymous] came after [Authorize] on the same method or class. We assume + // this closer [AllowAnonymous] was intended to override the [Authorize] attribute which it always does regardless of order. + // [Authorize(...)] could still be useful for configuring the authentication scheme even if the endpoint allows anonymous requests. + localAuthorizeAttribute = null; + localAuthorizeAttributeOverflow?.Clear(); + foundAllowAnonymous = true; + } + } + + if (localAuthorizeAttribute is not null) + { + var isTargetingMethod = symbol is IMethodSymbol; + authorizeAttributes.Add(new(localAuthorizeAttribute, isTargetingMethod)); + foreach (var extraAttribute in localAuthorizeAttributeOverflow ?? Enumerable.Empty()) + { + authorizeAttributes.Add(new(extraAttribute, isTargetingMethod)); + } + } + } + + private static void ReportOverriddenAuthorizeAttributeDiagnosticsIfAny(SymbolAnalysisContext context, + IEnumerable authorizeAttributes, string allowAnonClass, string? allowAnonMethod = null) + { + string? allowAnonLocation = null; + + foreach (var authorizeAttribute in authorizeAttributes) + { + if (authorizeAttribute.AttributeData.ApplicationSyntaxReference is { } syntaxReference) + { + allowAnonLocation ??= allowAnonMethod is null ? allowAnonClass : $"{allowAnonClass}.{allowAnonMethod}"; + context.ReportDiagnostic(Diagnostic.Create( + DiagnosticDescriptors.OverriddenAuthorizeAttribute, + syntaxReference.GetSyntax(context.CancellationToken).GetLocation(), + allowAnonLocation)); + } + } + } +} diff --git a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/MvcAnalyzer.cs b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/MvcAnalyzer.cs index aadb9ffe6356..a7be8f52796c 100644 --- a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/MvcAnalyzer.cs +++ b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Mvc/MvcAnalyzer.cs @@ -22,7 +22,8 @@ namespace Microsoft.AspNetCore.Analyzers.Mvc; public partial class MvcAnalyzer : DiagnosticAnalyzer { public override ImmutableArray SupportedDiagnostics { get; } = ImmutableArray.Create( - DiagnosticDescriptors.AmbiguousActionRoute + DiagnosticDescriptors.AmbiguousActionRoute, + DiagnosticDescriptors.OverriddenAuthorizeAttribute ); public override void Initialize(AnalysisContext context) @@ -36,17 +37,34 @@ public override void Initialize(AnalysisContext context) var wellKnownTypes = WellKnownTypes.GetOrCreate(compilation); var routeUsageCache = RouteUsageCache.GetOrCreate(compilation); - var concurrentQueue = new ConcurrentQueue>(); + var concurrentQueue = new ConcurrentQueue<(List ActionRoutes, List AuthorizeAttributes)>(); context.RegisterSymbolAction(context => { var namedTypeSymbol = (INamedTypeSymbol)context.Symbol; + + // Visit Controllers if (MvcDetector.IsController(namedTypeSymbol, wellKnownTypes)) { // Pool and reuse lists for each block. - if (!concurrentQueue.TryDequeue(out var actionRoutes)) + if (!concurrentQueue.TryDequeue(out var pooledItems)) + { + pooledItems.ActionRoutes = []; + pooledItems.AuthorizeAttributes = []; + } + + DetectOverriddenAuthorizeAttributeOnController(context, wellKnownTypes, namedTypeSymbol, pooledItems.AuthorizeAttributes, out var allowAnonClass); + pooledItems.AuthorizeAttributes.Clear(); + + // Visit Actions + foreach (var member in namedTypeSymbol.GetMembers()) { - actionRoutes = new List(); + if (member is IMethodSymbol methodSymbol && MvcDetector.IsAction(methodSymbol, wellKnownTypes)) + { + PopulateActionRoutes(context, wellKnownTypes, routeUsageCache, pooledItems.ActionRoutes, methodSymbol); + DetectOverriddenAuthorizeAttributeOnAction(context, wellKnownTypes, methodSymbol, pooledItems.AuthorizeAttributes, allowAnonClass); + pooledItems.AuthorizeAttributes.Clear(); + } } RoutePatternTree? controllerRoutePattern = null; @@ -60,50 +78,41 @@ public override void Initialize(AnalysisContext context) } } - PopulateActionRoutes(context, wellKnownTypes, routeUsageCache, namedTypeSymbol, actionRoutes); - - DetectAmbiguousActionRoutes(context, wellKnownTypes, controllerRoutePattern, actionRoutes); + DetectAmbiguousActionRoutes(context, wellKnownTypes, controllerRoutePattern, pooledItems.ActionRoutes); // Return to the pool. - actionRoutes.Clear(); - concurrentQueue.Enqueue(actionRoutes); + pooledItems.ActionRoutes.Clear(); + concurrentQueue.Enqueue(pooledItems); } }, SymbolKind.NamedType); }); } - private static void PopulateActionRoutes(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, RouteUsageCache routeUsageCache, INamedTypeSymbol namedTypeSymbol, List actionRoutes) + private static void PopulateActionRoutes(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, RouteUsageCache routeUsageCache, List actionRoutes, IMethodSymbol methodSymbol) { - foreach (var member in namedTypeSymbol.GetMembers()) + // [Route("xxx")] attributes don't have a HTTP method and instead use the HTTP methods of other attributes. + // For example, [HttpGet] + [HttpPost] + [Route("xxx")] means the route "xxx" is combined with the HTTP methods. + var unroutedHttpMethods = GetUnroutedMethodHttpMethods(wellKnownTypes, methodSymbol); + + foreach (var attribute in methodSymbol.GetAttributes()) { - if (member is IMethodSymbol methodSymbol && - MvcDetector.IsAction(methodSymbol, wellKnownTypes)) + if (attribute.AttributeClass is null || !wellKnownTypes.IsType(attribute.AttributeClass, RouteAttributeTypes, out var match)) { - // [Route("xxx")] attributes don't have a HTTP method and instead use the HTTP methods of other attributes. - // For example, [HttpGet] + [HttpPost] + [Route("xxx")] means the route "xxx" is combined with the HTTP methods. - var unroutedHttpMethods = GetUnroutedMethodHttpMethods(wellKnownTypes, methodSymbol); - - foreach (var attribute in methodSymbol.GetAttributes()) - { - if (attribute.AttributeClass is null || !wellKnownTypes.IsType(attribute.AttributeClass, RouteAttributeTypes, out var match)) - { - continue; - } + continue; + } - var routeUsage = GetRouteUsageModel(attribute, routeUsageCache, context.CancellationToken); - if (routeUsage is null) - { - continue; - } + var routeUsage = GetRouteUsageModel(attribute, routeUsageCache, context.CancellationToken); + if (routeUsage is null) + { + continue; + } - // [Route] uses unrouted HTTP verb attributes for its HTTP methods. - var methods = match.Value is WellKnownType.Microsoft_AspNetCore_Mvc_RouteAttribute - ? unroutedHttpMethods - : ImmutableArray.Create(GetHttpMethod(match.Value)!); + // [Route] uses unrouted HTTP verb attributes for its HTTP methods. + var methods = match.Value is WellKnownType.Microsoft_AspNetCore_Mvc_RouteAttribute + ? unroutedHttpMethods + : ImmutableArray.Create(GetHttpMethod(match.Value)!); - actionRoutes.Add(new ActionRoute(methodSymbol, routeUsage, methods)); - } - } + actionRoutes.Add(new ActionRoute(methodSymbol, routeUsage, methods)); } } @@ -179,4 +188,5 @@ private static ImmutableArray GetUnroutedMethodHttpMethods(WellKnownType } private record struct ActionRoute(IMethodSymbol ActionSymbol, RouteUsageModel RouteUsageModel, ImmutableArray HttpMethods); + private record struct AttributeInfo(AttributeData AttributeData, bool IsTargetingMethod); } diff --git a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Resources.resx b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Resources.resx index 9c20abc6939c..e983fd83ad25 100644 --- a/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Resources.resx +++ b/src/Framework/AspNetCoreAnalyzers/src/Analyzers/Resources.resx @@ -315,4 +315,10 @@ Use AddAuthorizationBuilder + + This [Authorize] attribute is overridden by an [AllowAnonymous] attribute from farther away on '{0}'. See https://aka.ms/aspnetcore-warnings/ASP0026 for more details. + + + [Authorize] overridden by [AllowAnonymous] from farther away + \ No newline at end of file diff --git a/src/Framework/AspNetCoreAnalyzers/test/Mvc/DetectOverriddenAuthorizeAttributeTest.cs b/src/Framework/AspNetCoreAnalyzers/test/Mvc/DetectOverriddenAuthorizeAttributeTest.cs new file mode 100644 index 000000000000..1e2e0373ebef --- /dev/null +++ b/src/Framework/AspNetCoreAnalyzers/test/Mvc/DetectOverriddenAuthorizeAttributeTest.cs @@ -0,0 +1,602 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.CodeAnalysis.Testing; +using VerifyCS = Microsoft.AspNetCore.Analyzers.Verifiers.CSharpAnalyzerVerifier; + +namespace Microsoft.AspNetCore.Analyzers.Mvc; + +public partial class DetectOverriddenAuthorizeAttributeTest +{ + private const string CommonPrefix = """ +using System; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Mvc; + +WebApplication.Create().Run(); + +"""; + + [Fact] + public async Task AuthorizeOnAction_AllowAnonymousOnController_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyController +{ + [{|#0:Authorize|}] + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyController").WithLocation(0) + ); + } + + [Fact] + public async Task AllowAnonymousOnAction_AuthorizeOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[Authorize] +public class MyController +{ + [AllowAnonymous] + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task AuthorizeOnAction_AllowAnonymousOnControllerBase_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyControllerBase +{ +} + +public class MyController : MyControllerBase +{ + [{|#0:Authorize|}] + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase").WithLocation(0) + ); + } + + [Fact] + public async Task AuthorizeOnActionControllerAndAction_AllowAnonymousOnControllerBase_HasMultipleDiagnostics() + { + // The closest Authorize attribute to the action reported if multiple could be considered overridden. + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +[{|#0:Authorize|}] +public class MyControllerBase +{ +} + +[{|#1:Authorize|}] +public class MyController : MyControllerBase +{ + [{|#2:Authorize|}] + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase").WithLocation(1), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase").WithLocation(2) + ); + } + + [Fact] + public async Task AuthorizeOnController_AllowAnonymousOnControllerBase_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyControllerBase +{ +} + +[{|#0:Authorize|}] +public class MyController : MyControllerBase +{ + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase").WithLocation(0) + ); + } + + [Fact] + public async Task AuthorizeOnControllerWithMultipleActions_AllowAnonymousOnControllerBase_HasSingleDiagnostic() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyControllerBase +{ +} + +[{|#0:Authorize|}] +public class MyController : MyControllerBase +{ + public object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase").WithLocation(0) + ); + } + + [Fact] + public async Task AuthorizeOnControllerBaseWithMultipleChildren_AllowAnonymousOnControllerBaseBaseType_HasMultipleDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyControllerBaseBase +{ +} + +[{|#0:Authorize|}] +public class MyControllerBase : MyControllerBaseBase +{ +} + +public class MyController : MyControllerBase +{ + public object Get() => new(); + public object AnotherGet() => new(); +} + +public class MyOtherController : MyControllerBase +{ + public object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + // This is not ideal. If someone comes along and fixes it to be a single diagnostic, feel free to update this test to end with + // "HasSingleDiagnostic" instead of "HasMultipleDiagnostics". I think fixing it will require disabling parallelization of the + // entire MvcAnalyzer which I don't think is a good tradeoff. I assume that this scenario is rare enough and that overreporting + // is benign enough to not warrant the performance hit. + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase").WithLocation(0) + ); + } + + [Fact] + public async Task CustomAuthorizeOnAction_CustomAllowAnonymousOnController_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[MyAllowAnonymous] +public class MyController +{ + [{|#0:MyAuthorize|}] + public object Get() => new(); +} + +public class MyAuthorizeAttribute : Attribute, IAuthorizeData +{ + public string? Policy { get; set; } + public string? Roles { get; set; } + public string? AuthenticationSchemes { get; set; } +} + +public class MyAllowAnonymousAttribute : Attribute, IAllowAnonymous +{ +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyController").WithLocation(0) + ); + } + + [Fact] + public async Task AuthorizeOnAction_NonInheritableAllowAnonymousOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[MyAllowAnonymous] +public class MyControllerBase +{ +} + +public class MyController : MyControllerBase +{ + [Authorize] + public object Get() => new(); +} + +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +public class MyAllowAnonymousAttribute : Attribute, IAllowAnonymous +{ +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task CustomAuthorizeCombinedWithAllowAnonymousOnAction_AllowAnonymousOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyController +{ + [MyAuthorize] + public object Get() => new(); +} + +public class MyAuthorizeAttribute : Attribute, IAuthorizeData, IAllowAnonymous +{ + public string? Policy { get; set; } + public string? Roles { get; set; } + public string? AuthenticationSchemes { get; set; } +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task AuthorizeBeforeAllowAnonymousOnAction_AllowAnonymousOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyController +{ + [Authorize(AuthenticationSchemes = "foo")] + [AllowAnonymous] + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task AuthorizeAfterAllowAnonymousOnAction_NoAttributeOnController_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +public class MyController +{ + [AllowAnonymous] + [{|#0:Authorize|}] + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyController.Get").WithLocation(0) + ); + } + + [Fact] + public async Task NoAttributeOnAction_AuthorizeBeforeAllowAnonymousOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[Authorize(AuthenticationSchemes = "foo")] +[AllowAnonymous] +public class MyController +{ + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task NoAttributeOnAction_AuthorizeAfterAllowAnonymousOnController_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +[{|#0:Authorize|}] +public class MyController +{ + public object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyController").WithLocation(0) + ); + } + + [Fact] + public async Task AuthorizeOnAction_AllowAnonymousOnBaseMethod_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +public class MyControllerBase +{ + [AllowAnonymous] + public virtual object Get() => new(); +} + +public class MyController : MyControllerBase +{ + [{|#0:Authorize|}] + public override object Get() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase.Get").WithLocation(0) + ); + } + + [Fact] + public async Task AllowAnonymousOnVirtualBaseActionWithNoOverride_AuthorizeOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +public class MyControllerBase +{ + [AllowAnonymous] + public virtual object Get() => new(); +} + +[Authorize] +public class MyController : MyControllerBase +{ +} +"""; + + // I suspect [AllowAnonymous] on a specific action that never needs auth despite the child controller + // configuring auth is a fairly common pattern. However, if the action is explicitly overridden, + // you need to reapply [AllowAnonymous] on the override to silence the warning and clarify your intent. + // Making people do this when there isn't even an override is a bit onerous. + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task AllowAnonymousOnVirtualBaseActionAndOverride_AuthorizeOnController_NoDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +public class MyControllerBase +{ + [AllowAnonymous] + public virtual object Get() => new(); +} + +[Authorize] +public class MyController : MyControllerBase +{ + [AllowAnonymous] + public override object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source); + } + + [Fact] + public async Task AllowAnonymousOnVirtualBaseBaseActionButNotOverride_AuthorizeOnControllerBase_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +public class MyControllerBaseBase +{ + [AllowAnonymous] + public virtual object Get() => new(); +} + +[{|#0:Authorize|}] +public class MyControllerBase : MyControllerBaseBase +{ +} + +public class MyController : MyControllerBase +{ + public override object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase.Get").WithLocation(0) + ); + } + + [Fact] + public async Task AllowAnonymousOnVirtualBaseActionButNotOverride_AuthorizeOnController_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +public class MyControllerBase +{ + [AllowAnonymous] + public virtual object Get() => new(); +} + +[{|#0:Authorize|}] +public class MyController : MyControllerBase +{ + public override object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBase.Get").WithLocation(0) + ); + } + + [Fact] + public async Task AllowAnonymousOnBaseBaseController_AuthorizeOnControllerBase_HasSingleDiagnostic() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyControllerBaseBase +{ + public virtual object Get() => new(); +} + +[{|#0:Authorize|}] +public class MyControllerBase : MyControllerBaseBase +{ +} + +public class MyController : MyControllerBase +{ + public override object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase").WithLocation(0) + ); + } + + [Fact] + public async Task AllowAnonymousOnControllerBaseBaseType_AuthorizeOnControllerBaseAndAction_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class MyControllerBaseBase +{ + [{|#2:Authorize|}] + public virtual object Get() => new(); +} + +[{|#0:Authorize|}] +public class MyControllerBase : MyControllerBaseBase +{ + [{|#1:Authorize|}] + public override object Get() => new(); +} + +public class MyController : MyControllerBase +{ + public override object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase").WithLocation(1), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase").WithLocation(2) + ); + } + + [Fact] + public async Task AllowAnonymousOnBaseBaseType_AuthorizeOnControllerBaseAndAction_HasDiagnostics() + { + var source = $$""" +{{CommonPrefix}} +[Authorize] +public class MyControllerBaseBase +{ + [AllowAnonymous] + public virtual object Get() => new(); +} + +[{|#0:Authorize|}] +public class MyControllerBase : MyControllerBaseBase +{ + [{|#1:Authorize|}] + public override object Get() => new(); +} + +public class MyController : MyControllerBase +{ + public override object Get() => new(); + public object AnotherGet() => new(); +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase.Get").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("MyControllerBaseBase.Get").WithLocation(1) + ); + } + + [Fact] + public async Task AttributesOnMultipleActions_AttributesOnMultipleControllers_HasDiagnostics() + { + // Copied from https://github.com/dotnet/aspnetcore/issues/43550#issuecomment-1940287150 + var source = $$""" +{{CommonPrefix}} +[AllowAnonymous] +public class OAuthControllerAnon : ControllerBase +{ +} + +[Authorize] +public class OAuthControllerAuthz : ControllerBase +{ +} + +[{|#0:Authorize|}] // BUG +public class OAuthControllerInherited : OAuthControllerAnon +{ +} + +public class OAuthControllerInherited2 : OAuthControllerAnon +{ + [{|#1:Authorize|}] // BUG + public IActionResult Privacy() + { + return null; + } +} + +[AllowAnonymous] +[{|#2:Authorize|}] // BUG +public class OAuthControllerMultiple : ControllerBase +{ +} + +[AllowAnonymous] +public class OAuthControllerInherited3 : ControllerBase +{ + [{|#3:Authorize|}] // BUG + public IActionResult Privacy() + { + return null; + } +} +"""; + + await VerifyCS.VerifyAnalyzerAsync(source, + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("OAuthControllerAnon").WithLocation(0), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("OAuthControllerAnon").WithLocation(1), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("OAuthControllerMultiple").WithLocation(2), + new DiagnosticResult(DiagnosticDescriptors.OverriddenAuthorizeAttribute).WithArguments("OAuthControllerInherited3").WithLocation(3) + ); + } +} diff --git a/src/Shared/Roslyn/CodeAnalysisExtensions.cs b/src/Shared/Roslyn/CodeAnalysisExtensions.cs index f0f2a6c3bb93..eab2dc2d56f9 100644 --- a/src/Shared/Roslyn/CodeAnalysisExtensions.cs +++ b/src/Shared/Roslyn/CodeAnalysisExtensions.cs @@ -141,7 +141,7 @@ public static bool HasAttribute(this ISymbol symbol, ITypeSymbol attribute) return false; } - private static IEnumerable GetTypeHierarchy(this ITypeSymbol? typeSymbol) + public static IEnumerable GetTypeHierarchy(this ITypeSymbol? typeSymbol) { while (typeSymbol != null) { diff --git a/src/Shared/RoslynUtils/WellKnownTypeData.cs b/src/Shared/RoslynUtils/WellKnownTypeData.cs index 10e62baef94e..7a4fa428c105 100644 --- a/src/Shared/RoslynUtils/WellKnownTypeData.cs +++ b/src/Shared/RoslynUtils/WellKnownTypeData.cs @@ -113,11 +113,14 @@ public enum WellKnownType Microsoft_Extensions_DependencyInjection_PolicyServiceCollectionExtensions, Microsoft_Extensions_DependencyInjection_FromKeyedServicesAttribute, Microsoft_AspNetCore_Authorization_AuthorizationOptions, - Microsoft_Extensions_DependencyInjection_IServiceCollection + Microsoft_Extensions_DependencyInjection_IServiceCollection, + Microsoft_AspNetCore_Authorization_IAllowAnonymous, + Microsoft_AspNetCore_Authorization_IAuthorizeData, + System_AttributeUsageAttribute, } - public static string[] WellKnownTypeNames = new[] - { + public static string[] WellKnownTypeNames = + [ "Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder", "Microsoft.AspNetCore.Http.IHeaderDictionary", "Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider", @@ -225,5 +228,8 @@ public enum WellKnownType "Microsoft.Extensions.DependencyInjection.FromKeyedServicesAttribute", "Microsoft.AspNetCore.Authorization.AuthorizationOptions", "Microsoft.Extensions.DependencyInjection.IServiceCollection", - }; + "Microsoft.AspNetCore.Authorization.IAllowAnonymous", + "Microsoft.AspNetCore.Authorization.IAuthorizeData", + "System.AttributeUsageAttribute", + ]; } From 216c32257c38310a96fece3397c164ce3489395c Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Thu, 20 Jun 2024 00:34:10 -0700 Subject: [PATCH 065/257] [Blazor] Fix trimming issue (#56333) --- src/Components/Shared/src/ResourceCollectionProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Components/Shared/src/ResourceCollectionProvider.cs b/src/Components/Shared/src/ResourceCollectionProvider.cs index 4a3751669c5c..78ebef9d13d2 100644 --- a/src/Components/Shared/src/ResourceCollectionProvider.cs +++ b/src/Components/Shared/src/ResourceCollectionProvider.cs @@ -7,6 +7,8 @@ namespace Microsoft.AspNetCore.Components; +using static Microsoft.AspNetCore.Internal.LinkerFlags; + internal class ResourceCollectionProvider { private const string ResourceCollectionUrlKey = "__ResourceCollectionUrl"; @@ -52,6 +54,8 @@ internal void SetResourceCollection(ResourceAssetCollection resourceCollection) _resourceCollection = resourceCollection; } + [DynamicDependency(JsonSerialized, typeof(ResourceAsset))] + [DynamicDependency(JsonSerialized, typeof(ResourceAssetProperty))] private async Task LoadResourceCollection() { if (_url == null) From cd92ed12476de4e03ae5293d81362f2eb07b4f80 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 20 Jun 2024 10:12:17 +0100 Subject: [PATCH 066/257] Skip some Razor build tests to observe effect on test runner (#56292) --- src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs | 3 +++ src/Testing/src/xunit/HelixConstants.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs index ce32e882979f..3fa09a161488 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs @@ -4,6 +4,7 @@ using System.Net; using System.Net.Http; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; @@ -83,6 +84,7 @@ public async Task RzcViewsArePreferredToRuntimeViews() } [Fact] + [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/56322", Queues = $"{HelixConstants.Debian12};{HelixConstants.Mariner}")] public async Task RazorViews_AreUpdatedOnChange() { // Arrange @@ -120,6 +122,7 @@ public async Task RazorViews_AreUpdatedOnChange() } [Fact] + [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/56322", Queues = $"{HelixConstants.Debian12};{HelixConstants.Mariner}")] public async Task RazorPages_AreUpdatedOnChange() { // Arrange diff --git a/src/Testing/src/xunit/HelixConstants.cs b/src/Testing/src/xunit/HelixConstants.cs index 47f938e8446f..4ae98502b7f0 100644 --- a/src/Testing/src/xunit/HelixConstants.cs +++ b/src/Testing/src/xunit/HelixConstants.cs @@ -8,6 +8,8 @@ public static class HelixConstants public const string Windows10Arm64 = "Windows.10.Arm64v8.Open;"; public const string DebianAmd64 = "Debian.11.Amd64.Open;"; public const string DebianArm64 = "Debian.11.Arm64.Open;"; + public const string Debian12 = "(Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64"; public const string AlmaLinuxAmd64 = "(AlmaLinux.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix-amd64;"; + public const string Mariner = "(Mariner)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64"; public const string NativeAotNotSupportedHelixQueues = "All.OSX;All.Linux;Windows.11.Amd64.Client.Open;Windows.11.Amd64.Client;Windows.Amd64.Server2022.Open;Windows.Amd64.Server2022;windows.11.arm64.open;windows.11.arm64"; } From 594057010f840ad47e04ac375c306faa5f1dbe5e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:06:35 +0000 Subject: [PATCH 067/257] Update dependencies from https://github.com/dotnet/runtime build 20240619.11 (#56339) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 39a1be696b9f..1d308d2b0f63 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 4a0a04cf3e8b8c2a3613270df7f838246e4597e8 + 117cfccdd71abc164e6b933ca7602b509a1365dd https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 5e3ccb693c2e..1bc60bc5e4e9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,80 +63,80 @@ --> - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 - 9.0.0-preview.6.24318.7 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24319.11 9.0.0-preview.6.24316.1 9.0.0-preview.6.24316.1 From 79cab58de7356765b34c8cee012c43bf8c8fb5c5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:45:48 +0000 Subject: [PATCH 068/257] [main] Update dependencies from dotnet/xdt (#56293) * Update dependencies from https://github.com/dotnet/xdt build 20240617.2 Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24310.1 -> To Version 9.0.0-preview.24317.2 * Update dependencies from https://github.com/dotnet/xdt build 20240617.2 Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24310.1 -> To Version 9.0.0-preview.24317.2 * Update dependencies from https://github.com/dotnet/xdt build 20240617.2 Microsoft.SourceBuild.Intermediate.xdt , Microsoft.Web.Xdt From Version 9.0.0-preview.24310.1 -> To Version 9.0.0-preview.24317.2 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1d308d2b0f63..72d2dfa1b99c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -329,14 +329,14 @@ https://github.com/dotnet/runtime 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/xdt - 3081f87e9bf53c96a5b692f1de4bd530c4447080 + 0d51607fb791c51a14b552ed24fe3430c252148b - + https://github.com/dotnet/xdt - 3081f87e9bf53c96a5b692f1de4bd530c4447080 + 0d51607fb791c51a14b552ed24fe3430c252148b diff --git a/eng/Versions.props b/eng/Versions.props index 1bc60bc5e4e9..42eb04ab6e7a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,8 +174,8 @@ 9.0.0-preview.6.24307.1 - 9.0.0-preview.24310.1 - 9.0.0-preview.24310.1 + 9.0.0-preview.24317.2 + 9.0.0-preview.24317.2 net9.0 + + net8.0 diff --git a/src/Caching/Hybrid/src/Microsoft.Extensions.Caching.Hybrid.csproj b/src/Caching/Hybrid/src/Microsoft.Extensions.Caching.Hybrid.csproj index 041d425c1d69..a4a09cdd4395 100644 --- a/src/Caching/Hybrid/src/Microsoft.Extensions.Caching.Hybrid.csproj +++ b/src/Caching/Hybrid/src/Microsoft.Extensions.Caching.Hybrid.csproj @@ -9,7 +9,7 @@ net 5.0 : [DynamicallyAccessedMembers], EncodingExtensions.GetString/GetBytes, IsExternalInit net 7.0 : ArgumentNullException.ThrowIfNull --> - $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0;netstandard2.1 + $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0;netstandard2.1;$(CurrentLtsTargetFramework) true cache;distributedcache;hybrid true diff --git a/src/Caching/StackExchangeRedis/src/Microsoft.Extensions.Caching.StackExchangeRedis.csproj b/src/Caching/StackExchangeRedis/src/Microsoft.Extensions.Caching.StackExchangeRedis.csproj index 31d5fcf2c965..3a3faeaf9f40 100644 --- a/src/Caching/StackExchangeRedis/src/Microsoft.Extensions.Caching.StackExchangeRedis.csproj +++ b/src/Caching/StackExchangeRedis/src/Microsoft.Extensions.Caching.StackExchangeRedis.csproj @@ -2,7 +2,7 @@ Distributed cache implementation of Microsoft.Extensions.Caching.Distributed.IDistributedCache using Redis. - $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0 + $(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0;$(CurrentLtsTargetFramework) true cache;distributedcache;redis true diff --git a/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt new file mode 100644 index 000000000000..7dc5c58110bf --- /dev/null +++ b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Shipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt new file mode 100644 index 000000000000..bb997fdc8643 --- /dev/null +++ b/src/Caching/StackExchangeRedis/src/PublicAPI/net8.0/PublicAPI.Unshipped.txt @@ -0,0 +1,26 @@ +#nullable enable +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Dispose() -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Get(string! key) -> byte[]? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RedisCache(Microsoft.Extensions.Options.IOptions! optionsAccessor) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Refresh(string! key) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RefreshAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Remove(string! key) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.RemoveAsync(string! key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.Set(string! key, byte[]! value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions! options) -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.SetAsync(string! key, byte[]! value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions! options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.Configuration.get -> string? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.Configuration.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConfigurationOptions.get -> StackExchange.Redis.ConfigurationOptions? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConfigurationOptions.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConnectionMultiplexerFactory.get -> System.Func!>? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ConnectionMultiplexerFactory.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.InstanceName.get -> string? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.InstanceName.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ProfilingSession.get -> System.Func? +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.ProfilingSession.set -> void +Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions.RedisCacheOptions() -> void +Microsoft.Extensions.DependencyInjection.StackExchangeRedisCacheServiceCollectionExtensions +static Microsoft.Extensions.DependencyInjection.StackExchangeRedisCacheServiceCollectionExtensions.AddStackExchangeRedisCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! setupAction) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! From 613c1e990b6b6411bda84456aefe14fe8e194279 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Thu, 20 Jun 2024 08:43:41 -0700 Subject: [PATCH 070/257] Re-plat on JsonExporter APIs and remove JsonSchemaMapper prototype (#56330) --- ...ensions.cs => JsonNodeSchemaExtensions.cs} | 117 ++- .../JsonSchemaGenerationContext.cs | 86 -- .../JsonSchemaMapper.ReflectionHelpers.cs | 425 -------- .../JsonSchemaMapper/JsonSchemaMapper.cs | 965 ------------------ .../JsonSchemaMapperConfiguration.cs | 97 -- .../JsonSchemaMapper/NullabilityInfo.cs | 73 -- .../NullabilityInfoContext.cs | 667 ------------ .../NullabilityInfoHelpers.cs | 44 - .../ReferenceTypeNullability.cs | 31 - .../src/Services/OpenApiDocumentService.cs | 14 +- .../Services/Schemas/OpenApiSchemaService.cs | 55 +- .../Services/Schemas/OpenApiSchemaStore.cs | 4 +- ...cument_documentName=responses.verified.txt | 25 +- ...t_documentName=schemas-by-ref.verified.txt | 10 +- ...penApiComponentService.ParameterSchemas.cs | 18 + ...nApiComponentService.RequestBodySchemas.cs | 144 +++ 16 files changed, 302 insertions(+), 2473 deletions(-) rename src/OpenApi/src/Extensions/{JsonObjectSchemaExtensions.cs => JsonNodeSchemaExtensions.cs} (73%) delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaGenerationContext.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapperConfiguration.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfo.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoContext.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoHelpers.cs delete mode 100644 src/OpenApi/src/Schemas/JsonSchemaMapper/ReferenceTypeNullability.cs diff --git a/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs similarity index 73% rename from src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs rename to src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index 59e713014ff5..dadd88c1858a 100644 --- a/src/OpenApi/src/Extensions/JsonObjectSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -8,8 +8,8 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; +using System.Text.Json.Schema; using System.Text.Json.Serialization.Metadata; -using JsonSchemaMapper; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; @@ -22,8 +22,10 @@ namespace Microsoft.AspNetCore.OpenApi; /// Provides a set of extension methods for modifying the opaque JSON Schema type /// that is provided by the underlying schema generator in System.Text.Json. ///
-internal static class JsonObjectSchemaExtensions +internal static class JsonNodeSchemaExtensions { + private static readonly NullabilityInfoContext _nullabilityInfoContext = new(); + private static readonly Dictionary _simpleTypeToOpenApiSchema = new() { [typeof(bool)] = new() { Type = "boolean" }, @@ -43,6 +45,8 @@ internal static class JsonObjectSchemaExtensions [typeof(char)] = new() { Type = "string" }, [typeof(Uri)] = new() { Type = "string", Format = "uri" }, [typeof(string)] = new() { Type = "string" }, + [typeof(TimeOnly)] = new() { Type = "string", Format = "time" }, + [typeof(DateOnly)] = new() { Type = "string", Format = "date" }, }; /// @@ -52,7 +56,7 @@ internal static class JsonObjectSchemaExtensions /// OpenApi schema v3 supports the validation vocabulary supported by JSON Schema. Because the underlying /// schema generator does not handle validation attributes to the validation vocabulary, we apply that mapping here. /// - /// Note that this method targets and not because it is + /// Note that this method targets and not because it is /// designed to be invoked via the `OnGenerated` callback provided by the underlying schema generator /// so that attributes can be mapped to the properties associated with inputs and outputs to a given request. /// @@ -74,9 +78,9 @@ internal static class JsonObjectSchemaExtensions /// will result in the schema having a type of "string" and a format of "uri" even though the model binding /// layer will validate the string against *both* constraints. /// - /// The produced by the underlying schema generator. + /// The produced by the underlying schema generator. /// A list of the validation attributes to apply. - internal static void ApplyValidationAttributes(this JsonObject schema, IEnumerable validationAttributes) + internal static void ApplyValidationAttributes(this JsonNode schema, IEnumerable validationAttributes) { foreach (var attribute in validationAttributes) { @@ -126,10 +130,10 @@ internal static void ApplyValidationAttributes(this JsonObject schema, IEnumerab /// /// Populate the default value into the current schema. /// - /// The produced by the underlying schema generator. + /// The produced by the underlying schema generator. /// An object representing the associated with the default value. /// The associated with the target type. - internal static void ApplyDefaultValue(this JsonObject schema, object? defaultValue, JsonTypeInfo? jsonTypeInfo) + internal static void ApplyDefaultValue(this JsonNode schema, object? defaultValue, JsonTypeInfo? jsonTypeInfo) { if (jsonTypeInfo is null) { @@ -159,29 +163,35 @@ internal static void ApplyDefaultValue(this JsonObject schema, object? defaultVa /// based on whether the underlying schema generator returned an array type containing "null" to /// represent a nullable type or if the type was denoted as nullable from our lookup cache. /// - /// Note that this method targets and not because + /// Note that this method targets and not because /// it is is designed to be invoked via the `OnGenerated` callback in the underlying schema generator as /// opposed to after the generated schemas have been mapped to OpenAPI schemas. /// - /// The produced by the underlying schema generator. - /// The associated with the . - internal static void ApplyPrimitiveTypesAndFormats(this JsonObject schema, JsonSchemaGenerationContext context) + /// The produced by the underlying schema generator. + /// The associated with the . + internal static void ApplyPrimitiveTypesAndFormats(this JsonNode schema, JsonSchemaExporterContext context) { - if (_simpleTypeToOpenApiSchema.TryGetValue(context.TypeInfo.Type, out var openApiSchema)) + var type = context.TypeInfo.Type; + var underlyingType = Nullable.GetUnderlyingType(type); + if (_simpleTypeToOpenApiSchema.TryGetValue(underlyingType ?? type, out var openApiSchema)) { schema[OpenApiSchemaKeywords.NullableKeyword] = openApiSchema.Nullable || (schema[OpenApiSchemaKeywords.TypeKeyword] is JsonArray schemaType && schemaType.GetValues().Contains("null")); schema[OpenApiSchemaKeywords.TypeKeyword] = openApiSchema.Type; schema[OpenApiSchemaKeywords.FormatKeyword] = openApiSchema.Format; schema[OpenApiConstants.SchemaId] = context.TypeInfo.GetSchemaReferenceId(); + schema[OpenApiSchemaKeywords.NullableKeyword] = underlyingType != null; + // Clear out patterns that the underlying JSON schema generator uses to represent + // validations for DateTime, DateTimeOffset, and integers. + schema[OpenApiSchemaKeywords.PatternKeyword] = null; } } /// /// Applies route constraints to the target schema. /// - /// The produced by the underlying schema generator. + /// The produced by the underlying schema generator. /// The list of s associated with the route parameter. - internal static void ApplyRouteConstraints(this JsonObject schema, IEnumerable constraints) + internal static void ApplyRouteConstraints(this JsonNode schema, IEnumerable constraints) { // Apply constraints in reverse order because when it comes to the routing // layer the first constraint that is violated causes routing to short circuit. @@ -255,10 +265,10 @@ internal static void ApplyRouteConstraints(this JsonObject schema, IEnumerable /// Applies parameter-specific customizations to the target schema. /// - /// The produced by the underlying schema generator. + /// The produced by the underlying schema generator. /// The associated with the . /// The associated with the . - internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDescription parameterDescription, JsonTypeInfo? jsonTypeInfo) + internal static void ApplyParameterInfo(this JsonNode schema, ApiParameterDescription parameterDescription, JsonTypeInfo? jsonTypeInfo) { // This is special handling for parameters that are not bound from the body but represented in a complex type. // For example: @@ -281,17 +291,24 @@ internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDesc { var attributes = validations.OfType(); schema.ApplyValidationAttributes(attributes); - if (parameterDescription.ParameterDescriptor is IParameterInfoParameterDescriptor { ParameterInfo: { } parameterInfo }) + } + if (parameterDescription.ParameterDescriptor is IParameterInfoParameterDescriptor { ParameterInfo: { } parameterInfo }) + { + if (parameterInfo.HasDefaultValue) { - if (parameterInfo.HasDefaultValue) - { - schema.ApplyDefaultValue(parameterInfo.DefaultValue, jsonTypeInfo); - } - else if (parameterInfo.GetCustomAttributes().LastOrDefault() is { } defaultValueAttribute) - { - schema.ApplyDefaultValue(defaultValueAttribute.Value, jsonTypeInfo); - } + schema.ApplyDefaultValue(parameterInfo.DefaultValue, jsonTypeInfo); + } + else if (parameterInfo.GetCustomAttributes().LastOrDefault() is { } defaultValueAttribute) + { + schema.ApplyDefaultValue(defaultValueAttribute.Value, jsonTypeInfo); + } + + if (parameterInfo.GetCustomAttributes().OfType() is { } validationAttributes) + { + schema.ApplyValidationAttributes(validationAttributes); } + + schema.ApplyNullabilityContextInfo(parameterInfo); } // Route constraints are only defined on parameters that are sourced from the path. Since // they are encoded in the route template, and not in the type information based to the underlying @@ -305,9 +322,9 @@ internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDesc /// /// Applies the polymorphism options to the target schema following OpenAPI v3's conventions. /// - /// The produced by the underlying schema generator. - /// The associated with the current type. - internal static void ApplyPolymorphismOptions(this JsonObject schema, JsonSchemaGenerationContext context) + /// The produced by the underlying schema generator. + /// The associated with the current type. + internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaExporterContext context) { if (context.TypeInfo.PolymorphismOptions is { } polymorphismOptions) { @@ -329,10 +346,48 @@ internal static void ApplyPolymorphismOptions(this JsonObject schema, JsonSchema /// /// Set the x-schema-id property on the schema to the identifier associated with the type. /// - /// The produced by the underlying schema generator. - /// The associated with the current type. - internal static void ApplySchemaReferenceId(this JsonObject schema, JsonSchemaGenerationContext context) + /// The produced by the underlying schema generator. + /// The associated with the current type. + internal static void ApplySchemaReferenceId(this JsonNode schema, JsonSchemaExporterContext context) { schema[OpenApiConstants.SchemaId] = context.TypeInfo.GetSchemaReferenceId(); } + + /// + /// Support applying nullability status for reference types provided as a parameter. + /// + /// The produced by the underlying schema generator. + /// The associated with the schema. + internal static void ApplyNullabilityContextInfo(this JsonNode schema, ParameterInfo parameterInfo) + { + if (parameterInfo.ParameterType.IsValueType) + { + return; + } + + var nullabilityInfo = _nullabilityInfoContext.Create(parameterInfo); + if (nullabilityInfo.WriteState == NullabilityState.Nullable) + { + schema[OpenApiSchemaKeywords.NullableKeyword] = true; + } + } + + /// + /// Support applying nullability status for reference types provided as a property or field. + /// + /// The produced by the underlying schema generator. + /// The or associated with the schema. + internal static void ApplyNullabilityContextInfo(this JsonNode schema, ICustomAttributeProvider attributeProvider) + { + var nullabilityInfo = attributeProvider switch + { + PropertyInfo propertyInfo => !propertyInfo.PropertyType.IsValueType ? _nullabilityInfoContext.Create(propertyInfo) : null, + FieldInfo fieldInfo => !fieldInfo.FieldType.IsValueType ? _nullabilityInfoContext.Create(fieldInfo) : null, + _ => null + }; + if (nullabilityInfo is { WriteState: NullabilityState.Nullable } or { ReadState: NullabilityState.Nullable }) + { + schema[OpenApiSchemaKeywords.NullableKeyword] = true; + } + } } diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaGenerationContext.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaGenerationContext.cs deleted file mode 100644 index 8978dfef1fdf..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaGenerationContext.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Linq; -using System.Reflection; -using System.Text.Json.Serialization.Metadata; - -namespace JsonSchemaMapper; - -/// -/// Defines the context in which a JSON schema within a type graph is being generated. -/// -#if EXPOSE_JSON_SCHEMA_MAPPER -public -#else -internal -#endif - readonly struct JsonSchemaGenerationContext -{ - internal JsonSchemaGenerationContext(JsonTypeInfo typeInfo, Type? declaringType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo) - { - TypeInfo = typeInfo; - DeclaringType = declaringType; - PropertyInfo = propertyInfo; - ParameterInfo = parameterInfo; - } - - /// - /// The for the type being processed. - /// - public JsonTypeInfo TypeInfo { get; } - - /// - /// The declaring type of the property or parameter being processed. - /// - public Type? DeclaringType { get; } - - /// - /// The if the schema is being generated for a property. - /// - public JsonPropertyInfo? PropertyInfo { get; } - - /// - /// The if a constructor parameter - /// has been associated with the accompanying . - /// - public ParameterInfo? ParameterInfo { get; } - - /// - /// Checks if the type, property, or parameter has the specified attribute applied. - /// - /// The type of the attribute to resolve. - /// Whether to look up the hierarchy chain for the inherited custom attribute. - /// True if the attribute is defined by the current context. - public bool IsDefined(bool inherit = false) - where TAttribute : Attribute => - GetCustomAttributes(typeof(TAttribute), inherit).Any(); - - /// - /// Checks if the type, property, or parameter has the specified attribute applied. - /// - /// The type of the attribute to resolve. - /// Whether to look up the hierarchy chain for the inherited custom attribute. - /// The first attribute resolved from the current context, or null. - public TAttribute? GetAttribute(bool inherit = false) - where TAttribute : Attribute => - (TAttribute?)GetCustomAttributes(typeof(TAttribute), inherit).FirstOrDefault(); - - /// - /// Resolves any custom attributes that might have been applied to the type, property, or parameter. - /// - /// The attribute type to resolve. - /// Whether to look up the hierarchy chain for the inherited custom attribute. - /// An enumerable of all custom attributes defined by the context. - public IEnumerable GetCustomAttributes(Type type, bool inherit = false) - { - // Resolves attributes starting from the property, then the parameter, and finally the type itself. - return GetAttrs(JsonSchemaMapper.ResolveAttributeProvider(DeclaringType, PropertyInfo)) - .Concat(GetAttrs(ParameterInfo)) - .Concat(GetAttrs(TypeInfo.Type)) - .Cast(); - - object[] GetAttrs(ICustomAttributeProvider? provider) => - provider?.GetCustomAttributes(type, inherit) ?? Array.Empty(); - } -} diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs deleted file mode 100644 index f44ef3480b36..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.ReflectionHelpers.cs +++ /dev/null @@ -1,425 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.ComponentModel; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Nodes; -using System.Text.Json.Serialization; -using System.Text.Json.Serialization.Metadata; - -namespace JsonSchemaMapper; - -#if EXPOSE_JSON_SCHEMA_MAPPER -public -#else -internal -#endif - static partial class JsonSchemaMapper -{ - // Uses reflection to determine the element type of an enumerable or dictionary type - // Workaround for https://github.com/dotnet/runtime/issues/77306#issuecomment-2007887560 - private static Type GetElementType(JsonTypeInfo typeInfo) - { - Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary); - // Element type is non-null for enumerable and dictionary types - return typeInfo.ElementType!; - } - - // The source generator currently doesn't populate attribute providers for properties - // cf. https://github.com/dotnet/runtime/issues/100095 - // Work around the issue by running a query for the relevant MemberInfo using the internal MemberName property - // https://github.com/dotnet/runtime/blob/de774ff9ee1a2c06663ab35be34b755cd8d29731/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonPropertyInfo.cs#L206 -#if NETCOREAPP - [EditorBrowsable(EditorBrowsableState.Never)] - [UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", - Justification = "We're reading the internal JsonPropertyInfo.MemberName which cannot have been trimmed away.")] - [UnconditionalSuppressMessage("Trimming", "IL2070:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The parameter of method does not have matching annotations.", - Justification = "We're reading the member which is already accessed by the source generator.")] -#endif - internal static ICustomAttributeProvider? ResolveAttributeProvider(Type? declaringType, JsonPropertyInfo? propertyInfo) - { - if (declaringType is null || propertyInfo is null) - { - return null; - } - - if (propertyInfo.AttributeProvider is { } provider) - { - return provider; - } - - s_memberNameProperty ??= typeof(JsonPropertyInfo).GetProperty("MemberName", BindingFlags.Instance | BindingFlags.NonPublic)!; - var memberName = (string?)s_memberNameProperty.GetValue(propertyInfo); - if (memberName is not null) - { - return declaringType.GetMember(memberName, MemberTypes.Property | MemberTypes.Field, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault(); - } - - return null; - } - - private static PropertyInfo? s_memberNameProperty; - - // Uses reflection to determine any custom converters specified for the element of a nullable type. -#if NETCOREAPP - [UnconditionalSuppressMessage("Trimming", "IL2026", - Justification = "We're resolving private fields of the built-in Nullable converter which cannot have been trimmed away.")] -#endif - private static JsonConverter? ExtractCustomNullableConverter(JsonConverter? converter) - { - Debug.Assert(converter is null || IsBuiltInConverter(converter)); - - // There is unfortunately no way in which we can obtain the element converter from a nullable converter without resorting to private reflection - // https://github.com/dotnet/runtime/blob/5fda47434cecc590095e9aef3c4e560b7b7ebb47/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/NullableConverter.cs#L15-L17 - Type? converterType = converter?.GetType(); - if (converterType?.Name == "NullableConverter`1") - { - FieldInfo elementConverterField = converterType.GetPrivateFieldWithPotentiallyTrimmedMetadata("_elementConverter"); - return (JsonConverter)elementConverterField!.GetValue(converter)!; - } - - return null; - } - - // Uses reflection to determine serialization configuration for enum types - // cf. https://github.com/dotnet/runtime/blob/5fda47434cecc590095e9aef3c4e560b7b7ebb47/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs#L23-L25 -#if NETCOREAPP - [UnconditionalSuppressMessage("Trimming", "IL2026", - Justification = "We're resolving private fields of the built-in enum converter which cannot have been trimmed away.")] -#endif - private static bool TryGetStringEnumConverterValues(JsonTypeInfo typeInfo, JsonConverter converter, out JsonArray? values) - { - Debug.Assert(typeInfo.Type.IsEnum && IsBuiltInConverter(converter)); - - if (converter is JsonConverterFactory factory) - { - converter = factory.CreateConverter(typeInfo.Type, typeInfo.Options)!; - } - - Type converterType = converter.GetType(); - FieldInfo converterOptionsField = converterType.GetPrivateFieldWithPotentiallyTrimmedMetadata("_converterOptions"); - FieldInfo namingPolicyField = converterType.GetPrivateFieldWithPotentiallyTrimmedMetadata("_namingPolicy"); - - const int EnumConverterOptionsAllowStrings = 1; - var converterOptions = (int)converterOptionsField!.GetValue(converter)!; - if ((converterOptions & EnumConverterOptionsAllowStrings) != 0) - { - if (typeInfo.Type.GetCustomAttribute() is not null) - { - // For enums implemented as flags do not surface values in the JSON schema. - values = null; - } - else - { - var namingPolicy = (JsonNamingPolicy?)namingPolicyField!.GetValue(converter)!; - string[] names = Enum.GetNames(typeInfo.Type); - values = new JsonArray(); - foreach (string name in names) - { - string effectiveName = namingPolicy?.ConvertName(name) ?? name; - values.Add((JsonNode)effectiveName); - } - } - - return true; - } - - values = null; - return false; - } - -#if NETCOREAPP - [RequiresUnreferencedCode("Resolves unreferenced member metadata.")] -#endif - private static FieldInfo GetPrivateFieldWithPotentiallyTrimmedMetadata(this Type type, string fieldName) - { - FieldInfo? field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic); - if (field is null) - { - throw new InvalidOperationException( - $"Could not resolve metadata for field '{fieldName}' in type '{type}'. " + - "If running Native AOT ensure that the 'IlcTrimMetadata' property has been disabled."); - } - - return field; - } - - // Resolves the parameters of the deserialization constructor for a type, if they exist. -#if NETCOREAPP - [UnconditionalSuppressMessage("Trimming", "IL2072:Target parameter argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", - Justification = "The deserialization constructor should have already been referenced by the source generator and therefore will not have been trimmed.")] -#endif - private static Func ResolveJsonConstructorParameterMapper(JsonTypeInfo typeInfo) - { - Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object); - - if (typeInfo.Properties.Count > 0 && - typeInfo.CreateObject is null && // Ensure that a default constructor isn't being used - typeInfo.Type.TryGetDeserializationConstructor(useDefaultCtorInAnnotatedStructs: true, out ConstructorInfo? ctor)) - { - ParameterInfo[]? parameters = ctor?.GetParameters(); - if (parameters?.Length > 0) - { - Dictionary dict = new(parameters.Length); - foreach (ParameterInfo parameter in parameters) - { - if (parameter.Name is not null) - { - // We don't care about null parameter names or conflicts since they - // would have already been rejected by JsonTypeInfo configuration. - dict[new(parameter.Name, parameter.ParameterType)] = parameter; - } - } - - return prop => dict.TryGetValue(new(prop.Name, prop.PropertyType), out ParameterInfo? parameter) ? parameter : null; - } - } - - return static _ => null; - } - - // Parameter to property matching semantics as declared in - // https://github.com/dotnet/runtime/blob/12d96ccfaed98e23c345188ee08f8cfe211c03e7/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.cs#L1007-L1030 - private readonly struct ParameterLookupKey : IEquatable - { - public ParameterLookupKey(string name, Type type) - { - Name = name; - Type = type; - } - - public string Name { get; } - public Type Type { get; } - - public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Name); - public bool Equals(ParameterLookupKey other) => Type == other.Type && string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase); - public override bool Equals(object? obj) => obj is ParameterLookupKey key && Equals(key); - } - - // Resolves the deserialization constructor for a type using logic copied from - // https://github.com/dotnet/runtime/blob/e12e2fa6cbdd1f4b0c8ad1b1e2d960a480c21703/src/libraries/System.Text.Json/Common/ReflectionExtensions.cs#L227-L286 - private static bool TryGetDeserializationConstructor( -#if NETCOREAPP - [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] -#endif - this Type type, - bool useDefaultCtorInAnnotatedStructs, - out ConstructorInfo? deserializationCtor) - { - ConstructorInfo? ctorWithAttribute = null; - ConstructorInfo? publicParameterlessCtor = null; - ConstructorInfo? lonePublicCtor = null; - - ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.Public | BindingFlags.Instance); - - if (constructors.Length == 1) - { - lonePublicCtor = constructors[0]; - } - - foreach (ConstructorInfo constructor in constructors) - { - if (HasJsonConstructorAttribute(constructor)) - { - if (ctorWithAttribute != null) - { - deserializationCtor = null; - return false; - } - - ctorWithAttribute = constructor; - } - else if (constructor.GetParameters().Length == 0) - { - publicParameterlessCtor = constructor; - } - } - - // Search for non-public ctors with [JsonConstructor]. - foreach (ConstructorInfo constructor in type.GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance)) - { - if (HasJsonConstructorAttribute(constructor)) - { - if (ctorWithAttribute != null) - { - deserializationCtor = null; - return false; - } - - ctorWithAttribute = constructor; - } - } - - // Structs will use default constructor if attribute isn't used. - if (useDefaultCtorInAnnotatedStructs && type.IsValueType && ctorWithAttribute == null) - { - deserializationCtor = null; - return true; - } - - deserializationCtor = ctorWithAttribute ?? publicParameterlessCtor ?? lonePublicCtor; - return true; - - static bool HasJsonConstructorAttribute(ConstructorInfo constructorInfo) => - constructorInfo.GetCustomAttribute() != null; - } - - private static bool IsBuiltInConverter(JsonConverter converter) => - converter.GetType().Assembly == typeof(JsonConverter).Assembly; - - // Resolves the nullable reference type annotations for a property or field, - // additionally addressing a few known bugs of the NullabilityInfo pre .NET 9. - private static NullabilityInfo GetMemberNullability(this NullabilityInfoContext context, MemberInfo memberInfo) - { - Debug.Assert(memberInfo is PropertyInfo or FieldInfo); - return memberInfo is PropertyInfo prop - ? context.Create(prop) - : context.Create((FieldInfo)memberInfo); - } - - private static NullabilityState GetParameterNullability(this NullabilityInfoContext context, ParameterInfo parameterInfo) - { - // Workaround for https://github.com/dotnet/runtime/issues/92487 - if (parameterInfo.GetGenericParameterDefinition() is { ParameterType: { IsGenericParameter: true } typeParam }) - { - // Step 1. Look for nullable annotations on the type parameter. - if (GetNullableFlags(typeParam) is byte[] flags) - { - return TranslateByte(flags[0]); - } - - // Step 2. Look for nullable annotations on the generic method declaration. - if (typeParam.DeclaringMethod != null && GetNullableContextFlag(typeParam.DeclaringMethod) is byte flag) - { - return TranslateByte(flag); - } - - // Step 3. Look for nullable annotations on the generic method declaration. - if (GetNullableContextFlag(typeParam.DeclaringType!) is byte flag2) - { - return TranslateByte(flag2); - } - - // Default to nullable. - return NullabilityState.Nullable; - -#if NETCOREAPP - [UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", - Justification = "We're resolving private fields of the built-in enum converter which cannot have been trimmed away.")] -#endif - static byte[]? GetNullableFlags(MemberInfo member) - { - Attribute? attr = member.GetCustomAttributes().FirstOrDefault(attr => - { - Type attrType = attr.GetType(); - return attrType.Namespace == "System.Runtime.CompilerServices" && attrType.Name == "NullableAttribute"; - }); - - return (byte[])attr?.GetType().GetField("NullableFlags")?.GetValue(attr)!; - } - -#if NETCOREAPP - [UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", - Justification = "We're resolving private fields of the built-in enum converter which cannot have been trimmed away.")] -#endif - static byte? GetNullableContextFlag(MemberInfo member) - { - Attribute? attr = member.GetCustomAttributes().FirstOrDefault(attr => - { - Type attrType = attr.GetType(); - return attrType.Namespace == "System.Runtime.CompilerServices" && attrType.Name == "NullableContextAttribute"; - }); - - return (byte?)attr?.GetType().GetField("Flag")?.GetValue(attr)!; - } - - static NullabilityState TranslateByte(byte b) => - b switch - { - 1 => NullabilityState.NotNull, - 2 => NullabilityState.Nullable, - _ => NullabilityState.Unknown - }; - } - - return context.Create(parameterInfo).WriteState; - } - - private static ParameterInfo GetGenericParameterDefinition(this ParameterInfo parameter) - { - if (parameter.Member is { DeclaringType.IsConstructedGenericType: true } - or MethodInfo { IsGenericMethod: true, IsGenericMethodDefinition: false }) - { - var genericMethod = (MethodBase)parameter.Member.GetGenericMemberDefinition()!; - return genericMethod.GetParameters()[parameter.Position]; - } - - return parameter; - } - -#if NETCOREAPP - [UnconditionalSuppressMessage("Trimming", "IL2075:'this' argument does not satisfy 'DynamicallyAccessedMembersAttribute' in call to target method. The return value of the source method does not have matching annotations.", - Justification = "Looking up the generic member definition of the provided member.")] -#endif - private static MemberInfo GetGenericMemberDefinition(this MemberInfo member) - { - if (member is Type type) - { - return type.IsConstructedGenericType ? type.GetGenericTypeDefinition() : type; - } - - if (member.DeclaringType!.IsConstructedGenericType) - { - const BindingFlags AllMemberFlags = - BindingFlags.Static | BindingFlags.Instance | - BindingFlags.Public | BindingFlags.NonPublic; - - return member.DeclaringType.GetGenericTypeDefinition() - .GetMember(member.Name, AllMemberFlags) - .First(m => m.MetadataToken == member.MetadataToken); - } - - if (member is MethodInfo { IsGenericMethod: true, IsGenericMethodDefinition: false } method) - { - return method.GetGenericMethodDefinition(); - } - - return member; - } - - // Taken from https://github.com/dotnet/runtime/blob/903bc019427ca07080530751151ea636168ad334/src/libraries/System.Text.Json/Common/ReflectionExtensions.cs#L288-L317 - private static object? GetNormalizedDefaultValue(this ParameterInfo parameterInfo) - { - Type parameterType = parameterInfo.ParameterType; - object? defaultValue = parameterInfo.DefaultValue; - - if (defaultValue is null) - { - return null; - } - - // DBNull.Value is sometimes used as the default value (returned by reflection) of nullable params in place of null. - if (defaultValue == DBNull.Value && parameterType != typeof(DBNull)) - { - return null; - } - - // Default values of enums or nullable enums are represented using the underlying type and need to be cast explicitly - // cf. https://github.com/dotnet/runtime/issues/68647 - if (parameterType.IsEnum) - { - return Enum.ToObject(parameterType, defaultValue); - } - - if (Nullable.GetUnderlyingType(parameterType) is Type underlyingType && underlyingType.IsEnum) - { - return Enum.ToObject(underlyingType, defaultValue); - } - - return defaultValue; - } -} diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.cs deleted file mode 100644 index 87d4be43b226..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapper.cs +++ /dev/null @@ -1,965 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.ComponentModel; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text.Json; -using System.Text.Json.Nodes; -using System.Text.Json.Serialization; -using System.Text.Json.Serialization.Metadata; - -namespace JsonSchemaMapper; - -/// -/// Maps .NET types to JSON schema objects using contract metadata from instances. -/// -#if EXPOSE_JSON_SCHEMA_MAPPER -public -#else -internal -#endif - static partial class JsonSchemaMapper -{ - /// - /// The JSON schema draft version used by the generated schemas. - /// - public const string SchemaVersion = "https://json-schema.org/draft/2020-12/schema"; - - /// - /// Generates a JSON schema corresponding to the contract metadata of the specified type. - /// - /// The options instance from which to resolve the contract metadata. - /// The root type for which to generate the JSON schema. - /// The configuration object controlling the schema generation. - /// A new instance defining the JSON schema for . - /// One of the specified parameters is . - /// The parameter contains unsupported configuration. - public static JsonObject GetJsonSchema(this JsonSerializerOptions options, Type type, JsonSchemaMapperConfiguration? configuration = null) - { - if (options is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(options)); - } - - if (type is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(type)); - } - - ValidateOptions(options); - configuration ??= JsonSchemaMapperConfiguration.Default; - - JsonTypeInfo typeInfo = options.GetTypeInfo(type); - var state = new GenerationState(configuration); - return MapJsonSchemaCore(ref state, typeInfo); - } - - /// - /// Generates a JSON object schema with properties corresponding to the specified method parameters. - /// - /// The options instance from which to resolve the contract metadata. - /// The method from whose parameters to generate the JSON schema. - /// The configuration object controlling the schema generation. - /// A new instance defining the JSON schema for . - /// One of the specified parameters is . - /// The parameter contains unsupported configuration. - public static JsonObject GetJsonSchema(this JsonSerializerOptions options, MethodBase method, JsonSchemaMapperConfiguration? configuration = null) - { - if (options is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(options)); - } - - if (method is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(method)); - } - - ValidateOptions(options); - configuration ??= JsonSchemaMapperConfiguration.Default; - - var state = new GenerationState(configuration); - string title = method.Name; - string? description = configuration.ResolveDescriptionAttributes - ? method.GetCustomAttribute()?.Description - : null; - - JsonSchemaType type = JsonSchemaType.Object; - JsonObject? paramSchemas = null; - JsonArray? requiredParams = null; - - foreach (ParameterInfo parameterInfo in method.GetParameters()) - { - if (parameterInfo.Name is null) - { - ThrowHelpers.ThrowInvalidOperationException_TrimmedMethodParameters(method); - } - - JsonTypeInfo jsonParameterInfo = options.GetTypeInfo(parameterInfo.ParameterType); - bool isNullableReferenceType = false; - string? parameterDescription = null; - bool hasDefaultValue = false; - JsonNode? defaultValue = null; - bool isRequired = false; - - ResolveParameterInfo(ref state, parameterInfo, jsonParameterInfo, ref parameterDescription, ref hasDefaultValue, ref defaultValue, ref isNullableReferenceType, ref isRequired); - - state.Push(parameterInfo.Name); - JsonObject paramSchema = MapJsonSchemaCore( - ref state, - jsonParameterInfo, - description: parameterDescription, - isNullableReferenceType: isNullableReferenceType, - hasDefaultValue: hasDefaultValue, - defaultValue: defaultValue); - - state.Pop(); - - (paramSchemas ??= new()).Add(parameterInfo.Name, paramSchema); - if (isRequired) - { - (requiredParams ??= new()).Add((JsonNode)parameterInfo.Name); - } - } - - return CreateSchemaDocument(ref state, title: title, description: description, schemaType: type, properties: paramSchemas, requiredProperties: requiredParams); - } - - public static JsonObject GetJsonSchema(this JsonSerializerOptions options, ParameterInfo parameterInfo, JsonSchemaMapperConfiguration? configuration = null) - { - if (options is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(options)); - } - - if (parameterInfo is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(parameterInfo)); - } - - ValidateOptions(options); - configuration ??= JsonSchemaMapperConfiguration.Default; - - var state = new GenerationState(configuration); - - if (parameterInfo.Name is null) - { - throw new InvalidOperationException("Unexpected parameter info."); - } - - JsonTypeInfo jsonParameterInfo = options.GetTypeInfo(parameterInfo.ParameterType); - bool isNullableReferenceType = false; - string? parameterDescription = null; - bool hasDefaultValue = false; - JsonNode? defaultValue = null; - bool isRequired = false; - - ResolveParameterInfo(ref state, parameterInfo, jsonParameterInfo, ref parameterDescription, ref hasDefaultValue, ref defaultValue, ref isNullableReferenceType, ref isRequired); - - return MapJsonSchemaCore( - ref state, - jsonParameterInfo, - description: parameterDescription, - isNullableReferenceType: isNullableReferenceType, - hasDefaultValue: hasDefaultValue, - parentParameterInfo: parameterInfo, - defaultValue: defaultValue); - - } - - /// - /// Generates a JSON schema corresponding to the specified contract metadata. - /// - /// The contract metadata for which to generate the schema. - /// The configuration object controlling the schema generation. - /// A new instance defining the JSON schema for . - /// One of the specified parameters is . - /// The parameter contains unsupported configuration. - public static JsonObject GetJsonSchema(this JsonTypeInfo typeInfo, JsonSchemaMapperConfiguration? configuration = null) - { - if (typeInfo is null) - { - ThrowHelpers.ThrowArgumentNullException(nameof(typeInfo)); - } - - ValidateOptions(typeInfo.Options); - typeInfo.MakeReadOnly(); - - var state = new GenerationState(configuration ?? JsonSchemaMapperConfiguration.Default); - return MapJsonSchemaCore(ref state, typeInfo); - } - - /// - /// Renders the specified instance as a JSON string. - /// - /// The node to serialize. - /// Whether to indent the resultant JSON text. - /// The JSON node rendered as a JSON string. - public static string ToJsonString(this JsonNode? node, bool writeIndented = false) - { - return node is null - ? "null" - : node.ToJsonString(writeIndented ? new JsonSerializerOptions { WriteIndented = true } : null); - } - - private static JsonObject MapJsonSchemaCore( - ref GenerationState state, - JsonTypeInfo typeInfo, - Type? parentType = null, - JsonPropertyInfo? parentPropertyInfo = null, - ParameterInfo? parentParameterInfo = null, - string? description = null, - bool isNullableReferenceType = false, - bool isNullableOfTElement = false, - JsonConverter? customConverter = null, - JsonNumberHandling? customNumberHandling = null, - bool hasDefaultValue = false, - JsonNode? defaultValue = null, - Type? parentPolymorphicType = null, - KeyValuePair? typeDiscriminator = null) - { - Debug.Assert(typeInfo.IsReadOnly); - - Type type = typeInfo.Type; - JsonConverter effectiveConverter = customConverter ?? typeInfo.Converter; - JsonNumberHandling? effectiveNumberHandling = customNumberHandling ?? typeInfo.NumberHandling; - bool canCacheResult = - description is null && - !hasDefaultValue && - !isNullableOfTElement && - parentPolymorphicType != type && - typeDiscriminator is null && - typeInfo.Kind != JsonTypeInfoKind.None; - - if (canCacheResult && state.GetOrAddSchemaPointer(type, customConverter, isNullableReferenceType, effectiveNumberHandling) is string existingPointer) - { - // Schema for type has already been generated, return a reference to it. - // For derived types using discriminators, the schema is generated inline. - return new JsonObject { [RefPropertyName] = existingPointer }; - } - - if (state.Configuration.ResolveDescriptionAttributes) - { - description ??= type.GetCustomAttribute()?.Description; - } - - JsonObject schema; - JsonSchemaType schemaType = JsonSchemaType.Any; - string? format = null; - string? pattern = null; - JsonObject? properties = null; - JsonArray? requiredProperties = null; - JsonObject? arrayItems = null; - JsonNode? additionalProperties = null; - JsonArray? enumValues = null; - JsonArray? anyOfSchema = null; - - if (!IsBuiltInConverter(effectiveConverter)) - { - // We can't make any schema determinations if a custom converter is used. - goto ConstructSchemaDocument; - } - - if (Nullable.GetUnderlyingType(type) is Type nullableElementType) - { - JsonTypeInfo? nullableElementTypeInfo = typeInfo.Options.GetTypeInfo(nullableElementType); - customConverter = ExtractCustomNullableConverter(customConverter); - schema = MapJsonSchemaCore( - ref state, - nullableElementTypeInfo, - parentType, - parentPropertyInfo, - parentParameterInfo, - description: description, - hasDefaultValue: hasDefaultValue, - defaultValue: defaultValue, - customNumberHandling: effectiveNumberHandling, - customConverter: customConverter, - isNullableOfTElement: true); - - state.HandleGenerationCallback(schema, typeInfo, parentType, parentPropertyInfo, parentParameterInfo); - return schema; - } - - if (parentPolymorphicType is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions) - { - // This is the base type of a polymorphic type hierarchy. The schema for this type - // will include an "anyOf" property with the schemas for all derived types. - - string typeDiscriminatorKey = polyOptions.TypeDiscriminatorPropertyName; - List derivedTypes = polyOptions.DerivedTypes.ToList(); - - if (!type.IsAbstract && !derivedTypes.Any(derived => derived.DerivedType == type)) - { - // For non-abstract base types that haven't been explicitly configured, - // add a trivial schema to the derived types since we should support it. - derivedTypes.Add(new JsonDerivedType(type)); - } - - state.Push(AnyOfPropertyName); - anyOfSchema = new JsonArray(); - - int i = 0; - foreach (JsonDerivedType derivedType in derivedTypes) - { - Debug.Assert(derivedType.TypeDiscriminator is null or int or string); - - KeyValuePair? derivedTypeDiscriminator = null; - if (derivedType.TypeDiscriminator is { } discriminatorValue) - { - JsonNode discriminatorNodeValue = discriminatorValue is string stringId - ? (JsonNode)stringId - : (JsonNode)(int)discriminatorValue; - - var typeDiscriminatorPropertySchema = new JsonObject { [ConstPropertyName] = discriminatorNodeValue }; - derivedTypeDiscriminator = new(typeDiscriminatorKey, typeDiscriminatorPropertySchema); - } - - JsonTypeInfo derivedTypeInfo = typeInfo.Options.GetTypeInfo(derivedType.DerivedType); - - state.Push(i++.ToString(CultureInfo.InvariantCulture)); - JsonObject derivedSchema = MapJsonSchemaCore( - ref state, - derivedTypeInfo, - parentPolymorphicType: type, - typeDiscriminator: derivedTypeDiscriminator); - - anyOfSchema.Add((JsonNode)derivedSchema); - state.Pop(); - } - - state.Pop(); - goto ConstructSchemaDocument; - } - - switch (typeInfo.Kind) - { - case JsonTypeInfoKind.None: - if (s_simpleTypeInfo.TryGetValue(type, out SimpleTypeJsonSchema simpleTypeInfo)) - { - schemaType = simpleTypeInfo.SchemaType; - format = simpleTypeInfo.Format; - pattern = simpleTypeInfo.Pattern; - - if (effectiveNumberHandling is JsonNumberHandling numberHandling && - schemaType is JsonSchemaType.Integer or JsonSchemaType.Number) - { - if ((numberHandling & (JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)) != 0) - { - schemaType |= JsonSchemaType.String; - } - else if (numberHandling is JsonNumberHandling.AllowNamedFloatingPointLiterals && simpleTypeInfo.IsIeeeFloatingPoint) - { - anyOfSchema = new JsonArray - { - (JsonNode)new JsonObject { [TypePropertyName] = MapSchemaType(schemaType) }, - (JsonNode)new JsonObject - { - [EnumPropertyName] = new JsonArray { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" }, - }, - }; - - schemaType = JsonSchemaType.Any; // reset the parent setting - } - } - } - else if (type.IsEnum) - { - if (TryGetStringEnumConverterValues(typeInfo, effectiveConverter, out JsonArray? values)) - { - if (values is null) - { - // enum declared with the flags attribute -- do not surface enum values in the JSON schema. - schemaType = JsonSchemaType.String; - } - else - { - if (isNullableOfTElement) - { - // We're generating the schema for a nullable - // enum type. Append null to the "enum" array. - values.Add(null); - } - - enumValues = values; - } - } - else - { - schemaType = JsonSchemaType.Integer; - } - } - - break; - - case JsonTypeInfoKind.Object: - schemaType = JsonSchemaType.Object; - - if (typeInfo.UnmappedMemberHandling is JsonUnmappedMemberHandling.Disallow) - { - // Disallow unspecified properties. - additionalProperties = false; - } - - if (typeDiscriminator.HasValue) - { - (properties ??= new()).Add(typeDiscriminator.Value); - (requiredProperties ??= new()).Add((JsonNode)typeDiscriminator.Value.Key); - } - - Func parameterInfoMapper = ResolveJsonConstructorParameterMapper(typeInfo); - - state.Push(PropertiesPropertyName); - foreach (JsonPropertyInfo property in typeInfo.Properties) - { - if (property is { Get: null, Set: null } - or { IsExtensionData: true }) - { - continue; // Skip [JsonIgnore] property or extension data properties. - } - - JsonNumberHandling? propertyNumberHandling = property.NumberHandling ?? effectiveNumberHandling; - JsonTypeInfo propertyTypeInfo = typeInfo.Options.GetTypeInfo(property.PropertyType); - - // Only resolve nullability metadata for reference types. - NullabilityInfoContext? nullabilityCtx = !property.PropertyType.IsValueType ? state.NullabilityInfoContext : null; - - // Only resolve the attribute provider if needed. - ICustomAttributeProvider? attributeProvider = state.Configuration.ResolveDescriptionAttributes || nullabilityCtx != null - ? ResolveAttributeProvider(typeInfo.Type, property) - : null; - - // Resolve property-level description attributes. - string? propertyDescription = state.Configuration.ResolveDescriptionAttributes - ? attributeProvider?.GetCustomAttributes(inherit: true).OfType().FirstOrDefault()?.Description - : null; - - // Declare the property as nullable if either getter or setter are nullable. - bool isPropertyNullableReferenceType = nullabilityCtx != null && attributeProvider is MemberInfo memberInfo - ? nullabilityCtx.GetMemberNullability(memberInfo) is { WriteState: NullabilityState.Nullable } or { ReadState: NullabilityState.Nullable } - : false; - - bool isRequired = property.IsRequired; - bool propertyHasDefaultValue = false; - JsonNode? propertyDefaultValue = null; - - ParameterInfo? ctorParameterInfo = parameterInfoMapper(property); - if (ctorParameterInfo != null) - { - ResolveParameterInfo( - ref state, - ctorParameterInfo, - propertyTypeInfo, - ref propertyDescription, - ref propertyHasDefaultValue, - ref propertyDefaultValue, - ref isPropertyNullableReferenceType, - ref isRequired); - } - - state.Push(property.Name); - JsonObject propertySchema = MapJsonSchemaCore( - ref state, - propertyTypeInfo, - parentType: type, - property, - ctorParameterInfo, - description: propertyDescription, - isNullableReferenceType: isPropertyNullableReferenceType, - customConverter: property.CustomConverter, - hasDefaultValue: propertyHasDefaultValue, - defaultValue: propertyDefaultValue, - customNumberHandling: propertyNumberHandling); - - state.Pop(); - - (properties ??= new()).Add(property.Name, propertySchema); - - if (isRequired) - { - (requiredProperties ??= new()).Add((JsonNode)property.Name); - } - } - - state.Pop(); - break; - - case JsonTypeInfoKind.Enumerable: - Type elementType = GetElementType(typeInfo); - JsonTypeInfo elementTypeInfo = typeInfo.Options.GetTypeInfo(elementType); - - if (typeDiscriminator is null) - { - schemaType = JsonSchemaType.Array; - - state.Push(ItemsPropertyName); - arrayItems = MapJsonSchemaCore(ref state, elementTypeInfo); - state.Pop(); - } - else - { - // Polymorphic enumerable types are represented using a wrapping object: - // { "$type" : "discriminator", "$values" : [element1, element2, ...] } - // Which corresponds to the schema - // { "properties" : { "$type" : { "const" : "discriminator" }, "$values" : { "type" : "array", "items" : { ... } } } } - - schemaType = JsonSchemaType.Object; - (properties ??= new()).Add(typeDiscriminator.Value); - (requiredProperties ??= new()).Add((JsonNode)typeDiscriminator.Value.Key); - - state.Push(PropertiesPropertyName); - state.Push(StjValuesMetadataProperty); - state.Push(ItemsPropertyName); - JsonObject elementSchema = MapJsonSchemaCore(ref state, elementTypeInfo, parentType, parentPropertyInfo, parentParameterInfo); - state.Pop(); - state.Pop(); - state.Pop(); - - properties.Add( - StjValuesMetadataProperty, - new JsonObject - { - [TypePropertyName] = MapSchemaType(JsonSchemaType.Array), - [ItemsPropertyName] = elementSchema, - }); - } - - break; - - case JsonTypeInfoKind.Dictionary: - schemaType = JsonSchemaType.Object; - Type valueType = GetElementType(typeInfo); - JsonTypeInfo valueTypeInfo = typeInfo.Options.GetTypeInfo(valueType); - - if (typeDiscriminator.HasValue) - { - (properties ??= new()).Add(typeDiscriminator.Value); - (requiredProperties ??= new()).Add((JsonNode)typeDiscriminator.Value.Key); - } - - state.Push(AdditionalPropertiesPropertyName); - additionalProperties = MapJsonSchemaCore(ref state, valueTypeInfo, parentType, parentPropertyInfo, parentParameterInfo); - state.Pop(); - break; - - default: - Debug.Fail("Unreachable code"); - break; - } - - if (schemaType != JsonSchemaType.Any && - (type.IsValueType - ? isNullableOfTElement - : (isNullableReferenceType || state.Configuration.ReferenceTypeNullability is ReferenceTypeNullability.AlwaysNullable))) - { - // Append "null" to the type array in the following cases: - // 1. The type is a nullable value type or - // 2. The type has been inferred to be a nullable reference type annotation or - // 3. The schema generator has been configured to always emit null for reference types (default STJ semantics). - schemaType |= JsonSchemaType.Null; - } - - ConstructSchemaDocument: - schema = CreateSchemaDocument( - ref state, - description: description, - schemaType: schemaType, - format: format, - pattern: pattern, - properties: properties, - requiredProperties: requiredProperties, - arrayItems: arrayItems, - additionalProperties: additionalProperties, - enumValues: enumValues, - anyOfSchema: anyOfSchema, - hasDefaultValue: hasDefaultValue, - defaultValue: defaultValue); - - state.HandleGenerationCallback(schema, typeInfo, parentType, parentPropertyInfo, parentParameterInfo); - return schema; - } - - private static void ResolveParameterInfo( - ref GenerationState state, - ParameterInfo parameter, - JsonTypeInfo parameterTypeInfo, - ref string? description, - ref bool hasDefaultValue, - ref JsonNode? defaultValue, - ref bool isNullableReferenceType, - ref bool isRequired) - { - Debug.Assert(parameterTypeInfo.Type == parameter.ParameterType); - - if (state.Configuration.ResolveDescriptionAttributes) - { - // Resolve parameter-level description attributes. - description ??= parameter.GetCustomAttribute()?.Description; - } - - if (!isNullableReferenceType && state.NullabilityInfoContext is { } ctx) - { - // Consult the nullability annotation of the constructor parameter if available. - isNullableReferenceType = ctx.GetParameterNullability(parameter) is NullabilityState.Nullable; - } - - if (parameter.HasDefaultValue) - { - // Append the default value to the description. - object? defaultVal = parameter.GetNormalizedDefaultValue(); - defaultValue = JsonSerializer.SerializeToNode(defaultVal, parameterTypeInfo); - hasDefaultValue = true; - } - else if (state.Configuration.RequireConstructorParameters) - { - // Parameter is not optional, mark as required. - isRequired = true; - } - } - - private ref struct GenerationState - { - private readonly JsonSchemaMapperConfiguration _configuration; - private readonly NullabilityInfoContext? _nullabilityInfoContext; - private readonly Dictionary<(Type, JsonConverter? CustomConverter, bool IsNullableReferenceType, JsonNumberHandling? CustomNumberHandling), string>? _generatedTypePaths; - private readonly List? _currentPath; - private int _currentDepth; - - public GenerationState(JsonSchemaMapperConfiguration configuration) - { - _configuration = configuration; - _nullabilityInfoContext = configuration.ReferenceTypeNullability is ReferenceTypeNullability.Annotated ? new() : null; - _generatedTypePaths = configuration.AllowSchemaReferences ? new() : null; - _currentPath = configuration.AllowSchemaReferences ? new() : null; - _currentDepth = 0; - } - - public readonly JsonSchemaMapperConfiguration Configuration => _configuration; - public readonly NullabilityInfoContext? NullabilityInfoContext => _nullabilityInfoContext; - public readonly int CurrentDepth => _currentDepth; - - public void Push(string nodeId) - { - if (_currentDepth == Configuration.MaxDepth) - { - ThrowHelpers.ThrowInvalidOperationException_MaxDepthReached(); - } - - _currentDepth++; - - if (Configuration.AllowSchemaReferences) - { - Debug.Assert(_currentPath != null); - _currentPath!.Add(nodeId); - } - } - - public void Pop() - { - Debug.Assert(_currentDepth > 0); - _currentDepth--; - - if (Configuration.AllowSchemaReferences) - { - Debug.Assert(_currentPath != null); - _currentPath!.RemoveAt(_currentPath.Count - 1); - } - } - - /// - /// For a type with a given configuration, either return a JSON pointer value - /// if already generated or register the current path for later reference. - /// - public readonly string? GetOrAddSchemaPointer(Type type, JsonConverter? converter, bool isNullableReferenceType, JsonNumberHandling? numberHandling) - { - if (Configuration.AllowSchemaReferences) - { - Debug.Assert(_currentPath != null); - Debug.Assert(_generatedTypePaths != null); - - var key = (type, converter, isNullableReferenceType, numberHandling); -#if NETCOREAPP - ref string? pointer = ref CollectionsMarshal.GetValueRefOrAddDefault(_generatedTypePaths, key, out bool exists); -#else - bool exists = _generatedTypePaths!.TryGetValue(key, out string? pointer); -#endif - if (exists) - { - return pointer; - } - else - { - pointer = _currentDepth == 0 ? "#" : "#/" + string.Join("/", _currentPath); -#if !NETCOREAPP - _generatedTypePaths.Add(key, pointer); -#endif - } - } - - return null; - } - - public readonly void HandleGenerationCallback(JsonObject schema, JsonTypeInfo typeInfo, Type? parentType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo) - { - if (Configuration.OnSchemaGenerated is { } callback) - { - var ctx = new JsonSchemaGenerationContext(typeInfo, parentType, propertyInfo, parameterInfo); - callback(ctx, schema); - } - } - } - - private static JsonObject CreateSchemaDocument( - ref GenerationState state, - string? title = null, - string? description = null, - JsonSchemaType schemaType = JsonSchemaType.Any, - string? format = null, - string? pattern = null, - JsonObject? properties = null, - JsonArray? requiredProperties = null, - JsonObject? arrayItems = null, - JsonNode? additionalProperties = null, - JsonArray? enumValues = null, - JsonArray? anyOfSchema = null, - bool hasDefaultValue = false, - JsonNode? defaultValue = null) - { - var schema = new JsonObject(); - - if (state.CurrentDepth == 0 && state.Configuration.IncludeSchemaVersion) - { - schema.Add(SchemaPropertyName, SchemaVersion); - } - - if (title is not null) - { - schema.Add(TitlePropertyName, title); - } - - if (description is not null) - { - schema.Add(DescriptionPropertyName, description); - } - - if (MapSchemaType(schemaType) is JsonNode type) - { - schema.Add(TypePropertyName, type); - } - - if (format is not null) - { - schema.Add(FormatPropertyName, format); - } - - if (pattern is not null) - { - schema.Add(PatternPropertyName, pattern); - } - - if (properties is not null) - { - schema.Add(PropertiesPropertyName, properties); - } - - if (requiredProperties is not null) - { - schema.Add(RequiredPropertyName, requiredProperties); - } - - if (arrayItems is not null) - { - schema.Add(ItemsPropertyName, arrayItems); - } - - if (additionalProperties is not null) - { - schema.Add(AdditionalPropertiesPropertyName, additionalProperties); - } - - if (enumValues is not null) - { - schema.Add(EnumPropertyName, enumValues); - } - - if (anyOfSchema is not null) - { - schema.Add(AnyOfPropertyName, anyOfSchema); - } - - if (hasDefaultValue) - { - schema.Add(DefaultPropertyName, defaultValue); - } - - return schema; - } - - [Flags] - private enum JsonSchemaType - { - Any = 0, // No type declared on the schema - Null = 1, - Boolean = 2, - Integer = 4, - Number = 8, - String = 16, - Array = 32, - Object = 64, - } - - private static readonly JsonSchemaType[] s_schemaValues = new[] - { - // NB the order of these values influences order of types in the rendered schema - JsonSchemaType.String, - JsonSchemaType.Integer, - JsonSchemaType.Number, - JsonSchemaType.Boolean, - JsonSchemaType.Array, - JsonSchemaType.Object, - JsonSchemaType.Null, - }; - - private static JsonNode? MapSchemaType(JsonSchemaType schemaType) - { - return schemaType switch - { - JsonSchemaType.Any => null, - JsonSchemaType.Null => "null", - JsonSchemaType.Boolean => "boolean", - JsonSchemaType.Integer => "integer", - JsonSchemaType.Number => "number", - JsonSchemaType.String => "string", - JsonSchemaType.Array => "array", - JsonSchemaType.Object => "object", - _ => MapCompositeSchemaType(schemaType), - }; - - static JsonArray MapCompositeSchemaType(JsonSchemaType schemaType) - { - var array = new JsonArray(); - foreach (JsonSchemaType type in s_schemaValues) - { - if ((schemaType & type) != 0) - { - array.Add(MapSchemaType(type)); - } - } - - return array; - } - } - - private const string SchemaPropertyName = "$schema"; - private const string RefPropertyName = "$ref"; - private const string TitlePropertyName = "title"; - private const string DescriptionPropertyName = "description"; - private const string TypePropertyName = "type"; - private const string FormatPropertyName = "format"; - private const string PatternPropertyName = "pattern"; - private const string PropertiesPropertyName = "properties"; - private const string RequiredPropertyName = "required"; - private const string ItemsPropertyName = "items"; - private const string AdditionalPropertiesPropertyName = "additionalProperties"; - private const string EnumPropertyName = "enum"; - private const string AnyOfPropertyName = "anyOf"; - private const string ConstPropertyName = "const"; - private const string DefaultPropertyName = "default"; - private const string StjValuesMetadataProperty = "$values"; - - private readonly struct SimpleTypeJsonSchema - { - public SimpleTypeJsonSchema(JsonSchemaType schemaType, string? format = null, string? pattern = null, bool isIeeeFloatingPoint = false) - { - SchemaType = schemaType; - Format = format; - Pattern = pattern; - IsIeeeFloatingPoint = isIeeeFloatingPoint; - } - - public JsonSchemaType SchemaType { get; } - public string? Format { get; } - public string? Pattern { get; } - public bool IsIeeeFloatingPoint { get; } - } - - private static readonly Dictionary s_simpleTypeInfo = new() - { - [typeof(object)] = new(JsonSchemaType.Any), - [typeof(bool)] = new(JsonSchemaType.Boolean), - [typeof(byte)] = new(JsonSchemaType.Integer), - [typeof(ushort)] = new(JsonSchemaType.Integer), - [typeof(uint)] = new(JsonSchemaType.Integer), - [typeof(ulong)] = new(JsonSchemaType.Integer), - [typeof(sbyte)] = new(JsonSchemaType.Integer), - [typeof(short)] = new(JsonSchemaType.Integer), - [typeof(int)] = new(JsonSchemaType.Integer), - [typeof(long)] = new(JsonSchemaType.Integer), - [typeof(float)] = new(JsonSchemaType.Number, isIeeeFloatingPoint: true), - [typeof(double)] = new(JsonSchemaType.Number, isIeeeFloatingPoint: true), - [typeof(decimal)] = new(JsonSchemaType.Number), -#if NET6_0_OR_GREATER - [typeof(Half)] = new(JsonSchemaType.Number, isIeeeFloatingPoint: true), -#endif -#if NET7_0_OR_GREATER - [typeof(UInt128)] = new(JsonSchemaType.Integer), - [typeof(Int128)] = new(JsonSchemaType.Integer), -#endif - [typeof(char)] = new(JsonSchemaType.String), - [typeof(string)] = new(JsonSchemaType.String), - [typeof(byte[])] = new(JsonSchemaType.String), - [typeof(Memory)] = new(JsonSchemaType.String), - [typeof(ReadOnlyMemory)] = new(JsonSchemaType.String), - [typeof(DateTime)] = new(JsonSchemaType.String, format: "date-time"), - [typeof(DateTimeOffset)] = new(JsonSchemaType.String, format: "date-time"), - - // TimeSpan is represented as a string in the format "[-][d.]hh:mm:ss[.fffffff]". - [typeof(TimeSpan)] = new(JsonSchemaType.String, pattern: @"^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$"), -#if NET6_0_OR_GREATER - [typeof(DateOnly)] = new(JsonSchemaType.String, format: "date"), - [typeof(TimeOnly)] = new(JsonSchemaType.String, format: "time"), -#endif - [typeof(Guid)] = new(JsonSchemaType.String, format: "uuid"), - [typeof(Uri)] = new(JsonSchemaType.String, format: "uri"), - [typeof(Version)] = new(JsonSchemaType.String, format: @"^\d+(\.\d+){1,3}$"), - [typeof(JsonDocument)] = new(JsonSchemaType.Any), - [typeof(JsonElement)] = new(JsonSchemaType.Any), - [typeof(JsonNode)] = new(JsonSchemaType.Any), - [typeof(JsonValue)] = new(JsonSchemaType.Any), - [typeof(JsonObject)] = new(JsonSchemaType.Object), - [typeof(JsonArray)] = new(JsonSchemaType.Array), - }; - - private static void ValidateOptions(JsonSerializerOptions options) - { - if (options.ReferenceHandler == ReferenceHandler.Preserve) - { - ThrowHelpers.ThrowNotSupportedException_ReferenceHandlerPreserveNotSupported(); - } - - options.MakeReadOnly(); - } - - private static class ThrowHelpers - { - [DoesNotReturn] - public static void ThrowArgumentNullException(string name) => throw new ArgumentNullException(name); - - [DoesNotReturn] - public static void ThrowNotSupportedException_ReferenceHandlerPreserveNotSupported() => - throw new NotSupportedException("Schema generation not supported with ReferenceHandler.Preserve enabled."); - - [DoesNotReturn] - public static void ThrowInvalidOperationException_TrimmedMethodParameters(MethodBase method) => - throw new InvalidOperationException($"The parameters for method '{method}' have been trimmed away."); - - [DoesNotReturn] - public static void ThrowInvalidOperationException_MaxDepthReached() => - throw new InvalidOperationException("The maximum depth of the schema has been reached."); - } -} diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapperConfiguration.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapperConfiguration.cs deleted file mode 100644 index 32b09fad2050..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/JsonSchemaMapperConfiguration.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.ComponentModel; -using System.Text.Json.Nodes; - -namespace JsonSchemaMapper; - -/// -/// Controls the behavior of the class. -/// -#if EXPOSE_JSON_SCHEMA_MAPPER -public -#else -internal -#endif - class JsonSchemaMapperConfiguration -{ - /// - /// Gets the default configuration object used by . - /// - public static JsonSchemaMapperConfiguration Default { get; } = new(); - - private readonly int _maxDepth = 64; - - /// - /// Determines whether schema references using JSON pointers should be generated for repeated complex types. - /// - /// - /// Defaults to . Should be left enabled if recursive types (e.g. trees, linked lists) are expected. - /// - public bool AllowSchemaReferences { get; init; } = true; - - /// - /// Determines whether the '$schema' property should be included in the root schema document. - /// - /// - /// Defaults to true. - /// - public bool IncludeSchemaVersion { get; init; } = true; - - /// - /// Determines whether the should be resolved for types and properties. - /// - /// - /// Defaults to true. - /// - public bool ResolveDescriptionAttributes { get; init; } = true; - - /// - /// Determines the nullability behavior of reference types in the generated schema. - /// - /// - /// Defaults to . Currently JsonSerializer - /// doesn't recognize non-nullable reference types (https://github.com/dotnet/runtime/issues/1256) - /// so the serializer will always treat them as nullable. Setting to - /// improves accuracy of the generated schema with respect to the actual serialization behavior but can result in more noise. - /// - public ReferenceTypeNullability ReferenceTypeNullability { get; init; } = ReferenceTypeNullability.Annotated; - - /// - /// Determines whether properties bound to non-optional constructor parameters should be flagged as required. - /// - /// - /// Defaults to true. Current STJ treats all constructor parameters as optional - /// (https://github.com/dotnet/runtime/issues/100075) so disabling this option - /// will generate schemas that are more compatible with the actual serialization behavior. - /// - public bool RequireConstructorParameters { get; init; } = true; - - /// - /// Defines a callback that is invoked for every schema that is generated within the type graph. - /// - public Action? OnSchemaGenerated { get; init; } - - /// - /// Determines the maximum permitted depth when traversing the generated type graph. - /// - /// Thrown when the value is less than 0. - /// - /// Defaults to 64. - /// - public int MaxDepth - { - get => _maxDepth; - init - { - if (value < 0) - { - Throw(); - static void Throw() => throw new ArgumentOutOfRangeException(nameof(value)); - } - - _maxDepth = value; - } - } -} diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfo.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfo.cs deleted file mode 100644 index 9d39a80325c5..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#if !NET6_0_OR_GREATER -using System.Diagnostics.CodeAnalysis; - -namespace System.Reflection -{ - /// - /// A class that represents nullability info. - /// - [ExcludeFromCodeCoverage] - internal sealed class NullabilityInfo - { - internal NullabilityInfo(Type type, NullabilityState readState, NullabilityState writeState, - NullabilityInfo? elementType, NullabilityInfo[] typeArguments) - { - Type = type; - ReadState = readState; - WriteState = writeState; - ElementType = elementType; - GenericTypeArguments = typeArguments; - } - - /// - /// The of the member or generic parameter - /// to which this NullabilityInfo belongs. - /// - public Type Type { get; } - - /// - /// The nullability read state of the member. - /// - public NullabilityState ReadState { get; internal set; } - - /// - /// The nullability write state of the member. - /// - public NullabilityState WriteState { get; internal set; } - - /// - /// If the member type is an array, gives the of the elements of the array, null otherwise. - /// - public NullabilityInfo? ElementType { get; } - - /// - /// If the member type is a generic type, gives the array of for each type parameter. - /// - public NullabilityInfo[] GenericTypeArguments { get; } - } - - /// - /// An enum that represents nullability state. - /// - internal enum NullabilityState - { - /// - /// Nullability context not enabled (oblivious) - /// - Unknown, - - /// - /// Non nullable value or reference type - /// - NotNull, - - /// - /// Nullable value or reference type - /// - Nullable, - } -} -#endif \ No newline at end of file diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoContext.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoContext.cs deleted file mode 100644 index aa332afc1aa4..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoContext.cs +++ /dev/null @@ -1,667 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#if !NET6_0_OR_GREATER -namespace System.Reflection -{ - /// - /// Provides APIs for populating nullability information/context from reflection members: - /// , , and . - /// - [ExcludeFromCodeCoverage] - internal sealed class NullabilityInfoContext - { - private const string CompilerServicesNameSpace = "System.Runtime.CompilerServices"; - private readonly Dictionary _publicOnlyModules = new(); - private readonly Dictionary _context = new(); - - internal static bool IsSupported { get; } = - AppContext.TryGetSwitch("System.Reflection.NullabilityInfoContext.IsSupported", out bool isSupported) ? isSupported : true; - - [Flags] - private enum NotAnnotatedStatus - { - None = 0x0, // no restriction, all members annotated - Private = 0x1, // private members not annotated - Internal = 0x2, // internal members not annotated - } - - private NullabilityState? GetNullableContext(MemberInfo? memberInfo) - { - while (memberInfo != null) - { - if (_context.TryGetValue(memberInfo, out NullabilityState state)) - { - return state; - } - - foreach (CustomAttributeData attribute in memberInfo.GetCustomAttributesData()) - { - if (attribute.AttributeType.Name == "NullableContextAttribute" && - attribute.AttributeType.Namespace == CompilerServicesNameSpace && - attribute.ConstructorArguments.Count == 1) - { - state = TranslateByte(attribute.ConstructorArguments[0].Value); - _context.Add(memberInfo, state); - return state; - } - } - - memberInfo = memberInfo.DeclaringType; - } - - return null; - } - - /// - /// Populates for the given . - /// If the nullablePublicOnly feature is set for an assembly, like it does in .NET SDK, the private and/or internal member's - /// nullability attributes are omitted, in this case the API will return NullabilityState.Unknown state. - /// - /// The parameter which nullability info gets populated. - /// If the parameterInfo parameter is null. - /// . - public NullabilityInfo Create(ParameterInfo parameterInfo) - { - EnsureIsSupported(); - - IList attributes = parameterInfo.GetCustomAttributesData(); - NullableAttributeStateParser parser = parameterInfo.Member is MethodBase method && IsPrivateOrInternalMethodAndAnnotationDisabled(method) - ? NullableAttributeStateParser.Unknown - : CreateParser(attributes); - NullabilityInfo nullability = GetNullabilityInfo(parameterInfo.Member, parameterInfo.ParameterType, parser); - - if (nullability.ReadState != NullabilityState.Unknown) - { - CheckParameterMetadataType(parameterInfo, nullability); - } - - CheckNullabilityAttributes(nullability, attributes); - return nullability; - } - - private void CheckParameterMetadataType(ParameterInfo parameter, NullabilityInfo nullability) - { - ParameterInfo? metaParameter; - MemberInfo metaMember; - - switch (parameter.Member) - { - case ConstructorInfo ctor: - var metaCtor = (ConstructorInfo)GetMemberMetadataDefinition(ctor); - metaMember = metaCtor; - metaParameter = GetMetaParameter(metaCtor, parameter); - break; - - case MethodInfo method: - MethodInfo metaMethod = GetMethodMetadataDefinition(method); - metaMember = metaMethod; - metaParameter = string.IsNullOrEmpty(parameter.Name) ? metaMethod.ReturnParameter : GetMetaParameter(metaMethod, parameter); - break; - - default: - return; - } - - if (metaParameter != null) - { - CheckGenericParameters(nullability, metaMember, metaParameter.ParameterType, parameter.Member.ReflectedType); - } - } - - private static ParameterInfo? GetMetaParameter(MethodBase metaMethod, ParameterInfo parameter) - { - var parameters = metaMethod.GetParameters(); - for (int i = 0; i < parameters.Length; i++) - { - if (parameter.Position == i && - parameter.Name == parameters[i].Name) - { - return parameters[i]; - } - } - - return null; - } - - private static MethodInfo GetMethodMetadataDefinition(MethodInfo method) - { - if (method.IsGenericMethod && !method.IsGenericMethodDefinition) - { - method = method.GetGenericMethodDefinition(); - } - - return (MethodInfo)GetMemberMetadataDefinition(method); - } - - private static void CheckNullabilityAttributes(NullabilityInfo nullability, IList attributes) - { - var codeAnalysisReadState = NullabilityState.Unknown; - var codeAnalysisWriteState = NullabilityState.Unknown; - - foreach (CustomAttributeData attribute in attributes) - { - if (attribute.AttributeType.Namespace == "System.Diagnostics.CodeAnalysis") - { - if (attribute.AttributeType.Name == "NotNullAttribute") - { - codeAnalysisReadState = NullabilityState.NotNull; - } - else if ((attribute.AttributeType.Name == "MaybeNullAttribute" || - attribute.AttributeType.Name == "MaybeNullWhenAttribute") && - codeAnalysisReadState == NullabilityState.Unknown && - !IsValueTypeOrValueTypeByRef(nullability.Type)) - { - codeAnalysisReadState = NullabilityState.Nullable; - } - else if (attribute.AttributeType.Name == "DisallowNullAttribute") - { - codeAnalysisWriteState = NullabilityState.NotNull; - } - else if (attribute.AttributeType.Name == "AllowNullAttribute" && - codeAnalysisWriteState == NullabilityState.Unknown && - !IsValueTypeOrValueTypeByRef(nullability.Type)) - { - codeAnalysisWriteState = NullabilityState.Nullable; - } - } - } - - if (codeAnalysisReadState != NullabilityState.Unknown) - { - nullability.ReadState = codeAnalysisReadState; - } - - if (codeAnalysisWriteState != NullabilityState.Unknown) - { - nullability.WriteState = codeAnalysisWriteState; - } - } - - /// - /// Populates for the given . - /// If the nullablePublicOnly feature is set for an assembly, like it does in .NET SDK, the private and/or internal member's - /// nullability attributes are omitted, in this case the API will return NullabilityState.Unknown state. - /// - /// The parameter which nullability info gets populated. - /// If the propertyInfo parameter is null. - /// . - public NullabilityInfo Create(PropertyInfo propertyInfo) - { - EnsureIsSupported(); - - MethodInfo? getter = propertyInfo.GetGetMethod(true); - MethodInfo? setter = propertyInfo.GetSetMethod(true); - bool annotationsDisabled = (getter == null || IsPrivateOrInternalMethodAndAnnotationDisabled(getter)) - && (setter == null || IsPrivateOrInternalMethodAndAnnotationDisabled(setter)); - NullableAttributeStateParser parser = annotationsDisabled ? NullableAttributeStateParser.Unknown : CreateParser(propertyInfo.GetCustomAttributesData()); - NullabilityInfo nullability = GetNullabilityInfo(propertyInfo, propertyInfo.PropertyType, parser); - - if (getter != null) - { - CheckNullabilityAttributes(nullability, getter.ReturnParameter.GetCustomAttributesData()); - } - else - { - nullability.ReadState = NullabilityState.Unknown; - } - - if (setter != null) - { - CheckNullabilityAttributes(nullability, setter.GetParameters().Last().GetCustomAttributesData()); - } - else - { - nullability.WriteState = NullabilityState.Unknown; - } - - return nullability; - } - - private bool IsPrivateOrInternalMethodAndAnnotationDisabled(MethodBase method) - { - if ((method.IsPrivate || method.IsFamilyAndAssembly || method.IsAssembly) && - IsPublicOnly(method.IsPrivate, method.IsFamilyAndAssembly, method.IsAssembly, method.Module)) - { - return true; - } - - return false; - } - - /// - /// Populates for the given . - /// If the nullablePublicOnly feature is set for an assembly, like it does in .NET SDK, the private and/or internal member's - /// nullability attributes are omitted, in this case the API will return NullabilityState.Unknown state. - /// - /// The parameter which nullability info gets populated. - /// If the eventInfo parameter is null. - /// . - public NullabilityInfo Create(EventInfo eventInfo) - { - EnsureIsSupported(); - - return GetNullabilityInfo(eventInfo, eventInfo.EventHandlerType!, CreateParser(eventInfo.GetCustomAttributesData())); - } - - /// - /// Populates for the given - /// If the nullablePublicOnly feature is set for an assembly, like it does in .NET SDK, the private and/or internal member's - /// nullability attributes are omitted, in this case the API will return NullabilityState.Unknown state. - /// - /// The parameter which nullability info gets populated. - /// If the fieldInfo parameter is null. - /// . - public NullabilityInfo Create(FieldInfo fieldInfo) - { - EnsureIsSupported(); - - IList attributes = fieldInfo.GetCustomAttributesData(); - NullableAttributeStateParser parser = IsPrivateOrInternalFieldAndAnnotationDisabled(fieldInfo) ? NullableAttributeStateParser.Unknown : CreateParser(attributes); - NullabilityInfo nullability = GetNullabilityInfo(fieldInfo, fieldInfo.FieldType, parser); - CheckNullabilityAttributes(nullability, attributes); - return nullability; - } - - private static void EnsureIsSupported() - { - if (!IsSupported) - { - throw new InvalidOperationException("NullabilityInfoContext is not supported"); - } - } - - private bool IsPrivateOrInternalFieldAndAnnotationDisabled(FieldInfo fieldInfo) - { - if ((fieldInfo.IsPrivate || fieldInfo.IsFamilyAndAssembly || fieldInfo.IsAssembly) && - IsPublicOnly(fieldInfo.IsPrivate, fieldInfo.IsFamilyAndAssembly, fieldInfo.IsAssembly, fieldInfo.Module)) - { - return true; - } - - return false; - } - - private bool IsPublicOnly(bool isPrivate, bool isFamilyAndAssembly, bool isAssembly, Module module) - { - if (!_publicOnlyModules.TryGetValue(module, out NotAnnotatedStatus value)) - { - value = PopulateAnnotationInfo(module.GetCustomAttributesData()); - _publicOnlyModules.Add(module, value); - } - - if (value == NotAnnotatedStatus.None) - { - return false; - } - - if (((isPrivate || isFamilyAndAssembly) && value.HasFlag(NotAnnotatedStatus.Private)) || - (isAssembly && value.HasFlag(NotAnnotatedStatus.Internal))) - { - return true; - } - - return false; - } - - private static NotAnnotatedStatus PopulateAnnotationInfo(IList customAttributes) - { - foreach (CustomAttributeData attribute in customAttributes) - { - if (attribute.AttributeType.Name == "NullablePublicOnlyAttribute" && - attribute.AttributeType.Namespace == CompilerServicesNameSpace && - attribute.ConstructorArguments.Count == 1) - { - if (attribute.ConstructorArguments[0].Value is bool boolValue && boolValue) - { - return NotAnnotatedStatus.Internal | NotAnnotatedStatus.Private; - } - else - { - return NotAnnotatedStatus.Private; - } - } - } - - return NotAnnotatedStatus.None; - } - - private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser) - { - int index = 0; - NullabilityInfo nullability = GetNullabilityInfo(memberInfo, type, parser, ref index); - - if (nullability.ReadState != NullabilityState.Unknown) - { - TryLoadGenericMetaTypeNullability(memberInfo, nullability); - } - - return nullability; - } - - private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser, ref int index) - { - NullabilityState state = NullabilityState.Unknown; - NullabilityInfo? elementState = null; - NullabilityInfo[] genericArgumentsState = Array.Empty(); - Type underlyingType = type; - - if (underlyingType.IsByRef || underlyingType.IsPointer) - { - underlyingType = underlyingType.GetElementType()!; - } - - if (underlyingType.IsValueType) - { - if (Nullable.GetUnderlyingType(underlyingType) is { } nullableUnderlyingType) - { - underlyingType = nullableUnderlyingType; - state = NullabilityState.Nullable; - } - else - { - state = NullabilityState.NotNull; - } - - if (underlyingType.IsGenericType) - { - ++index; - } - } - else - { - if (!parser.ParseNullableState(index++, ref state) - && GetNullableContext(memberInfo) is { } contextState) - { - state = contextState; - } - - if (underlyingType.IsArray) - { - elementState = GetNullabilityInfo(memberInfo, underlyingType.GetElementType()!, parser, ref index); - } - } - - if (underlyingType.IsGenericType) - { - Type[] genericArguments = underlyingType.GetGenericArguments(); - genericArgumentsState = new NullabilityInfo[genericArguments.Length]; - - for (int i = 0; i < genericArguments.Length; i++) - { - genericArgumentsState[i] = GetNullabilityInfo(memberInfo, genericArguments[i], parser, ref index); - } - } - - return new NullabilityInfo(type, state, state, elementState, genericArgumentsState); - } - - private static NullableAttributeStateParser CreateParser(IList customAttributes) - { - foreach (CustomAttributeData attribute in customAttributes) - { - if (attribute.AttributeType.Name == "NullableAttribute" && - attribute.AttributeType.Namespace == CompilerServicesNameSpace && - attribute.ConstructorArguments.Count == 1) - { - return new NullableAttributeStateParser(attribute.ConstructorArguments[0].Value); - } - } - - return new NullableAttributeStateParser(null); - } - - private void TryLoadGenericMetaTypeNullability(MemberInfo memberInfo, NullabilityInfo nullability) - { - MemberInfo? metaMember = GetMemberMetadataDefinition(memberInfo); - Type? metaType = null; - if (metaMember is FieldInfo field) - { - metaType = field.FieldType; - } - else if (metaMember is PropertyInfo property) - { - metaType = GetPropertyMetaType(property); - } - - if (metaType != null) - { - CheckGenericParameters(nullability, metaMember!, metaType, memberInfo.ReflectedType); - } - } - - private static MemberInfo GetMemberMetadataDefinition(MemberInfo member) - { - Type? type = member.DeclaringType; - if ((type != null) && type.IsGenericType && !type.IsGenericTypeDefinition) - { - return NullabilityInfoHelpers.GetMemberWithSameMetadataDefinitionAs(type.GetGenericTypeDefinition(), member); - } - - return member; - } - - private static Type GetPropertyMetaType(PropertyInfo property) - { - if (property.GetGetMethod(true) is MethodInfo method) - { - return method.ReturnType; - } - - return property.GetSetMethod(true)!.GetParameters()[0].ParameterType; - } - - private void CheckGenericParameters(NullabilityInfo nullability, MemberInfo metaMember, Type metaType, Type? reflectedType) - { - if (metaType.IsGenericParameter) - { - if (nullability.ReadState == NullabilityState.NotNull) - { - TryUpdateGenericParameterNullability(nullability, metaType, reflectedType); - } - } - else if (metaType.ContainsGenericParameters) - { - if (nullability.GenericTypeArguments.Length > 0) - { - Type[] genericArguments = metaType.GetGenericArguments(); - - for (int i = 0; i < genericArguments.Length; i++) - { - CheckGenericParameters(nullability.GenericTypeArguments[i], metaMember, genericArguments[i], reflectedType); - } - } - else if (nullability.ElementType is { } elementNullability && metaType.IsArray) - { - CheckGenericParameters(elementNullability, metaMember, metaType.GetElementType()!, reflectedType); - } - - // We could also follow this branch for metaType.IsPointer, but since pointers must be unmanaged this - // will be a no-op regardless - else if (metaType.IsByRef) - { - CheckGenericParameters(nullability, metaMember, metaType.GetElementType()!, reflectedType); - } - } - } - - private bool TryUpdateGenericParameterNullability(NullabilityInfo nullability, Type genericParameter, Type? reflectedType) - { - Debug.Assert(genericParameter.IsGenericParameter); - - if (reflectedType is not null - && !genericParameter.IsGenericMethodParameter() - && TryUpdateGenericTypeParameterNullabilityFromReflectedType(nullability, genericParameter, reflectedType, reflectedType)) - { - return true; - } - - if (IsValueTypeOrValueTypeByRef(nullability.Type)) - { - return true; - } - - var state = NullabilityState.Unknown; - if (CreateParser(genericParameter.GetCustomAttributesData()).ParseNullableState(0, ref state)) - { - nullability.ReadState = state; - nullability.WriteState = state; - return true; - } - - if (GetNullableContext(genericParameter) is { } contextState) - { - nullability.ReadState = contextState; - nullability.WriteState = contextState; - return true; - } - - return false; - } - - private bool TryUpdateGenericTypeParameterNullabilityFromReflectedType(NullabilityInfo nullability, Type genericParameter, Type context, Type reflectedType) - { - Debug.Assert(genericParameter.IsGenericParameter && !genericParameter.IsGenericMethodParameter()); - - Type contextTypeDefinition = context.IsGenericType && !context.IsGenericTypeDefinition ? context.GetGenericTypeDefinition() : context; - if (genericParameter.DeclaringType == contextTypeDefinition) - { - return false; - } - - Type? baseType = contextTypeDefinition.BaseType; - if (baseType is null) - { - return false; - } - - if (!baseType.IsGenericType - || (baseType.IsGenericTypeDefinition ? baseType : baseType.GetGenericTypeDefinition()) != genericParameter.DeclaringType) - { - return TryUpdateGenericTypeParameterNullabilityFromReflectedType(nullability, genericParameter, baseType, reflectedType); - } - - Type[] genericArguments = baseType.GetGenericArguments(); - Type genericArgument = genericArguments[genericParameter.GenericParameterPosition]; - if (genericArgument.IsGenericParameter) - { - return TryUpdateGenericParameterNullability(nullability, genericArgument, reflectedType); - } - - NullableAttributeStateParser parser = CreateParser(contextTypeDefinition.GetCustomAttributesData()); - int nullabilityStateIndex = 1; // start at 1 since index 0 is the type itself - for (int i = 0; i < genericParameter.GenericParameterPosition; i++) - { - nullabilityStateIndex += CountNullabilityStates(genericArguments[i]); - } - - return TryPopulateNullabilityInfo(nullability, parser, ref nullabilityStateIndex); - - static int CountNullabilityStates(Type type) - { - Type underlyingType = Nullable.GetUnderlyingType(type) ?? type; - if (underlyingType.IsGenericType) - { - int count = 1; - foreach (Type genericArgument in underlyingType.GetGenericArguments()) - { - count += CountNullabilityStates(genericArgument); - } - - return count; - } - - if (underlyingType.HasElementType) - { - return (underlyingType.IsArray ? 1 : 0) + CountNullabilityStates(underlyingType.GetElementType()!); - } - - return type.IsValueType ? 0 : 1; - } - } - -#pragma warning disable SA1204 // Static elements should appear before instance elements - private static bool TryPopulateNullabilityInfo(NullabilityInfo nullability, NullableAttributeStateParser parser, ref int index) -#pragma warning restore SA1204 // Static elements should appear before instance elements - { - bool isValueType = IsValueTypeOrValueTypeByRef(nullability.Type); - if (!isValueType) - { - var state = NullabilityState.Unknown; - if (!parser.ParseNullableState(index, ref state)) - { - return false; - } - - nullability.ReadState = state; - nullability.WriteState = state; - } - - if (!isValueType || (Nullable.GetUnderlyingType(nullability.Type) ?? nullability.Type).IsGenericType) - { - index++; - } - - if (nullability.GenericTypeArguments.Length > 0) - { - foreach (NullabilityInfo genericTypeArgumentNullability in nullability.GenericTypeArguments) - { - TryPopulateNullabilityInfo(genericTypeArgumentNullability, parser, ref index); - } - } - else if (nullability.ElementType is { } elementTypeNullability) - { - TryPopulateNullabilityInfo(elementTypeNullability, parser, ref index); - } - - return true; - } - - private static NullabilityState TranslateByte(object? value) - { - return value is byte b ? TranslateByte(b) : NullabilityState.Unknown; - } - - private static NullabilityState TranslateByte(byte b) => - b switch - { - 1 => NullabilityState.NotNull, - 2 => NullabilityState.Nullable, - _ => NullabilityState.Unknown - }; - - private static bool IsValueTypeOrValueTypeByRef(Type type) => - type.IsValueType || ((type.IsByRef || type.IsPointer) && type.GetElementType()!.IsValueType); - - private readonly struct NullableAttributeStateParser - { - private static readonly object UnknownByte = (byte)0; - - private readonly object? _nullableAttributeArgument; - - public NullableAttributeStateParser(object? nullableAttributeArgument) - { - this._nullableAttributeArgument = nullableAttributeArgument; - } - - public static NullableAttributeStateParser Unknown => new(UnknownByte); - - public bool ParseNullableState(int index, ref NullabilityState state) - { - switch (this._nullableAttributeArgument) - { - case byte b: - state = TranslateByte(b); - return true; - case ReadOnlyCollection args - when index < args.Count && args[index].Value is byte elementB: - state = TranslateByte(elementB); - return true; - default: - return false; - } - } - } - } -} -#endif diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoHelpers.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoHelpers.cs deleted file mode 100644 index e50325bbb00a..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/NullabilityInfoHelpers.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#if !NET6_0_OR_GREATER -using System.Diagnostics.CodeAnalysis; - -namespace System.Reflection -{ - /// - /// Polyfills for System.Private.CoreLib internals. - /// - [ExcludeFromCodeCoverage] - internal static class NullabilityInfoHelpers - { - public static MemberInfo GetMemberWithSameMetadataDefinitionAs(Type type, MemberInfo member) - { - const BindingFlags all = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance; - foreach (var info in type.GetMembers(all)) - { - if (info.HasSameMetadataDefinitionAs(member)) - { - return info; - } - } - - throw new MissingMemberException(type.FullName, member.Name); - } - - // https://github.com/dotnet/runtime/blob/main/src/coreclr/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs - public static bool HasSameMetadataDefinitionAs(this MemberInfo target, MemberInfo other) - { - return target.MetadataToken == other.MetadataToken && - target.Module.Equals(other.Module); - } - - // https://github.com/dotnet/runtime/issues/23493 - public static bool IsGenericMethodParameter(this Type target) - { - return target.IsGenericParameter && - target.DeclaringMethod != null; - } - } -} -#endif \ No newline at end of file diff --git a/src/OpenApi/src/Schemas/JsonSchemaMapper/ReferenceTypeNullability.cs b/src/OpenApi/src/Schemas/JsonSchemaMapper/ReferenceTypeNullability.cs deleted file mode 100644 index d61bd4724141..000000000000 --- a/src/OpenApi/src/Schemas/JsonSchemaMapper/ReferenceTypeNullability.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace JsonSchemaMapper; - -/// -/// Controls the nullable behavior of reference types in the generated schema. -/// -#if EXPOSE_JSON_SCHEMA_MAPPER -public -#else -internal -#endif - enum ReferenceTypeNullability -{ - /// - /// Always treat reference types as nullable. Follows the built-in behavior - /// of the serializer (cf. https://github.com/dotnet/runtime/issues/1256). - /// - AlwaysNullable, - - /// - /// Treat reference types as nullable only if they are annotated with a nullable reference type modifier. - /// - Annotated, - - /// - /// Always treat reference types as non-nullable. - /// - NeverNullable, -} diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index 7e7ed1ef53a2..34987212ab95 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -1,12 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO.Pipelines; using System.Linq; +using System.Reflection; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Metadata; using Microsoft.AspNetCore.Mvc; @@ -268,7 +270,9 @@ private async Task GetResponseAsync(ApiDescription apiDescripti }, Required = IsRequired(parameter), Schema = await _componentService.GetOrCreateSchemaAsync(parameter.Type, parameter, cancellationToken), + Description = GetParameterDescriptionFromAttribute(parameter) }; + parameters ??= []; parameters.Add(openApiParameter); } @@ -284,6 +288,13 @@ private static bool IsRequired(ApiParameterDescription parameter) return parameter.Source == BindingSource.Path || parameter.IsRequired || hasRequiredAttribute; } + // Apply [Description] attributes on the parameter to the top-level OpenApiParameter object and not the schema. + private static string? GetParameterDescriptionFromAttribute(ApiParameterDescription parameter) => + parameter.ParameterDescriptor is IParameterInfoParameterDescriptor { ParameterInfo: { } parameterInfo } && + parameterInfo.GetCustomAttributes().OfType().LastOrDefault() is { } descriptionAttribute ? + descriptionAttribute.Description : + null; + private async Task GetRequestBodyAsync(ApiDescription description, CancellationToken cancellationToken) { // Only one parameter can be bound from the body in each request. @@ -447,7 +458,8 @@ private async Task GetJsonRequestBody(IList() + Content = new Dictionary(), + Description = GetParameterDescriptionFromAttribute(bodyParameter) }; foreach (var requestForm in supportedRequestFormats) diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index d51f8d32c80c..8ee0c89ec365 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -8,8 +8,8 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Nodes; +using System.Text.Json.Schema; using System.Text.Json.Serialization.Metadata; -using JsonSchemaMapper; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Json; using Microsoft.AspNetCore.Mvc.ApiExplorer; @@ -53,39 +53,54 @@ internal sealed class OpenApiSchemaService( }) }; - private readonly JsonSchemaMapperConfiguration _configuration = new() + private readonly JsonSchemaExporterOptions _configuration = new() { - OnSchemaGenerated = (context, schema) => + TreatNullObliviousAsNonNullable = true, + TransformSchemaNode = (context, schema) => { var type = context.TypeInfo.Type; // Fix up schemas generated for IFormFile, IFormFileCollection, Stream, and PipeReader // that appear as properties within complex types. if (type == typeof(IFormFile) || type == typeof(Stream) || type == typeof(PipeReader)) { - schema.Clear(); - schema[OpenApiSchemaKeywords.TypeKeyword] = "string"; - schema[OpenApiSchemaKeywords.FormatKeyword] = "binary"; + schema = new JsonObject + { + [OpenApiSchemaKeywords.TypeKeyword] = "string", + [OpenApiSchemaKeywords.FormatKeyword] = "binary" + }; } else if (type == typeof(IFormFileCollection)) { - schema.Clear(); - schema[OpenApiSchemaKeywords.TypeKeyword] = "array"; - schema[OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject + schema = new JsonObject { - [OpenApiSchemaKeywords.TypeKeyword] = "string", - [OpenApiSchemaKeywords.FormatKeyword] = "binary" + [OpenApiSchemaKeywords.TypeKeyword] = "array", + [OpenApiSchemaKeywords.ItemsKeyword] = new JsonObject + { + [OpenApiSchemaKeywords.TypeKeyword] = "string", + [OpenApiSchemaKeywords.FormatKeyword] = "binary" + } }; } schema.ApplyPrimitiveTypesAndFormats(context); schema.ApplySchemaReferenceId(context); - if (context.GetCustomAttributes(typeof(ValidationAttribute)) is { } validationAttributes) + if (context.PropertyInfo is { AttributeProvider: { } attributeProvider }) { - schema.ApplyValidationAttributes(validationAttributes); - } - if (context.GetCustomAttributes(typeof(DefaultValueAttribute)).LastOrDefault() is DefaultValueAttribute defaultValueAttribute) - { - schema.ApplyDefaultValue(defaultValueAttribute.Value, context.TypeInfo); + schema.ApplyNullabilityContextInfo(attributeProvider); + if (attributeProvider.GetCustomAttributes(inherit: false).OfType() is { } validationAttributes) + { + schema.ApplyValidationAttributes(validationAttributes); + } + if (attributeProvider.GetCustomAttributes(inherit: false).OfType().LastOrDefault() is DefaultValueAttribute defaultValueAttribute) + { + schema.ApplyDefaultValue(defaultValueAttribute.Value, context.TypeInfo); + } + if (attributeProvider.GetCustomAttributes(inherit: false).OfType().LastOrDefault() is DescriptionAttribute descriptionAttribute) + { + schema[OpenApiSchemaKeywords.DescriptionKeyword] = descriptionAttribute.Description; + } } + + return schema; } }; @@ -123,8 +138,6 @@ internal async Task ApplySchemaTransformersAsync(OpenApiSchema schema, Type type } } - private JsonObject CreateSchema(OpenApiSchemaKey key) - => key.ParameterInfo is not null - ? JsonSchemaMapper.JsonSchemaMapper.GetJsonSchema(_jsonSerializerOptions, key.ParameterInfo, _configuration) - : JsonSchemaMapper.JsonSchemaMapper.GetJsonSchema(_jsonSerializerOptions, key.Type, _configuration); + private JsonNode CreateSchema(OpenApiSchemaKey key) + => JsonSchemaExporter.GetJsonSchemaAsNode(_jsonSerializerOptions, key.Type, _configuration); } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index 4d27ee5792e9..19fe48c57a2e 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.OpenApi; /// internal sealed class OpenApiSchemaStore { - private readonly Dictionary _schemas = new() + private readonly Dictionary _schemas = new() { // Pre-populate OpenAPI schemas for well-defined types in ASP.NET Core. [new OpenApiSchemaKey(typeof(IFormFile), null)] = new JsonObject @@ -58,7 +58,7 @@ internal sealed class OpenApiSchemaStore /// The key associated with the generated schema. /// A function used to generated the JSON object representing the schema. /// A representing the JSON schema associated with the key. - public JsonObject GetOrAdd(OpenApiSchemaKey key, Func valueFactory) + public JsonNode GetOrAdd(OpenApiSchemaKey key, Func valueFactory) { if (_schemas.TryGetValue(key, out var schema)) { diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt index b829606d7471..7e4b0ff5dc5e 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt @@ -78,30 +78,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "anyOf": [ - { - "required": [ - "$type" - ], - "type": "object", - "properties": { - "$type": { } - } - }, - { - "required": [ - "$type" - ], - "type": "object", - "properties": { - "$type": { } - } - }, - { - "type": "object" - } - ] + "type": "object" } } } diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt index f85c1f035a70..7bfff186438b 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt @@ -93,21 +93,19 @@ { "name": "id", "in": "query", + "description": "The ID associated with the Todo item.", "required": true, "schema": { - "type": "integer", - "description": "The ID associated with the Todo item.", - "format": "int32" + "$ref": "#/components/schemas/int" } }, { "name": "size", "in": "query", + "description": "The number of Todos to fetch", "required": true, "schema": { - "type": "integer", - "description": "The number of Todos to fetch", - "format": "int32" + "$ref": "#/components/schemas/int" } } ], diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs index 419075b5adab..4356e98ee5db 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs @@ -418,6 +418,24 @@ await VerifyOpenApiDocument(builder, document => }); } + [Fact] + public async Task GetOpenApiParameters_HandlesParametersWithDescriptionAttribute() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/api", ([Description("The ID of the entity")] int id) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Get]; + var parameter = Assert.Single(operation.Parameters); + Assert.Equal("The ID of the entity", parameter.Description); + }); + } + [Route("/api/{id}/{date}")] private void AcceptsParametersInModel(RouteParamsContainer model) { } diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs index 5677ea5c8cb2..0524fb4cb7f8 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.IO.Pipelines; using Microsoft.AspNetCore.Builder; @@ -311,4 +312,147 @@ await VerifyOpenApiDocument(builder, document => }); }); } + + [Fact] + public async Task GetOpenApiRequestBody_HandlesDescriptionAttributeOnProperties() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (DescriptionTodo todo) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + var requestBody = operation.RequestBody.Content; + Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); + Assert.Equal("object", mediaType.Schema.Type); + Assert.Collection(mediaType.Schema.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.Equal("int32", property.Value.Format); + Assert.Equal("The unique identifier for a todo item.", property.Value.Description); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("The title of the todo item.", property.Value.Description); + }, + property => + { + Assert.Equal("completed", property.Key); + Assert.Equal("boolean", property.Value.Type); + Assert.Equal("The completion status of the todo item.", property.Value.Description); + }, + property => + { + Assert.Equal("createdAt", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + Assert.Equal("The date and time the todo item was created.", property.Value.Description); + }); + }); + } + + [Fact] + public async Task GetOpenApiRequestBody_HandlesDescriptionAttributeOnParameter() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", ([Description("The todo item to create.")] DescriptionTodo todo) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + Assert.Equal("The todo item to create.", operation.RequestBody.Description); + }); + } + + [Fact] + public async Task GetOpenApiRequestBody_HandlesNullableProperties() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (NullablePropertiesType type) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var content = Assert.Single(requestBody.Content); + var schema = content.Value.Schema; + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("nullableInt", property.Key); + Assert.Equal("integer", property.Value.Type); + Assert.True(property.Value.Nullable); + }, + property => + { + Assert.Equal("nullableString", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.True(property.Value.Nullable); + }, + property => + { + Assert.Equal("nullableBool", property.Key); + Assert.Equal("boolean", property.Value.Type); + Assert.True(property.Value.Nullable); + }, + property => + { + Assert.Equal("nullableDateTime", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + Assert.True(property.Value.Nullable); + }, + property => + { + Assert.Equal("nullableUri", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("uri", property.Value.Format); + Assert.True(property.Value.Nullable); + }); + }); + } + + private class DescriptionTodo + { + [Description("The unique identifier for a todo item.")] + public int Id { get; set; } + + [Description("The title of the todo item.")] + public string Title { get; set; } + + [Description("The completion status of the todo item.")] + public bool Completed { get; set; } + + [Description("The date and time the todo item was created.")] + public DateTime CreatedAt { get; set; } + } + +#nullable enable + private class NullablePropertiesType + { + public int? NullableInt { get; set; } + public string? NullableString { get; set; } + public bool? NullableBool { get; set; } + public DateTime? NullableDateTime { get; set; } + public Uri? NullableUri { get; set; } + } +#nullable restore } From 613ac8866b2f988acc5c9811ac8dc59b709e9912 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:28:42 +0000 Subject: [PATCH 071/257] Update dependencies from https://github.com/dotnet/winforms build 20240617.1 (#56269) System.Drawing.Common From Version 9.0.0-preview.6.24307.1 -> To Version 9.0.0-preview.6.24317.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 72d2dfa1b99c..c49a4db86626 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -384,9 +384,9 @@ https://github.com/dotnet/runtime 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/winforms - 25717b4f5d6f00097dc9bc328a3d4652ad71414c + 8cbf7ea9a86cb42828fdc5af826f986bce3d2e98 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index e8d24d5c82f1..0edb317fdd60 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,7 +176,7 @@ 2.1.0-beta.24208.1 - 9.0.0-preview.6.24307.1 + 9.0.0-preview.6.24317.1 9.0.0-preview.24317.2 9.0.0-preview.24317.2 From de379150045af6a4543dfa72a70b18edb028f44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Thu, 20 Jun 2024 10:21:22 -0700 Subject: [PATCH 072/257] Fix urls in ProjectTemplates/README (#55984) * Fix urls in ProjectTemplates/README * Update README.md --- src/ProjectTemplates/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ProjectTemplates/README.md b/src/ProjectTemplates/README.md index 6a4287900558..9fb481dee3eb 100644 --- a/src/ProjectTemplates/README.md +++ b/src/ProjectTemplates/README.md @@ -109,7 +109,7 @@ When tests are run as part of the CI infrastructure, a number of different timeo ##### Helix job timeout -When queuing test jobs to the Helix infrastructure, a timeout value is passed that the entire Helix job must complete within, i.e. that job running on a single queue. This default value is set in [eng\targets\Helix.props](eng/targets/Helix.props): +When queuing test jobs to the Helix infrastructure, a timeout value is passed that the entire Helix job must complete within, i.e. that job running on a single queue. This default value is set in [eng\targets\Helix.props](/eng/targets/Helix.props): ```xml 00:45:00 @@ -126,7 +126,7 @@ Note that some test projects might override this value in their project file and ##### Helix runner timeout -The [Helix test runner](eng/tools/HelixTestRunner) launches the actual process that runs tests within a Helix job and when doing so configures its own timeout that is 5 minutes less than the Helix job timeout, e.g. if the Helix job timeout is 45 minutes, the Helix test runner process timeout will be 40 minutes. +The [Helix test runner](/eng/tools/HelixTestRunner) launches the actual process that runs tests within a Helix job and when doing so configures its own timeout that is 5 minutes less than the Helix job timeout, e.g. if the Helix job timeout is 45 minutes, the Helix test runner process timeout will be 40 minutes. If this timeout is exceeded, the Helix test runner will capture a dump of the test process before terminating it and printing a message in the console log, e.g.: @@ -136,7 +136,7 @@ If this timeout is exceeded, the Helix test runner will capture a dump of the te ##### Helix runner `dotnet test` timeout -When running in Helix, a test hang timeout, e.g. `dotnet test --blame-hang-timeout 15m` , is configured in [eng\tools\HelixTestRunner\TestRunner.cs](eng/tools/HelixTestRunner/TestRunner.cs) +When running in Helix, a test hang timeout, e.g. `dotnet test --blame-hang-timeout 15m` , is configured in [eng\tools\HelixTestRunner\TestRunner.cs](/eng/tools/HelixTestRunner/TestRunner.cs) ```csharp public async Task RunTestsAsync() From c40405fe48c999eb3fcb38416d5bdf4cb52ba012 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:46:11 -0700 Subject: [PATCH 073/257] [main] Update dependencies from dotnet/source-build-externals (#56342) * Update dependencies from https://github.com/dotnet/source-build-externals build 20240620.1 Microsoft.SourceBuild.Intermediate.source-build-externals From Version 9.0.0-alpha.1.24303.2 -> To Version 9.0.0-alpha.1.24320.1 * Update IdentityModel and Id Web M.IM to 8.0.0-preview1 and Id Web to 3.0.0-preview3 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: jennyf19 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c49a4db86626..ce617f0f3915 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -372,9 +372,9 @@ 117cfccdd71abc164e6b933ca7602b509a1365dd - + https://github.com/dotnet/source-build-externals - 7db00527ef8fbbe61f67e9295beebddf187efff8 + 9a2785b8409e4ee8db848cc2fbfa19b3316a3baa diff --git a/eng/Versions.props b/eng/Versions.props index 0edb317fdd60..79d2b5947fb4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ 0 6 true - 7.4.1 + 8.0.0-preview1 *-* - 9.0.0-alpha.1.24303.2 + 9.0.0-alpha.1.24320.1 9.0.0-alpha.1.24304.1 @@ -307,10 +307,10 @@ 2.57.0 2.57.0 2.5.108 - 2.17.0 - 2.17.0 - 2.17.0 - 2.17.0 + 3.0.0-preview3 + 3.0.0-preview3 + 3.0.0-preview3 + 3.0.0-preview3 0.3.46-beta $(MessagePackVersion) 4.10.0 From b6fed08b95aecc4f4daae17b07f4dfabf4028eb6 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 20 Jun 2024 15:28:49 -0700 Subject: [PATCH 074/257] Update milestones for August (#56350) --- .github/policies/resourceManagement.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index 2eaec4a1df83..6782a98edc1e 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -670,7 +670,7 @@ configuration: then: - removeMilestone - addMilestone: - milestone: 6.0.32 + milestone: 6.0.33 description: '[Milestone Assignments] Assign Milestone to PRs merged to release/6.0 branch' - if: - payloadType: Pull_Request @@ -681,7 +681,7 @@ configuration: then: - removeMilestone - addMilestone: - milestone: 8.0.7 + milestone: 8.0.8 description: '[Milestone Assignments] Assign Milestone to PRs merged to release/8.0 branch' - if: - payloadType: Issues From e5e94a1bf0562a2b017f0e8e849d41e8d04d5409 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 20 Jun 2024 16:56:43 -0700 Subject: [PATCH 075/257] Update branding to preview7 (#56352) * Update branding to preview7 * Update resourceManagement.yml --- .github/policies/resourceManagement.yml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index 6782a98edc1e..c0bcd806af0a 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -497,19 +497,19 @@ configuration: branch: main then: - addMilestone: - milestone: 9.0-preview6 + milestone: 9.0-preview7 description: '[Milestone Assignments] Assign Milestone to PRs merged to the `main` branch' - if: - payloadType: Pull_Request - isAction: action: Closed - targetsBranch: - branch: release/9.0-preview5 + branch: release/9.0-preview6 then: - removeMilestone - addMilestone: - milestone: 9.0-preview5 - description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0-preview5 branch' + milestone: 9.0-preview6 + description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.0-preview6 branch' - if: - payloadType: Issues - isAction: diff --git a/eng/Versions.props b/eng/Versions.props index 79d2b5947fb4..3defa84e7edd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 9 0 0 - 6 + 7 true 8.0.0-preview1 *-* From 28481ab0d6a31883a6c058d045ca8f72591a7eca Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:06:36 +0000 Subject: [PATCH 076/257] Update dependencies from https://github.com/dotnet/runtime build 20240620.8 (#56358) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ce617f0f3915..b2f83ae31933 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore 9a80b6b085fbe20cdb1c60b549947ecabefe9172 - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 117cfccdd71abc164e6b933ca7602b509a1365dd + 7bc92926b36617f7a0646a8d936782bc4c3264ab https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 3defa84e7edd..8b35a5e87bde 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 - 9.0.0-preview.6.24319.11 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24320.8 9.0.0-preview.6.24316.1 9.0.0-preview.6.24316.1 From 96559b6c1978e5a64e17fb48718cd60b4b6316f0 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Fri, 21 Jun 2024 21:39:44 -0600 Subject: [PATCH 077/257] Remove incorrect suppressions from AwaitableInfo (#56360) These warning suppressions are not correct. The reflection usage in these methods isn't compatible with trimming. Marking the methods correctly with RequiresUnreferencedCode. See https://github.com/dotnet/runtime/issues/103258 for more info. --- src/Shared/ObjectMethodExecutor/AwaitableInfo.cs | 5 +++-- .../ObjectMethodExecutor/CoercedAwaitableInfo.cs | 1 + .../ObjectMethodExecutorFSharpSupport.cs | 11 ++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Shared/ObjectMethodExecutor/AwaitableInfo.cs b/src/Shared/ObjectMethodExecutor/AwaitableInfo.cs index 9b854ba7ea1a..e8f5418963ba 100644 --- a/src/Shared/ObjectMethodExecutor/AwaitableInfo.cs +++ b/src/Shared/ObjectMethodExecutor/AwaitableInfo.cs @@ -11,6 +11,8 @@ namespace Microsoft.Extensions.Internal; internal readonly struct AwaitableInfo { + internal const string RequiresUnreferencedCodeMessage = "Uses unbounded reflection to determine awaitability of types."; + private const BindingFlags Everything = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance; private static readonly MethodInfo INotifyCompletion_OnCompleted = typeof(INotifyCompletion).GetMethod(nameof(INotifyCompletion.OnCompleted), Everything, new[] { typeof(Action) })!; private static readonly MethodInfo ICriticalNotifyCompletion_UnsafeOnCompleted = typeof(ICriticalNotifyCompletion).GetMethod(nameof(ICriticalNotifyCompletion.UnsafeOnCompleted), Everything, new[] { typeof(Action) })!; @@ -41,8 +43,7 @@ public AwaitableInfo( GetAwaiterMethod = getAwaiterMethod; } - [UnconditionalSuppressMessage("Trimmer", "IL2070", Justification = "Reflecting over the async Task types contract")] - [UnconditionalSuppressMessage("Trimmer", "IL2075", Justification = "Reflecting over the async Task types contract")] + [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] public static bool IsTypeAwaitable( Type type, out AwaitableInfo awaitableInfo) diff --git a/src/Shared/ObjectMethodExecutor/CoercedAwaitableInfo.cs b/src/Shared/ObjectMethodExecutor/CoercedAwaitableInfo.cs index 68d763977bdb..3a496877ba9d 100644 --- a/src/Shared/ObjectMethodExecutor/CoercedAwaitableInfo.cs +++ b/src/Shared/ObjectMethodExecutor/CoercedAwaitableInfo.cs @@ -29,6 +29,7 @@ public CoercedAwaitableInfo(Expression coercerExpression, Type coercerResultType AwaitableInfo = coercedAwaitableInfo; } + [RequiresUnreferencedCode(AwaitableInfo.RequiresUnreferencedCodeMessage)] [RequiresDynamicCode("Dynamically generates calls to FSharpAsync.")] public static bool IsTypeAwaitable( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type, diff --git a/src/Shared/ObjectMethodExecutor/ObjectMethodExecutorFSharpSupport.cs b/src/Shared/ObjectMethodExecutor/ObjectMethodExecutorFSharpSupport.cs index e3f977dcc2cb..7034eba4b0ff 100644 --- a/src/Shared/ObjectMethodExecutor/ObjectMethodExecutorFSharpSupport.cs +++ b/src/Shared/ObjectMethodExecutor/ObjectMethodExecutorFSharpSupport.cs @@ -54,7 +54,7 @@ internal static class ObjectMethodExecutorFSharpSupport /// by the coercer expression, if it was possible to build a coercer; otherwise, . /// /// if it was possible to build a coercer; otherwise, . - [UnconditionalSuppressMessage("Trimmer", "IL2060", Justification = "Reflecting over the async FSharpAsync<> contract.")] + [RequiresUnreferencedCode("Reflecting over the async FSharpAsync<> contract.")] public static bool TryBuildCoercerFromFSharpAsyncToAwaitable( Type possibleFSharpAsyncType, out Expression coerceToAwaitableExpression, @@ -127,7 +127,7 @@ public static bool TryBuildCoercerFromFSharpAsyncToAwaitable( /// otherwise, . /// /// if it was possible to build a coercer; otherwise, . - [UnconditionalSuppressMessage("Trimmer", "IL2060", Justification = "Reflecting over FSharp.Core.Unit.")] + [RequiresUnreferencedCode("Reflecting over FSharp.Core.Unit.")] public static bool TryBuildCoercerFromUnitAwaitableToVoidAwaitable( Type genericAwaitableType, out Expression coercerExpression, @@ -168,12 +168,15 @@ static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type) } } + [RequiresUnreferencedCode("Reflecting over the async FSharpAsync<> contract.")] private static bool IsFSharpAsyncOpenGenericType(Type possibleFSharpAsyncType) => IsCoerceableFSharpType(possibleFSharpAsyncType, FSharpAsyncGenericTypeName); + [RequiresUnreferencedCode("Reflecting over the async FSharpAsync<> contract.")] private static bool IsFSharpUnit(Type possibleFSharpUnitType) => IsCoerceableFSharpType(possibleFSharpUnitType, FSharpUnitTypeName); + [RequiresUnreferencedCode("Reflecting over the async FSharpAsync<> contract.")] private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerceableFSharpTypeName) { var typeFullName = possibleFSharpType?.FullName; @@ -199,9 +202,7 @@ private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerc } } - [UnconditionalSuppressMessage("Trimmer", "IL2026", Justification = "Reflecting over the async FSharpAsync<> contract")] - [UnconditionalSuppressMessage("Trimmer", "IL2055", Justification = "Reflecting over the async FSharpAsync<> contract")] - [UnconditionalSuppressMessage("Trimmer", "IL2072", Justification = "Reflecting over the async FSharpAsync<> contract")] + [RequiresUnreferencedCode("Reflecting over the async FSharpAsync<> contract.")] private static bool TryPopulateFSharpValueCaches(Type possibleFSharpType) { var assembly = possibleFSharpType.Assembly; From 68ea2c800f406cc2a6e6760d5e4fdddb809fd701 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:19:07 +0000 Subject: [PATCH 078/257] Update dependencies from https://github.com/dotnet/arcade build 20240620.2 (#56345) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor From Version 9.0.0-beta.24314.1 -> To Version 9.0.0-beta.24320.2 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 24 +-- eng/Versions.props | 8 +- eng/common/SetupNugetSources.ps1 | 143 ++++++++++-------- eng/common/SetupNugetSources.sh | 2 +- .../job/publish-build-assets.yml | 9 +- .../post-build/common-variables.yml | 2 - .../core-templates/post-build/post-build.yml | 8 +- .../post-build/setup-maestro-vars.yml | 30 ++-- .../steps/component-governance.yml | 4 +- .../steps/enable-internal-sources.yml | 46 +++--- .../core-templates/steps/source-build.yml | 10 +- eng/common/cross/arm/sources.list.bionic | 11 -- eng/common/cross/arm/sources.list.focal | 11 -- eng/common/cross/arm/sources.list.jammy | 11 -- eng/common/cross/arm/sources.list.jessie | 3 - eng/common/cross/arm/sources.list.xenial | 11 -- eng/common/cross/arm/sources.list.zesty | 11 -- eng/common/cross/arm64/sources.list.bionic | 11 -- eng/common/cross/arm64/sources.list.buster | 11 -- eng/common/cross/arm64/sources.list.focal | 11 -- eng/common/cross/arm64/sources.list.jammy | 11 -- eng/common/cross/arm64/sources.list.stretch | 12 -- eng/common/cross/arm64/sources.list.xenial | 11 -- eng/common/cross/arm64/sources.list.zesty | 11 -- eng/common/cross/armel/sources.list.jessie | 3 - eng/common/cross/armv6/sources.list.bookworm | 2 - eng/common/cross/armv6/sources.list.buster | 2 - eng/common/cross/build-rootfs.sh | 41 +++-- eng/common/cross/ppc64le/sources.list.bionic | 11 -- eng/common/cross/riscv64/sources.list.noble | 11 -- eng/common/cross/riscv64/sources.list.sid | 1 - eng/common/cross/s390x/sources.list.bionic | 11 -- eng/common/cross/x64/sources.list.bionic | 11 -- eng/common/cross/x64/sources.list.xenial | 11 -- eng/common/cross/x86/sources.list.bionic | 11 -- eng/common/cross/x86/sources.list.focal | 11 -- eng/common/cross/x86/sources.list.jammy | 11 -- eng/common/cross/x86/sources.list.xenial | 11 -- eng/common/post-build/publish-using-darc.ps1 | 16 +- global.json | 4 +- 40 files changed, 200 insertions(+), 390 deletions(-) delete mode 100644 eng/common/cross/arm/sources.list.bionic delete mode 100644 eng/common/cross/arm/sources.list.focal delete mode 100644 eng/common/cross/arm/sources.list.jammy delete mode 100644 eng/common/cross/arm/sources.list.jessie delete mode 100644 eng/common/cross/arm/sources.list.xenial delete mode 100644 eng/common/cross/arm/sources.list.zesty delete mode 100644 eng/common/cross/arm64/sources.list.bionic delete mode 100644 eng/common/cross/arm64/sources.list.buster delete mode 100644 eng/common/cross/arm64/sources.list.focal delete mode 100644 eng/common/cross/arm64/sources.list.jammy delete mode 100644 eng/common/cross/arm64/sources.list.stretch delete mode 100644 eng/common/cross/arm64/sources.list.xenial delete mode 100644 eng/common/cross/arm64/sources.list.zesty delete mode 100644 eng/common/cross/armel/sources.list.jessie delete mode 100644 eng/common/cross/armv6/sources.list.bookworm delete mode 100644 eng/common/cross/armv6/sources.list.buster delete mode 100644 eng/common/cross/ppc64le/sources.list.bionic delete mode 100644 eng/common/cross/riscv64/sources.list.noble delete mode 100644 eng/common/cross/riscv64/sources.list.sid delete mode 100644 eng/common/cross/s390x/sources.list.bionic delete mode 100644 eng/common/cross/x64/sources.list.bionic delete mode 100644 eng/common/cross/x64/sources.list.xenial delete mode 100644 eng/common/cross/x86/sources.list.bionic delete mode 100644 eng/common/cross/x86/sources.list.focal delete mode 100644 eng/common/cross/x86/sources.list.jammy delete mode 100644 eng/common/cross/x86/sources.list.xenial diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b2f83ae31933..bede36ed3388 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -388,31 +388,31 @@ https://github.com/dotnet/winforms 8cbf7ea9a86cb42828fdc5af826f986bce3d2e98 - + https://github.com/dotnet/arcade - 92a725aa4d9d6c13dc5229597b51b0b165b8b535 + 3aba80fecac252e1cdaffcebc0a37a24a960228b - + https://github.com/dotnet/arcade - 92a725aa4d9d6c13dc5229597b51b0b165b8b535 + 3aba80fecac252e1cdaffcebc0a37a24a960228b - + https://github.com/dotnet/arcade - 92a725aa4d9d6c13dc5229597b51b0b165b8b535 + 3aba80fecac252e1cdaffcebc0a37a24a960228b - + https://github.com/dotnet/arcade - 92a725aa4d9d6c13dc5229597b51b0b165b8b535 + 3aba80fecac252e1cdaffcebc0a37a24a960228b - + https://github.com/dotnet/arcade - 92a725aa4d9d6c13dc5229597b51b0b165b8b535 + 3aba80fecac252e1cdaffcebc0a37a24a960228b - + https://github.com/dotnet/arcade - 92a725aa4d9d6c13dc5229597b51b0b165b8b535 + 3aba80fecac252e1cdaffcebc0a37a24a960228b https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index 8b35a5e87bde..d19cb2f4cf01 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -165,10 +165,10 @@ 6.2.4 6.2.4 - 9.0.0-beta.24314.1 - 9.0.0-beta.24314.1 - 9.0.0-beta.24314.1 - 9.0.0-beta.24314.1 + 9.0.0-beta.24321.4 + 9.0.0-beta.24321.4 + 9.0.0-beta.24321.4 + 9.0.0-beta.24321.4 9.0.0-alpha.1.24320.1 diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index c07f6a52601b..2b0a5c9e6655 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -1,32 +1,31 @@ # This script adds internal feeds required to build commits that depend on internal package sources. For instance, # dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables # disabled internal Maestro (darc-int*) feeds. -# -# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. This credential -# is added via the standard environment variable VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. See -# https://github.com/microsoft/artifacts-credprovider/tree/v1.1.1?tab=readme-ov-file#environment-variables for more details +# +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. # # See example call for this script below. # # - task: PowerShell@2 -# displayName: Setup Internal Feeds +# displayName: Setup Private Feeds Credentials # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -# - task: NuGetAuthenticate@1 -# +# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# env: +# Token: $(dn-bot-dnceng-artifact-feeds-rw) +# # Note that the NuGetAuthenticate task should be called after SetupNugetSources. # This ensures that: # - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) -# - The credential provider is installed +# - The credential provider is installed. # # This logic is also abstracted into enable-internal-sources.yml. [CmdletBinding()] param ( [Parameter(Mandatory = $true)][string]$ConfigFile, - [string]$Password + $Password ) $ErrorActionPreference = "Stop" @@ -35,23 +34,12 @@ Set-StrictMode -Version 2.0 . $PSScriptRoot\tools.ps1 -$feedEndpoints = $null - -# If a credential is provided, ensure that we don't overwrite the current set of -# credentials that may have been provided by a previous call to the credential provider. -if ($Password -and $null -ne $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS) { - $feedEndpoints = $env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS | ConvertFrom-Json -} elseif ($Password) { - $feedEndpoints = @{ endpointCredentials = @() } -} - # Add source entry to PackageSources -function AddPackageSource($sources, $SourceName, $SourceEndPoint, $pwd) { +function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) { $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") - if ($null -eq $packageSource) + if ($packageSource -eq $null) { - Write-Host "`tAdding package source" $SourceName $packageSource = $doc.CreateElement("add") $packageSource.SetAttribute("key", $SourceName) $packageSource.SetAttribute("value", $SourceEndPoint) @@ -61,33 +49,63 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $pwd) { Write-Host "Package source $SourceName already present." } - if ($pwd) { - $feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $SourceEndPoint -pwd $pwd - } + AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd } -# Add a new feed endpoint credential -function AddCredential([array]$endpointCredentials, $source, $pwd) { - $endpointCredentials += @{ - endpoint = $source; - password = $pwd +# Add a credential node for the specified source +function AddCredential($creds, $source, $username, $pwd) { + # If no cred supplied, don't do anything. + if (!$pwd) { + return; } - return $endpointCredentials + + # Looks for credential configuration for the given SourceName. Create it if none is found. + $sourceElement = $creds.SelectSingleNode($Source) + if ($sourceElement -eq $null) + { + $sourceElement = $doc.CreateElement($Source) + $creds.AppendChild($sourceElement) | Out-Null + } + + # Add the node to the credential if none is found. + $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") + if ($usernameElement -eq $null) + { + $usernameElement = $doc.CreateElement("add") + $usernameElement.SetAttribute("key", "Username") + $sourceElement.AppendChild($usernameElement) | Out-Null + } + $usernameElement.SetAttribute("value", $Username) + + # Add the to the credential if none is found. + # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. + # -> https://github.com/NuGet/Home/issues/5526 + $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") + if ($passwordElement -eq $null) + { + $passwordElement = $doc.CreateElement("add") + $passwordElement.SetAttribute("key", "ClearTextPassword") + $sourceElement.AppendChild($passwordElement) | Out-Null + } + + $passwordElement.SetAttribute("value", $pwd) } -function InsertMaestroInternalFeedCredentials($Sources, $pwd) { - $maestroInternalSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") +function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) { + $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") - ForEach ($PackageSource in $maestroInternalSources) { - Write-Host "`tAdding credential for Maestro's feed:" $PackageSource.Key - $feedEndpoints.endpointCredentials = AddCredential -endpointCredentials $feedEndpoints.endpointCredentials -source $PackageSource.value -pwd $pwd + Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." + + ForEach ($PackageSource in $maestroPrivateSources) { + Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key + AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd } } -function EnableInternalPackageSources($DisabledPackageSources) { - $maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") - ForEach ($DisabledPackageSource in $maestroInternalSources) { - Write-Host "`tEnsuring internal source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource" +function EnablePrivatePackageSources($DisabledPackageSources) { + $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") + ForEach ($DisabledPackageSource in $maestroPrivateSources) { + Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource" # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries $DisabledPackageSources.RemoveChild($DisabledPackageSource) } @@ -105,27 +123,38 @@ $doc.Load($filename) # Get reference to or create one if none exist already $sources = $doc.DocumentElement.SelectSingleNode("packageSources") -if ($null -eq $sources) { +if ($sources -eq $null) { $sources = $doc.CreateElement("packageSources") $doc.DocumentElement.AppendChild($sources) | Out-Null } +$creds = $null +if ($Password) { + # Looks for a node. Create it if none is found. + $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") + if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null + } +} + # Check for disabledPackageSources; we'll enable any darc-int ones we find there $disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources") -if ($null -ne $disabledSources) { +if ($disabledSources -ne $null) { Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node" - EnableInternalPackageSources -DisabledPackageSources $disabledSources + EnablePrivatePackageSources -DisabledPackageSources $disabledSources } -if ($Password) { - InsertMaestroInternalFeedCredentials -Sources $sources -pwd $Password -} +$userName = "dn-bot" + +# Insert credential nodes for Maestro's private feeds +InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password # 3.1 uses a different feed url format so it's handled differently here $dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") -if ($null -ne $dotnet31Source) { - AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json" -pwd $Password - AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json" -pwd $Password +if ($dotnet31Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password } $dotnetVersions = @('5','6','7','8') @@ -133,18 +162,10 @@ $dotnetVersions = @('5','6','7','8') foreach ($dotnetVersion in $dotnetVersions) { $feedPrefix = "dotnet" + $dotnetVersion; $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']") - if ($dotnetSource) { - AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedprefix-internal/nuget/v3/index.json" -pwd $Password - AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v3/index.json" -pwd $Password + if ($dotnetSource -ne $null) { + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password } } $doc.Save($filename) - -# If any credentials were added or altered, update the VSS_NUGET_EXTERNAL_FEED_ENDPOINTS environment variable -if ($null -ne $feedEndpoints) { - # ci is set to true so vso logging commands will be used. - $ci = $true - Write-PipelineSetVariable -Name 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' -Value $($feedEndpoints | ConvertTo-Json) -IsMultiJobVariable $false - Write-PipelineSetVariable -Name 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' -Value "False" -IsMultiJobVariable $false -} \ No newline at end of file diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 16c1e29ea3b7..b493479a1daf 100755 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# This script adds internal feeds required to build commits that depend on intenral package sources. For instance, +# This script adds internal feeds required to build commits that depend on internal package sources. For instance, # dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables # disabled internal Maestro (darc-int*) feeds. # diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 8fe9299542c5..2cf8e1853d06 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -87,13 +87,15 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -160,7 +162,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/post-build/common-variables.yml b/eng/common/core-templates/post-build/common-variables.yml index b9ede10bf099..d5627a994ae5 100644 --- a/eng/common/core-templates/post-build/common-variables.yml +++ b/eng/common/core-templates/post-build/common-variables.yml @@ -8,8 +8,6 @@ variables: # Default Maestro++ API Endpoint and API Version - name: MaestroApiEndPoint value: "https://maestro.dot.net" - - name: MaestroApiAccessToken - value: $(MaestroAccessToken) - name: MaestroApiVersion value: "2020-02-20" diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index fb15c40c03d4..20924366b8a4 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -300,14 +300,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml index 8d56b5726793..f7602980dbe7 100644 --- a/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -15,19 +15,20 @@ steps: artifactName: ReleaseConfigs checkDownloadedFiles: true - - task: PowerShell@2 + - task: AzureCLI@2 name: setReleaseVars displayName: Set Release Configs Vars inputs: - targetType: inline - pwsh: true - script: | + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | try { if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt $BarId = $Content | Select -Index 0 - $Channels = $Content | Select -Index 1 + $Channels = $Content | Select -Index 1 $IsStableBuild = $Content | Select -Index 2 $AzureDevOpsProject = $Env:System_TeamProject @@ -35,15 +36,16 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId + $BarId = ${{ parameters.BARBuildId }} $Channels = $Env:PromoteToMaestroChannels -split "," $Channels = $Channels -join "][" $Channels = "[$Channels]" @@ -69,6 +71,4 @@ steps: exit 1 } env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/core-templates/steps/component-governance.yml b/eng/common/core-templates/steps/component-governance.yml index df449a34c112..b8815892a5ef 100644 --- a/eng/common/core-templates/steps/component-governance.yml +++ b/eng/common/core-templates/steps/component-governance.yml @@ -2,7 +2,8 @@ parameters: disableComponentGovernance: false componentGovernanceIgnoreDirectories: '' is1ESPipeline: false - + displayName: 'Component Detection' + steps: - ${{ if eq(parameters.disableComponentGovernance, 'true') }}: - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" @@ -10,5 +11,6 @@ steps: - ${{ if ne(parameters.disableComponentGovernance, 'true') }}: - task: ComponentGovernanceComponentDetection@0 continueOnError: true + displayName: ${{ parameters.displayName }} inputs: ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} \ No newline at end of file diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 80deddafb1b6..4a06b5290824 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -6,30 +6,40 @@ parameters: - name: is1ESPipeline type: boolean default: false +# Legacy parameters to allow for PAT usage +- name: legacyCredential + type: string + default: '' steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. - # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that - # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - ${{ if ne(parameters.legacyCredential, '') }}: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config - - task: NuGetAuthenticate@1 + # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. + # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that + # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. - ${{ else }}: - - template: /eng/common/templates/steps/get-federated-access-token.yml - parameters: - federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} - outputVariableName: 'dnceng-artifacts-feeds-read-access-token' - - task: PowerShell@2 - displayName: Setup Internal Feeds - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) - # This is required in certain scenarios to install the ADO credential provider. - # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others - # (e.g. dotnet msbuild). - - task: NuGetAuthenticate@1 + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + - ${{ else }}: + - template: /eng/common/templates/steps/get-federated-access-token.yml + parameters: + federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} + outputVariableName: 'dnceng-artifacts-feeds-read-access-token' + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + # This is required in certain scenarios to install the ADO credential provider. + # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others + # (e.g. dotnet msbuild). + - task: NuGetAuthenticate@1 diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index 16c778d92cb5..2915d29bb7f6 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -121,7 +121,9 @@ steps: # a nupkg cache of input packages (a local feed). # This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir' # in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets -- task: ComponentGovernanceComponentDetection@0 - displayName: Component Detection (Exclude upstream cache) - inputs: - ignoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' +- template: /eng/common/core-templates/steps/component-governance.yml + parameters: + displayName: Component Detection (Exclude upstream cache) + is1ESPipeline: ${{ parameters.is1ESPipeline }} + componentGovernanceIgnoreDirectories: '$(Build.SourcesDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache' + disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }} diff --git a/eng/common/cross/arm/sources.list.bionic b/eng/common/cross/arm/sources.list.bionic deleted file mode 100644 index 210955740957..000000000000 --- a/eng/common/cross/arm/sources.list.bionic +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.focal b/eng/common/cross/arm/sources.list.focal deleted file mode 100644 index 4de2600c1747..000000000000 --- a/eng/common/cross/arm/sources.list.focal +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.jammy b/eng/common/cross/arm/sources.list.jammy deleted file mode 100644 index 6bb0453029cc..000000000000 --- a/eng/common/cross/arm/sources.list.jammy +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.jessie b/eng/common/cross/arm/sources.list.jessie deleted file mode 100644 index 4d142ac9b108..000000000000 --- a/eng/common/cross/arm/sources.list.jessie +++ /dev/null @@ -1,3 +0,0 @@ -# Debian (sid) # UNSTABLE -deb http://ftp.debian.org/debian/ sid main contrib non-free -deb-src http://ftp.debian.org/debian/ sid main contrib non-free diff --git a/eng/common/cross/arm/sources.list.xenial b/eng/common/cross/arm/sources.list.xenial deleted file mode 100644 index 56fbb36a59f6..000000000000 --- a/eng/common/cross/arm/sources.list.xenial +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.zesty b/eng/common/cross/arm/sources.list.zesty deleted file mode 100644 index ea2c14a78747..000000000000 --- a/eng/common/cross/arm/sources.list.zesty +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.bionic b/eng/common/cross/arm64/sources.list.bionic deleted file mode 100644 index 210955740957..000000000000 --- a/eng/common/cross/arm64/sources.list.bionic +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.buster b/eng/common/cross/arm64/sources.list.buster deleted file mode 100644 index 7194ac64a960..000000000000 --- a/eng/common/cross/arm64/sources.list.buster +++ /dev/null @@ -1,11 +0,0 @@ -deb http://deb.debian.org/debian buster main -deb-src http://deb.debian.org/debian buster main - -deb http://deb.debian.org/debian-security/ buster/updates main -deb-src http://deb.debian.org/debian-security/ buster/updates main - -deb http://deb.debian.org/debian buster-updates main -deb-src http://deb.debian.org/debian buster-updates main - -deb http://deb.debian.org/debian buster-backports main contrib non-free -deb-src http://deb.debian.org/debian buster-backports main contrib non-free diff --git a/eng/common/cross/arm64/sources.list.focal b/eng/common/cross/arm64/sources.list.focal deleted file mode 100644 index 4de2600c1747..000000000000 --- a/eng/common/cross/arm64/sources.list.focal +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.jammy b/eng/common/cross/arm64/sources.list.jammy deleted file mode 100644 index 6bb0453029cc..000000000000 --- a/eng/common/cross/arm64/sources.list.jammy +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.stretch b/eng/common/cross/arm64/sources.list.stretch deleted file mode 100644 index 0e1215774368..000000000000 --- a/eng/common/cross/arm64/sources.list.stretch +++ /dev/null @@ -1,12 +0,0 @@ -deb http://deb.debian.org/debian stretch main -deb-src http://deb.debian.org/debian stretch main - -deb http://deb.debian.org/debian-security/ stretch/updates main -deb-src http://deb.debian.org/debian-security/ stretch/updates main - -deb http://deb.debian.org/debian stretch-updates main -deb-src http://deb.debian.org/debian stretch-updates main - -deb http://deb.debian.org/debian stretch-backports main contrib non-free -deb-src http://deb.debian.org/debian stretch-backports main contrib non-free - diff --git a/eng/common/cross/arm64/sources.list.xenial b/eng/common/cross/arm64/sources.list.xenial deleted file mode 100644 index 56fbb36a59f6..000000000000 --- a/eng/common/cross/arm64/sources.list.xenial +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.zesty b/eng/common/cross/arm64/sources.list.zesty deleted file mode 100644 index ea2c14a78747..000000000000 --- a/eng/common/cross/arm64/sources.list.zesty +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse diff --git a/eng/common/cross/armel/sources.list.jessie b/eng/common/cross/armel/sources.list.jessie deleted file mode 100644 index 3d9c3059d897..000000000000 --- a/eng/common/cross/armel/sources.list.jessie +++ /dev/null @@ -1,3 +0,0 @@ -# Debian (jessie) # Stable -deb http://ftp.debian.org/debian/ jessie main contrib non-free -deb-src http://ftp.debian.org/debian/ jessie main contrib non-free diff --git a/eng/common/cross/armv6/sources.list.bookworm b/eng/common/cross/armv6/sources.list.bookworm deleted file mode 100644 index 10161135265c..000000000000 --- a/eng/common/cross/armv6/sources.list.bookworm +++ /dev/null @@ -1,2 +0,0 @@ -deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi -deb-src http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi diff --git a/eng/common/cross/armv6/sources.list.buster b/eng/common/cross/armv6/sources.list.buster deleted file mode 100644 index f27fc4fb346b..000000000000 --- a/eng/common/cross/armv6/sources.list.buster +++ /dev/null @@ -1,2 +0,0 @@ -deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi -deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 8bb233ba25bf..eb1a90804648 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -30,7 +30,8 @@ __IllumosArch=arm7 __HaikuArch=arm __QEMUArch=arm __UbuntuArch=armhf -__UbuntuRepo="http://ports.ubuntu.com/" +__UbuntuRepo= +__UbuntuSuites="updates security backports" __LLDB_Package="liblldb-3.9-dev" __SkipUnmount=0 @@ -129,9 +130,9 @@ __AlpineKeys=' 616db30d:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnpUpyWDWjlUk3smlWeA0\nlIMW+oJ38t92CRLHH3IqRhyECBRW0d0aRGtq7TY8PmxjjvBZrxTNDpJT6KUk4LRm\na6A6IuAI7QnNK8SJqM0DLzlpygd7GJf8ZL9SoHSH+gFsYF67Cpooz/YDqWrlN7Vw\ntO00s0B+eXy+PCXYU7VSfuWFGK8TGEv6HfGMALLjhqMManyvfp8hz3ubN1rK3c8C\nUS/ilRh1qckdbtPvoDPhSbTDmfU1g/EfRSIEXBrIMLg9ka/XB9PvWRrekrppnQzP\nhP9YE3x/wbFc5QqQWiRCYyQl/rgIMOXvIxhkfe8H5n1Et4VAorkpEAXdsfN8KSVv\nLSMazVlLp9GYq5SUpqYX3KnxdWBgN7BJoZ4sltsTpHQ/34SXWfu3UmyUveWj7wp0\nx9hwsPirVI00EEea9AbP7NM2rAyu6ukcm4m6ATd2DZJIViq2es6m60AE6SMCmrQF\nwmk4H/kdQgeAELVfGOm2VyJ3z69fQuywz7xu27S6zTKi05Qlnohxol4wVb6OB7qG\nLPRtK9ObgzRo/OPumyXqlzAi/Yvyd1ZQk8labZps3e16bQp8+pVPiumWioMFJDWV\nGZjCmyMSU8V6MB6njbgLHoyg2LCukCAeSjbPGGGYhnKLm1AKSoJh3IpZuqcKCk5C\n8CM1S15HxV78s9dFntEqIokCAwEAAQ== ' __Keyring= +__KeyringFile="/usr/share/keyrings/ubuntu-archive-keyring.gpg" __SkipSigCheck=0 __UseMirror=0 -__UseDeb822Format=0 __UnprocessedBuildArgs= while :; do @@ -163,6 +164,7 @@ while :; do __UbuntuArch=armel __UbuntuRepo="http://ftp.debian.org/debian/" __CodeName=jessie + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" ;; armv6) __BuildArch=armv6 @@ -170,10 +172,12 @@ while :; do __QEMUArch=arm __UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/" __CodeName=buster + __KeyringFile="/usr/share/keyrings/raspbian-archive-keyring.gpg" __LLDB_Package="liblldb-6.0-dev" + __UbuntuSuites= - if [[ -e "/usr/share/keyrings/raspbian-archive-keyring.gpg" ]]; then - __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg" + if [[ -e "$__KeyringFile" ]]; then + __Keyring="--keyring $__KeyringFile" fi ;; riscv64) @@ -184,10 +188,6 @@ while :; do __UbuntuArch=riscv64 __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" unset __LLDB_Package - - if [[ -e "/usr/share/keyrings/debian-archive-keyring.gpg" ]]; then - __Keyring="--keyring /usr/share/keyrings/debian-archive-keyring.gpg --include=debian-archive-keyring" - fi ;; ppc64le) __BuildArch=ppc64le @@ -292,10 +292,13 @@ while :; do if [[ "$__CodeName" != "jessie" ]]; then __CodeName=noble fi - __UseDeb822Format=1 + if [[ -n "$__LLDB_Package" ]]; then + __LLDB_Package="liblldb-18-dev" + fi ;; jessie) # Debian 8 __CodeName=jessie + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -304,6 +307,7 @@ while :; do stretch) # Debian 9 __CodeName=stretch __LLDB_Package="liblldb-6.0-dev" + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -312,6 +316,7 @@ while :; do buster) # Debian 10 __CodeName=buster __LLDB_Package="liblldb-6.0-dev" + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -319,6 +324,7 @@ while :; do ;; bullseye) # Debian 11 __CodeName=bullseye + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -326,6 +332,7 @@ while :; do ;; bookworm) # Debian 12 __CodeName=bookworm + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -333,6 +340,7 @@ while :; do ;; sid) # Debian sid __CodeName=sid + __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then __UbuntuRepo="http://ftp.debian.org/debian/" @@ -442,6 +450,10 @@ fi __UbuntuPackages+=" ${__LLDB_Package:-}" +if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ports.ubuntu.com/" +fi + if [[ -n "$__LLVM_MajorVersion" ]]; then __UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev" fi @@ -740,9 +752,16 @@ elif [[ -n "$__CodeName" ]]; then # shellcheck disable=SC2086 echo running debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" + mkdir -p "$__RootfsDir/etc/apt/sources.list.d/" - grep -q "Types:" "$__CrossDir/$__BuildArch/sources.list.$__CodeName" && filename="$__CodeName.sources" || filename="$__CodeName.list" - cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list.d/$filename" + cat > "$__RootfsDir/etc/apt/sources.list.d/$__CodeName.sources" < Date: Mon, 24 Jun 2024 15:28:26 +0000 Subject: [PATCH 079/257] Update dependencies from https://github.com/dotnet/winforms build 20240621.4 (#56424) [main] Update dependencies from dotnet/winforms --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bede36ed3388..f21bd244bd49 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -384,9 +384,9 @@ https://github.com/dotnet/runtime 7bc92926b36617f7a0646a8d936782bc4c3264ab - + https://github.com/dotnet/winforms - 8cbf7ea9a86cb42828fdc5af826f986bce3d2e98 + 10bd60e8b0bbc4639035a36fb7aed414a3581431 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index d19cb2f4cf01..e02aad37da5f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,7 +176,7 @@ 2.1.0-beta.24208.1 - 9.0.0-preview.6.24317.1 + 9.0.0-preview.7.24321.4 9.0.0-preview.24317.2 9.0.0-preview.24317.2 From 7aa68a31f5a460c5dab3d134621e8bb9eed51b0b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:20:40 +0000 Subject: [PATCH 080/257] Update dependencies from https://github.com/dotnet/extensions build 20240622.1 (#56422) [main] Update dependencies from dotnet/extensions --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f21bd244bd49..756dc2c1c208 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -414,13 +414,13 @@ https://github.com/dotnet/arcade 3aba80fecac252e1cdaffcebc0a37a24a960228b - + https://github.com/dotnet/extensions - 4329e1255047b5c739616eec5e491c9175d4eabc + 2ae751573d6ccd938176891c5cb8c75226c1451d - + https://github.com/dotnet/extensions - 4329e1255047b5c739616eec5e491c9175d4eabc + 2ae751573d6ccd938176891c5cb8c75226c1451d https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index e02aad37da5f..127a8129ba15 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -142,8 +142,8 @@ 9.0.0-preview.6.24320.8 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24316.1 - 9.0.0-preview.6.24316.1 + 9.0.0-preview.6.24322.1 + 9.0.0-preview.6.24322.1 9.0.0-preview.6.24318.1 9.0.0-preview.6.24318.1 From b9541a6b68c6c73d529e9e7bdca4b74a8f9eba2d Mon Sep 17 00:00:00 2001 From: David Perfors Date: Tue, 25 Jun 2024 02:47:19 +0200 Subject: [PATCH 081/257] Use IProblemDetailService in ValidationProblem (#51464) * Use ProblemDetailService in ValidationProblem Fixes #47631 * Fix build * Use the correct jsonserializer... --- .../Http.Results/src/ValidationProblem.cs | 8 +++- .../Http.Results/test/ProblemResultTests.cs | 4 +- .../test/ValidationProblemResultTests.cs | 40 ++++++++++++++++++- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/Http/Http.Results/src/ValidationProblem.cs b/src/Http/Http.Results/src/ValidationProblem.cs index c2afd0612f01..eaecf6bb72ac 100644 --- a/src/Http/Http.Results/src/ValidationProblem.cs +++ b/src/Http/Http.Results/src/ValidationProblem.cs @@ -49,21 +49,25 @@ internal ValidationProblem(HttpValidationProblemDetails problemDetails) int? IStatusCodeHttpResult.StatusCode => StatusCode; /// - public Task ExecuteAsync(HttpContext httpContext) + public async Task ExecuteAsync(HttpContext httpContext) { ArgumentNullException.ThrowIfNull(httpContext); var loggerFactory = httpContext.RequestServices.GetRequiredService(); var logger = loggerFactory.CreateLogger(typeof(ValidationProblem)); + var problemDetailsService = httpContext.RequestServices.GetService(); HttpResultsHelper.Log.WritingResultAsStatusCode(logger, StatusCode); httpContext.Response.StatusCode = StatusCode; - return HttpResultsHelper.WriteResultAsJsonAsync( + if (problemDetailsService is null || !await problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, ProblemDetails = ProblemDetails })) + { + await HttpResultsHelper.WriteResultAsJsonAsync( httpContext, logger, value: ProblemDetails, ContentType); + } } /// diff --git a/src/Http/Http.Results/test/ProblemResultTests.cs b/src/Http/Http.Results/test/ProblemResultTests.cs index 71fb62604678..701be73c9b74 100644 --- a/src/Http/Http.Results/test/ProblemResultTests.cs +++ b/src/Http/Http.Results/test/ProblemResultTests.cs @@ -44,7 +44,7 @@ public async Task ExecuteAsync_UsesDefaults_ForProblemDetails() } [Fact] - public async Task ExecuteAsync_UsesDefaultsFromProblemDetailsServoce_ForProblemDetails() + public async Task ExecuteAsync_UsesDefaultsFromProblemDetailsService_ForProblemDetails() { // Arrange var details = new ProblemDetails(); @@ -232,7 +232,7 @@ public void ProblemResult_Implements_IValueHttpResult_Correctly() [Fact] public void ProblemResult_Implements_IValueHttpResultOfT_Correctly() { - // Arrange + // Arrange var value = new ProblemDetails(); // Act & Assert diff --git a/src/Http/Http.Results/test/ValidationProblemResultTests.cs b/src/Http/Http.Results/test/ValidationProblemResultTests.cs index 74926c009136..f27e532bd1bd 100644 --- a/src/Http/Http.Results/test/ValidationProblemResultTests.cs +++ b/src/Http/Http.Results/test/ValidationProblemResultTests.cs @@ -45,6 +45,38 @@ public async Task ExecuteAsync_UsesDefaults_ForProblemDetails() Assert.Equal(StatusCodes.Status400BadRequest, responseDetails.Status); } + [Fact] + public async Task ExecuteAsync_UsesDefaultsFromProblemDetailsService_ForProblemDetails() + { + // Arrange + var details = new HttpValidationProblemDetails(); + + var result = new ValidationProblem(details); + var stream = new MemoryStream(); + var services = CreateServiceCollection() + .AddProblemDetails(options => options.CustomizeProblemDetails = x => x.ProblemDetails.Type = null) + .BuildServiceProvider(); + var httpContext = new DefaultHttpContext() + { + RequestServices = services, + Response = + { + Body = stream, + }, + }; + + // Act + await result.ExecuteAsync(httpContext); + + // Assert + Assert.Equal(StatusCodes.Status400BadRequest, httpContext.Response.StatusCode); + stream.Position = 0; + var responseDetails = JsonSerializer.Deserialize(stream, new JsonSerializerOptions(JsonSerializerDefaults.Web)); + Assert.Null(responseDetails.Type); + Assert.Equal("One or more validation errors occurred.", responseDetails.Title); + Assert.Equal(StatusCodes.Status400BadRequest, responseDetails.Status); + } + [Fact] public void ExecuteAsync_ThrowsArgumentNullException_ForNullProblemDetails() { @@ -141,11 +173,17 @@ public void ValidationProblemResult_Implements_IContentTypeHttpResult_Correctly( private static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) where TResult : IEndpointMetadataProvider => TResult.PopulateMetadata(method, builder); - private static IServiceProvider CreateServices() + private static IServiceCollection CreateServiceCollection() { var services = new ServiceCollection(); services.AddTransient(typeof(ILogger<>), typeof(NullLogger<>)); services.AddSingleton(NullLoggerFactory.Instance); + return services; + } + + private static IServiceProvider CreateServices() + { + var services = CreateServiceCollection(); return services.BuildServiceProvider(); } From 66de09a213ab91b13c7e3a6d386231089e6038cb Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Mon, 24 Jun 2024 22:03:16 -0700 Subject: [PATCH 082/257] Fix check for form parameters that don't need complex binding in RDG (#56332) * Fix check for form parameters that don't need complex binding in RDG * Move check to seperate method * Address feedback --- .../EndpointParameter.cs | 18 +++++++---- .../CompileTimeCreationTests.cs | 31 +++++++++++++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/Http/Http.Extensions/gen/StaticRouteHandlerModel/EndpointParameter.cs b/src/Http/Http.Extensions/gen/StaticRouteHandlerModel/EndpointParameter.cs index fade62857777..4854c72937d2 100644 --- a/src/Http/Http.Extensions/gen/StaticRouteHandlerModel/EndpointParameter.cs +++ b/src/Http/Http.Extensions/gen/StaticRouteHandlerModel/EndpointParameter.cs @@ -107,12 +107,11 @@ private void ProcessEndpointParameterSource(Endpoint endpoint, ISymbol symbol, I { AssigningCode = "httpContext.Request.Form"; } - // Complex form binding is only supported in RDF because it uses shared source with Blazor that requires dynamic analysis - // and codegen. Emit a diagnostic when these are encountered to avoid producing buggy code. - else if (!(SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_Extensions_Primitives_StringValues)) - || Type.SpecialType == SpecialType.System_String - || TryGetParsability(Type, wellKnownTypes, out var _) - || (IsArray && TryGetParsability(ElementType, wellKnownTypes, out var _)))) + // Minimal APIs shares the same implementation that Blazor uses for complex form binding at runtime. + // This implementation doesn't support source generation so RDG only supports simple binding for form-based + // arguments. If we encounter a complex object being bound from a form, emit a diagnostic and fallback to + // dynamic code-gen. + else if (!UsesSimpleBinding(wellKnownTypes)) { var location = endpoint.Operation.Syntax.GetLocation(); endpoint.Diagnostics.Add(Diagnostic.Create(DiagnosticDescriptors.UnableToResolveParameterDescriptor, location, symbol.Name)); @@ -258,6 +257,13 @@ Type is not INamedTypeSymbol namedTypeSymbol || endpoint.EmitterContext.HasJsonBodyOrQuery |= Source == EndpointParameterSource.JsonBodyOrQuery; } + private bool UsesSimpleBinding(WellKnownTypes wellKnownTypes) + => SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_Extensions_Primitives_StringValues)) + || Type.SpecialType == SpecialType.System_String + || (IsArray && ElementType.SpecialType == SpecialType.System_String) + || TryGetParsability(Type, wellKnownTypes, out var _) + || (IsArray && TryGetParsability(ElementType, wellKnownTypes, out var _)); + private static bool ImplementsIEndpointMetadataProvider(ITypeSymbol type, WellKnownTypes wellKnownTypes) => type.Implements(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_Metadata_IEndpointMetadataProvider)); diff --git a/src/Http/Http.Extensions/test/RequestDelegateGenerator/CompileTimeCreationTests.cs b/src/Http/Http.Extensions/test/RequestDelegateGenerator/CompileTimeCreationTests.cs index ce36e9afa225..fcbae8ef9d27 100644 --- a/src/Http/Http.Extensions/test/RequestDelegateGenerator/CompileTimeCreationTests.cs +++ b/src/Http/Http.Extensions/test/RequestDelegateGenerator/CompileTimeCreationTests.cs @@ -9,6 +9,8 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Http.Features; +using Microsoft.Extensions.Primitives; namespace Microsoft.AspNetCore.Http.Generators.Tests; @@ -757,4 +759,33 @@ public async Task RequestDelegateGenerator_SkipsComplexFormParameter() Assert.Equal(DiagnosticSeverity.Warning, diagnostic.Severity); }); } + + // Test for https://github.com/dotnet/aspnetcore/issues/55840 + [Fact] + public async Task RequestDelegatePopulatesFromOptionalFormParameterStringArray() + { + var source = """ +app.MapPost("/", ([FromForm] string[]? message, HttpContext httpContext) => +{ + httpContext.Items["message"] = message; +}); +"""; + var (generatorRunResult, compilation) = await RunGeneratorAsync(source); + var results = Assert.IsType(generatorRunResult); + Assert.Single(GetStaticEndpoints(results, GeneratorSteps.EndpointModelStep)); + + var endpoint = GetEndpointFromCompilation(compilation); + + var httpContext = CreateHttpContext(); + httpContext.Request.Form = new FormCollection(new Dictionary + { + ["message"] = new(["hello", "bye"]) + }); + httpContext.Request.Headers["Content-Type"] = "application/x-www-form-urlencoded"; + httpContext.Features.Set(new RequestBodyDetectionFeature(true)); + + await endpoint.RequestDelegate(httpContext); + + Assert.Equal(["hello", "bye"], (string[])httpContext.Items["message"]); + } } From 21c6b764e5a582e44c30729ebf172f484b1ffc42 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:07:46 -0700 Subject: [PATCH 083/257] [main] Update dependencies from dotnet/symreader (#56423) Microsoft.SourceBuild.Intermediate.symreader From Version 2.1.0-beta.24208.1 -> To Version 2.1.0-beta.24321.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 756dc2c1c208..1fff397ef43c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -435,9 +435,9 @@ 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 - + https://github.com/dotnet/symreader - 409af431ee684f9e07d34bbd4e51b9933345c1e1 + 200bba3d3695c902b740931b8d9c2ba09d037f24 diff --git a/eng/Versions.props b/eng/Versions.props index 127a8129ba15..8c99f477f65a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,7 +174,7 @@ 9.0.0-alpha.1.24304.1 - 2.1.0-beta.24208.1 + 2.1.0-beta.24321.1 9.0.0-preview.7.24321.4 From 23d2851045782abce70bbe17be12429789d8ddbf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 06:52:04 +0000 Subject: [PATCH 084/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#56373) [main] Update dependencies from dotnet/efcore, dotnet/runtime --- eng/Version.Details.xml | 320 ++++++++++++++++++++-------------------- eng/Versions.props | 160 ++++++++++---------- 2 files changed, 240 insertions(+), 240 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1fff397ef43c..f14dc8c47b36 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,325 +9,325 @@ --> - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/efcore - 9a80b6b085fbe20cdb1c60b549947ecabefe9172 + ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 7bc92926b36617f7a0646a8d936782bc4c3264ab + d38e5593427f63e513ca3be11c3fdccb07b88ce1 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 8c99f477f65a..4fed3b2dc95c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,92 +67,92 @@ --> - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 - 9.0.0-preview.6.24320.8 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 + 9.0.0-preview.6.24323.2 9.0.0-preview.6.24322.1 9.0.0-preview.6.24322.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 - 9.0.0-preview.6.24318.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24322.1 4.11.0-1.24218.5 4.11.0-1.24218.5 From 2d539256f4d641d0120a5f4881156ac40ec8b57f Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 25 Jun 2024 10:48:30 +0100 Subject: [PATCH 085/257] Revert "Skip some Razor build tests to observe effect on test runner (#56292)" (#56343) --- src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs | 3 --- src/Testing/src/xunit/HelixConstants.cs | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs index 3fa09a161488..ce32e882979f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs @@ -4,7 +4,6 @@ using System.Net; using System.Net.Http; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; @@ -84,7 +83,6 @@ public async Task RzcViewsArePreferredToRuntimeViews() } [Fact] - [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/56322", Queues = $"{HelixConstants.Debian12};{HelixConstants.Mariner}")] public async Task RazorViews_AreUpdatedOnChange() { // Arrange @@ -122,7 +120,6 @@ public async Task RazorViews_AreUpdatedOnChange() } [Fact] - [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/56322", Queues = $"{HelixConstants.Debian12};{HelixConstants.Mariner}")] public async Task RazorPages_AreUpdatedOnChange() { // Arrange diff --git a/src/Testing/src/xunit/HelixConstants.cs b/src/Testing/src/xunit/HelixConstants.cs index 4ae98502b7f0..47f938e8446f 100644 --- a/src/Testing/src/xunit/HelixConstants.cs +++ b/src/Testing/src/xunit/HelixConstants.cs @@ -8,8 +8,6 @@ public static class HelixConstants public const string Windows10Arm64 = "Windows.10.Arm64v8.Open;"; public const string DebianAmd64 = "Debian.11.Amd64.Open;"; public const string DebianArm64 = "Debian.11.Arm64.Open;"; - public const string Debian12 = "(Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64"; public const string AlmaLinuxAmd64 = "(AlmaLinux.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix-amd64;"; - public const string Mariner = "(Mariner)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64"; public const string NativeAotNotSupportedHelixQueues = "All.OSX;All.Linux;Windows.11.Amd64.Client.Open;Windows.11.Amd64.Client;Windows.Amd64.Server2022.Open;Windows.Amd64.Server2022;windows.11.arm64.open;windows.11.arm64"; } From bcee3d9e5b1883326c430e18a02b4f4463da1e72 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:16:46 +0000 Subject: [PATCH 086/257] Update dependencies from https://github.com/dotnet/runtime build 20240624.19 (#56446) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f14dc8c47b36..f4fc7c44eae1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - d38e5593427f63e513ca3be11c3fdccb07b88ce1 + a54d9e9b991c9059f85150f2e69b6507f103b322 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 4fed3b2dc95c..191f4cf76be8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 - 9.0.0-preview.6.24323.2 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24324.19 9.0.0-preview.6.24322.1 9.0.0-preview.6.24322.1 From b7e96bc12429138db9d5602003a2f2125bd4a029 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 25 Jun 2024 18:11:24 +0100 Subject: [PATCH 087/257] Skip Templates.Mvc.Tests in Helix on Debian12 and Mariner (#56291) --- .../test/Templates.Mvc.Tests/Templates.Mvc.Tests.csproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ProjectTemplates/test/Templates.Mvc.Tests/Templates.Mvc.Tests.csproj b/src/ProjectTemplates/test/Templates.Mvc.Tests/Templates.Mvc.Tests.csproj index 73e325bd6b20..5c22eb292e21 100644 --- a/src/ProjectTemplates/test/Templates.Mvc.Tests/Templates.Mvc.Tests.csproj +++ b/src/ProjectTemplates/test/Templates.Mvc.Tests/Templates.Mvc.Tests.csproj @@ -20,6 +20,14 @@ Mvc true 02:30:00 + + + + + $(HelixQueueDebian12); + $(HelixQueueMariner); + $(SkipHelixQueues) + From ce80910dbb3c662e309b6eeeab775e8134010786 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Tue, 25 Jun 2024 11:10:54 -0700 Subject: [PATCH 088/257] Quarantine CacheTagHelper_VaryByCultureComposesWithOtherVaryByOptions (#56441) --- .../test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs index 8cef176a1549..513a56947d51 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs @@ -126,6 +126,7 @@ void ReadValuesFromDocument() } } + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/56440")] [Fact] public async Task CacheTagHelper_VaryByCultureComposesWithOtherVaryByOptions() { From ee4a0e9801c4e1e673d0373e1c51a6790de174cc Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Wed, 26 Jun 2024 00:24:03 -0700 Subject: [PATCH 089/257] Only enable SwaggerUI in development (#56455) --- .../JsonTranscoding/test/testassets/Sandbox/Startup.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Grpc/JsonTranscoding/test/testassets/Sandbox/Startup.cs b/src/Grpc/JsonTranscoding/test/testassets/Sandbox/Startup.cs index 52e10479fc58..4106b2bd9cc4 100644 --- a/src/Grpc/JsonTranscoding/test/testassets/Sandbox/Startup.cs +++ b/src/Grpc/JsonTranscoding/test/testassets/Sandbox/Startup.cs @@ -30,10 +30,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) #region Secret app.UseSwagger(); - app.UseSwaggerUI(c => + if (env.IsDevelopment()) { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); - }); + app.UseSwaggerUI(c => + { + c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + }); + } #endregion app.UseRouting(); From 4c8b5fefd708130453d4ac029dc78e87d6fb63b7 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Wed, 26 Jun 2024 10:07:38 -0700 Subject: [PATCH 090/257] Fix up nullability and primitive type handing in schema generation (#56372) * Fix up nullability and primitive type handing in schema generation * Guard against unsupported NIC and fix object schemas * Address feedback * Move primitive types to constants --- .../Extensions/JsonNodeSchemaExtensions.cs | 24 +++++----- .../src/Extensions/JsonTypeInfoExtensions.cs | 38 +++++++-------- src/OpenApi/src/Services/OpenApiConstants.cs | 35 ++++++++++++++ .../Services/Schemas/OpenApiSchemaService.cs | 11 ++++- .../Services/Schemas/OpenApiSchemaStore.cs | 7 ++- ...ment_documentName=controllers.verified.txt | 27 ++++------- ...piDocument_documentName=forms.verified.txt | 24 +++------- ...cument_documentName=responses.verified.txt | 24 +++------- ...t_documentName=schemas-by-ref.verified.txt | 40 ++++++++-------- ...enApiDocument_documentName=v1.verified.txt | 47 +++++++------------ ...OpenApiComponentService.ResponseSchemas.cs | 45 ++++++++++++++++++ .../OpenApiSchemaReferenceTransformerTests.cs | 31 ++---------- 12 files changed, 188 insertions(+), 165 deletions(-) diff --git a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index dadd88c1858a..366d9c25daf3 100644 --- a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -24,8 +24,6 @@ namespace Microsoft.AspNetCore.OpenApi; /// internal static class JsonNodeSchemaExtensions { - private static readonly NullabilityInfoContext _nullabilityInfoContext = new(); - private static readonly Dictionary _simpleTypeToOpenApiSchema = new() { [typeof(bool)] = new() { Type = "boolean" }, @@ -350,7 +348,10 @@ internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaEx /// The associated with the current type. internal static void ApplySchemaReferenceId(this JsonNode schema, JsonSchemaExporterContext context) { - schema[OpenApiConstants.SchemaId] = context.TypeInfo.GetSchemaReferenceId(); + if (context.TypeInfo.GetSchemaReferenceId() is { } schemaReferenceId) + { + schema[OpenApiConstants.SchemaId] = schemaReferenceId; + } } /// @@ -365,7 +366,8 @@ internal static void ApplyNullabilityContextInfo(this JsonNode schema, Parameter return; } - var nullabilityInfo = _nullabilityInfoContext.Create(parameterInfo); + var nullabilityInfoContext = new NullabilityInfoContext(); + var nullabilityInfo = nullabilityInfoContext.Create(parameterInfo); if (nullabilityInfo.WriteState == NullabilityState.Nullable) { schema[OpenApiSchemaKeywords.NullableKeyword] = true; @@ -376,16 +378,12 @@ internal static void ApplyNullabilityContextInfo(this JsonNode schema, Parameter /// Support applying nullability status for reference types provided as a property or field. /// /// The produced by the underlying schema generator. - /// The or associated with the schema. - internal static void ApplyNullabilityContextInfo(this JsonNode schema, ICustomAttributeProvider attributeProvider) + /// The associated with the schema. + internal static void ApplyNullabilityContextInfo(this JsonNode schema, JsonPropertyInfo propertyInfo) { - var nullabilityInfo = attributeProvider switch - { - PropertyInfo propertyInfo => !propertyInfo.PropertyType.IsValueType ? _nullabilityInfoContext.Create(propertyInfo) : null, - FieldInfo fieldInfo => !fieldInfo.FieldType.IsValueType ? _nullabilityInfoContext.Create(fieldInfo) : null, - _ => null - }; - if (nullabilityInfo is { WriteState: NullabilityState.Nullable } or { ReadState: NullabilityState.Nullable }) + // Avoid setting explicit nullability annotations for `object` types so they continue to match on the catch + // all schema (no type, no format, no constraints). + if (propertyInfo.PropertyType != typeof(object) && (propertyInfo.IsGetNullable || propertyInfo.IsSetNullable)) { schema[OpenApiSchemaKeywords.NullableKeyword] = true; } diff --git a/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs b/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs index fa5cc8e119e1..ac1a87c129cc 100644 --- a/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs @@ -45,10 +45,19 @@ internal static class JsonTypeInfoExtensions /// generated reference ID. /// /// The associated with the target schema. + /// + /// When , returns schema name for primitive + /// types to support use in list/dictionary types. + /// /// The schema reference ID represented as a string name. - internal static string GetSchemaReferenceId(this JsonTypeInfo jsonTypeInfo) + internal static string? GetSchemaReferenceId(this JsonTypeInfo jsonTypeInfo, bool isTopLevel = true) { var type = jsonTypeInfo.Type; + if (isTopLevel && OpenApiConstants.PrimitiveTypes.Contains(type)) + { + return null; + } + // Short-hand if the type we're generating a schema reference ID for is // one of the simple types defined above. if (_simpleTypeToName.TryGetValue(type, out var simpleName)) @@ -59,14 +68,14 @@ internal static string GetSchemaReferenceId(this JsonTypeInfo jsonTypeInfo) if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Enumerable, ElementType: { } elementType }) { var elementTypeInfo = jsonTypeInfo.Options.GetTypeInfo(elementType); - return $"ArrayOf{elementTypeInfo.GetSchemaReferenceId()}"; + return $"ArrayOf{elementTypeInfo.GetSchemaReferenceId(isTopLevel: false)}"; } if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Dictionary, KeyType: { } keyType, ElementType: { } valueType }) { var keyTypeInfo = jsonTypeInfo.Options.GetTypeInfo(keyType); var valueTypeInfo = jsonTypeInfo.Options.GetTypeInfo(valueType); - return $"DictionaryOf{keyTypeInfo.GetSchemaReferenceId()}And{valueTypeInfo.GetSchemaReferenceId()}"; + return $"DictionaryOf{keyTypeInfo.GetSchemaReferenceId(isTopLevel: false)}And{valueTypeInfo.GetSchemaReferenceId(isTopLevel: false)}"; } return type.GetSchemaReferenceId(jsonTypeInfo.Options); @@ -86,7 +95,7 @@ internal static string GetSchemaReferenceId(this Type type, JsonSerializerOption if (type.IsArray && type.GetElementType() is { } elementType) { var elementTypeInfo = options.GetTypeInfo(elementType); - return $"ArrayOf{elementTypeInfo.GetSchemaReferenceId()}"; + return $"ArrayOf{elementTypeInfo.GetSchemaReferenceId(isTopLevel: false)}"; } // Special handling for anonymous types @@ -98,23 +107,14 @@ internal static string GetSchemaReferenceId(this Type type, JsonSerializerOption return $"{typeName}Of{propertyNames}"; } + // Special handling for generic types that are collections + // Generic types become a concatenation of the generic type name and the type arguments if (type.IsGenericType) { - // Nullable types are suffixed with `?` (e.g. `Todo?`) - if (type.GetGenericTypeDefinition() == typeof(Nullable<>) - && Nullable.GetUnderlyingType(type) is { } underlyingType) - { - return $"{underlyingType.GetSchemaReferenceId(options)}?"; - } - // Special handling for generic types that are collections - // Generic types become a concatenation of the generic type name and the type arguments - else - { - var genericTypeName = type.Name[..type.Name.LastIndexOf('`')]; - var genericArguments = type.GetGenericArguments(); - var argumentNames = string.Join("And", genericArguments.Select(arg => arg.GetSchemaReferenceId(options))); - return $"{genericTypeName}Of{argumentNames}"; - } + var genericTypeName = type.Name[..type.Name.LastIndexOf('`')]; + var genericArguments = type.GetGenericArguments(); + var argumentNames = string.Join("And", genericArguments.Select(arg => arg.GetSchemaReferenceId(options))); + return $"{genericTypeName}Of{argumentNames}"; } return type.Name; } diff --git a/src/OpenApi/src/Services/OpenApiConstants.cs b/src/OpenApi/src/Services/OpenApiConstants.cs index d0adb4e3d797..e6d99096dc45 100644 --- a/src/OpenApi/src/Services/OpenApiConstants.cs +++ b/src/OpenApi/src/Services/OpenApiConstants.cs @@ -27,4 +27,39 @@ internal static class OpenApiConstants OperationType.Patch, OperationType.Trace ]; + // Represents primitive types that should never be represented as + // a schema reference and always inlined. + internal static readonly List PrimitiveTypes = + [ + typeof(bool), + typeof(byte), + typeof(sbyte), + typeof(byte[]), + typeof(string), + typeof(int), + typeof(uint), + typeof(nint), + typeof(nuint), + typeof(Int128), + typeof(UInt128), + typeof(long), + typeof(ulong), + typeof(float), + typeof(double), + typeof(decimal), + typeof(Half), + typeof(ulong), + typeof(short), + typeof(ushort), + typeof(char), + typeof(object), + typeof(DateTime), + typeof(DateTimeOffset), + typeof(TimeOnly), + typeof(DateOnly), + typeof(TimeSpan), + typeof(Guid), + typeof(Uri), + typeof(Version) + ]; } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 8ee0c89ec365..dd26c4d0a1d0 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -81,11 +81,18 @@ internal sealed class OpenApiSchemaService( } }; } + // STJ uses `true` in place of an empty object to represent a schema that matches + // anything. We override this default behavior here to match the style traditionally + // expected in OpenAPI documents. + if (type == typeof(object)) + { + schema = new JsonObject(); + } schema.ApplyPrimitiveTypesAndFormats(context); schema.ApplySchemaReferenceId(context); - if (context.PropertyInfo is { AttributeProvider: { } attributeProvider }) + if (context.PropertyInfo is { AttributeProvider: { } attributeProvider } jsonPropertyInfo) { - schema.ApplyNullabilityContextInfo(attributeProvider); + schema.ApplyNullabilityContextInfo(jsonPropertyInfo); if (attributeProvider.GetCustomAttributes(inherit: false).OfType() is { } validationAttributes) { schema.ApplyValidationAttributes(validationAttributes); diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index 19fe48c57a2e..2834779eeba4 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -144,9 +144,8 @@ private void AddOrUpdateSchemaByReference(OpenApiSchema schema) // } // In this case, although the reference ID based on the .NET type we would use is `string`, the // two schemas are distinct. - if (referenceId == null) + if (referenceId == null && GetSchemaReferenceId(schema) is { } targetReferenceId) { - var targetReferenceId = GetSchemaReferenceId(schema); if (_referenceIdCounter.TryGetValue(targetReferenceId, out var counter)) { counter++; @@ -166,7 +165,7 @@ private void AddOrUpdateSchemaByReference(OpenApiSchema schema) } } - private static string GetSchemaReferenceId(OpenApiSchema schema) + private static string? GetSchemaReferenceId(OpenApiSchema schema) { if (schema.Extensions.TryGetValue(OpenApiConstants.SchemaId, out var referenceIdAny) && referenceIdAny is OpenApiString { Value: string referenceId }) @@ -174,6 +173,6 @@ private static string GetSchemaReferenceId(OpenApiSchema schema) return referenceId; } - throw new InvalidOperationException("The schema reference ID must be set on the schema."); + return null; } } diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt index 1381536d4b71..ee74ac8a705d 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt @@ -25,7 +25,8 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/string2" + "minLength": 5, + "type": "string" } } ], @@ -35,17 +36,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/string" + "type": "string" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/string" + "type": "string" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/string" + "type": "string" } } } @@ -65,10 +66,12 @@ "type": "object", "properties": { "Title": { - "$ref": "#/components/schemas/string2" + "minLength": 5, + "type": "string" }, "Description": { - "$ref": "#/components/schemas/string2" + "minLength": 5, + "type": "string" }, "IsCompleted": { "type": "boolean" @@ -92,17 +95,7 @@ } } }, - "components": { - "schemas": { - "string": { - "type": "string" - }, - "string2": { - "minLength": 5, - "type": "string" - } - } - }, + "components": { }, "tags": [ { "name": "Test" diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt index a82a5f4d0237..30fef01ed886 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt @@ -200,13 +200,6 @@ }, "components": { "schemas": { - "boolean": { - "type": "boolean" - }, - "DateTime": { - "type": "string", - "format": "date-time" - }, "IFormFile": { "type": "string", "format": "binary" @@ -217,13 +210,6 @@ "$ref": "#/components/schemas/IFormFile" } }, - "int": { - "type": "integer", - "format": "int32" - }, - "string": { - "type": "string" - }, "Todo": { "required": [ "id", @@ -234,16 +220,18 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" }, "title": { - "$ref": "#/components/schemas/string" + "type": "string" }, "completed": { - "$ref": "#/components/schemas/boolean" + "type": "boolean" }, "createdAt": { - "$ref": "#/components/schemas/DateTime" + "type": "string", + "format": "date-time" } } } diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt index 7e4b0ff5dc5e..b3fc620e73ea 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt @@ -89,20 +89,6 @@ }, "components": { "schemas": { - "boolean": { - "type": "boolean" - }, - "DateTime": { - "type": "string", - "format": "date-time" - }, - "int": { - "type": "integer", - "format": "int32" - }, - "string": { - "type": "string" - }, "Todo": { "required": [ "id", @@ -113,16 +99,18 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" }, "title": { - "$ref": "#/components/schemas/string" + "type": "string" }, "completed": { - "$ref": "#/components/schemas/boolean" + "type": "boolean" }, "createdAt": { - "$ref": "#/components/schemas/DateTime" + "type": "string", + "format": "date-time" } } } diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt index 7bfff186438b..747bf07f150a 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt @@ -45,7 +45,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/string" + "type": "string" } } } @@ -96,7 +96,8 @@ "description": "The ID associated with the Todo item.", "required": true, "schema": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } }, { @@ -105,7 +106,8 @@ "description": "The number of Todos to fetch", "required": true, "schema": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } } ], @@ -195,7 +197,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } } } @@ -224,7 +227,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } } } @@ -243,7 +247,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } } } @@ -296,43 +301,40 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" }, "name": { - "$ref": "#/components/schemas/string" + "type": "string" } } }, "ArrayOfint": { "type": "array", "items": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } }, "DictionaryOfstringAndint": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } }, - "int": { - "type": "integer", - "format": "int32" - }, "Product": { "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" }, "name": { - "$ref": "#/components/schemas/string" + "type": "string" } } }, - "string": { - "type": "string" - }, "Triangle": { "type": "object" } diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt index 17594e92aecc..d8b4654e535a 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt @@ -71,16 +71,18 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" }, "title": { - "$ref": "#/components/schemas/string" + "type": "string" }, "completed": { - "$ref": "#/components/schemas/boolean" + "type": "boolean" }, "createdAt": { - "$ref": "#/components/schemas/DateTime" + "type": "string", + "format": "date-time" } } } @@ -107,7 +109,8 @@ "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" } }, { @@ -135,19 +138,22 @@ "type": "object", "properties": { "dueDate": { - "$ref": "#/components/schemas/DateTime" + "type": "string", + "format": "date-time" }, "id": { - "$ref": "#/components/schemas/int" + "type": "integer", + "format": "int32" }, "title": { - "$ref": "#/components/schemas/string" + "type": "string" }, "completed": { - "$ref": "#/components/schemas/boolean" + "type": "boolean" }, "createdAt": { - "$ref": "#/components/schemas/DateTime" + "type": "string", + "format": "date-time" } } } @@ -163,26 +169,9 @@ "ArrayOfGuid": { "type": "array", "items": { - "$ref": "#/components/schemas/Guid" + "type": "string", + "format": "uuid" } - }, - "boolean": { - "type": "boolean" - }, - "DateTime": { - "type": "string", - "format": "date-time" - }, - "Guid": { - "type": "string", - "format": "uuid" - }, - "int": { - "type": "integer", - "format": "int32" - }, - "string": { - "type": "string" } }, "securitySchemes": { diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs index 33ef322a2b8a..4f725ebc215d 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.OpenApi.Any; @@ -606,4 +607,48 @@ await VerifyOpenApiDocument(builder, document => }); }); } + + // Test for https://github.com/dotnet/aspnetcore/issues/56351 + [Fact] + public async Task GetOpenApiResponse_SupportsObjectTypeProperty() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapGet("/", () => new ClassWithObjectProperty { Object = new Todo(1, "Test Title", true, DateTime.Now) }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/"].Operations[OperationType.Get]; + var responses = Assert.Single(operation.Responses); + var response = responses.Value; + Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); + Assert.Equal("object", mediaType.Schema.Type); + Assert.Collection(mediaType.Schema.Properties, + property => + { + Assert.Equal("object", property.Key); + Assert.Null(property.Value.Type); + Assert.False(property.Value.Nullable); + }, + property => + { + Assert.Equal("anotherObject", property.Key); + Assert.Null(property.Value.Type); + Assert.Equal(32, ((OpenApiInteger)property.Value.Default).Value); + Assert.Equal("This is a description", property.Value.Description); + }); + }); + } + + private class ClassWithObjectProperty + { + public object Object { get; set; } + + [Description("This is a description")] + [DefaultValue(32)] + public object AnotherObject { get; set; } + } } diff --git a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs index 57578a37cc5b..a2c88e306c38 100644 --- a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs +++ b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs @@ -201,14 +201,10 @@ await VerifyOpenApiDocument(builder, document => Assert.Equal("string", requestBodySchema.AllOf[0].Properties["resume"].Type); Assert.Equal("binary", requestBodySchema.AllOf[0].Properties["resume"].Format); - // String parameter `name` should use reference ID shared by string properties in the - // Todo object. + // string parameter is not resolved to a top-level reference. Assert.Equal("object", requestBodySchema2.AllOf[0].Type); - var nameParameterReference = requestBodySchema2.AllOf[0].Properties["name"].Reference.Id; - var todoTitleReference = requestBodySchema.AllOf[1].GetEffective(document).Properties["title"].Reference.Id; - var todoTitleReference2 = requestBodySchema2.AllOf[1].GetEffective(document).Properties["title"].Reference.Id; - Assert.Equal(nameParameterReference, todoTitleReference); - Assert.Equal(nameParameterReference, todoTitleReference2); + Assert.Null(requestBodySchema.AllOf[1].GetEffective(document).Properties["title"].Reference); + Assert.Null(requestBodySchema2.AllOf[1].GetEffective(document).Properties["title"].Reference); }); } @@ -293,25 +289,8 @@ await VerifyOpenApiDocument(builder, options, document => Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _)); // Schemas are distinct because of applied transformer so no reference is used. Assert.Null(responseSchema.Reference); - - // References are still created for common types within the complex object (boolean, int, etc.) - Assert.Collection(document.Components.Schemas.Keys, - key => - { - Assert.Equal("boolean", key); - }, - key => - { - Assert.Equal("DateTime", key); - }, - key => - { - Assert.Equal("int", key); - }, - key => - { - Assert.Equal("string", key); - }); + // No schemas get componentized here + Assert.Empty(document.Components.Schemas); }); } } From 94259788d58e16ba753900b4bf855a6aee08dcb1 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Wed, 26 Jun 2024 20:17:54 +0100 Subject: [PATCH 091/257] Use JSON source generator in WebApplicationFactory (#55595) Use JSON source generator to deserialize dictionary. Resolves #55586. --- src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs b/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs index 39004a181e76..dd43bdac2e7c 100644 --- a/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs +++ b/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs @@ -6,6 +6,7 @@ using System.Net.Http; using System.Reflection; using System.Text.Json; +using System.Text.Json.Serialization; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.TestHost; @@ -21,7 +22,7 @@ namespace Microsoft.AspNetCore.Mvc.Testing; /// /// A type in the entry point assembly of the application. /// Typically the Startup or Program classes can be used. -public class WebApplicationFactory : IDisposable, IAsyncDisposable where TEntryPoint : class +public partial class WebApplicationFactory : IDisposable, IAsyncDisposable where TEntryPoint : class { private bool _disposed; private bool _disposedAsync; @@ -235,7 +236,7 @@ private void SetContentRoot(IWebHostBuilder builder) private static string? GetContentRootFromFile(string file) { - var data = JsonSerializer.Deserialize>(File.ReadAllBytes(file))!; + var data = JsonSerializer.Deserialize(File.ReadAllBytes(file), CustomJsonSerializerContext.Default.IDictionaryStringString)!; var key = typeof(TEntryPoint).Assembly.GetName().FullName; // If the `ContentRoot` is not provided in the app manifest, then return null @@ -248,6 +249,9 @@ private void SetContentRoot(IWebHostBuilder builder) return (contentRoot == "~") ? AppContext.BaseDirectory : contentRoot; } + [JsonSerializable(typeof(IDictionary))] + private sealed partial class CustomJsonSerializerContext : JsonSerializerContext; + private string? GetContentRootFromAssembly() { var metadataAttributes = GetContentRootMetadataAttributes( From 250b489a34b6c01509ed24b18b47b082d8ba4744 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:39:57 +0000 Subject: [PATCH 092/257] [main] Update dependencies from dotnet/runtime (#56464) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f4fc7c44eae1..ee2054686198 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - a54d9e9b991c9059f85150f2e69b6507f103b322 + 58e1a7e6e499da2cd502bebb326497795101783f https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 191f4cf76be8..96c9e7ce7220 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 - 9.0.0-preview.7.24324.19 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24326.3 9.0.0-preview.6.24322.1 9.0.0-preview.6.24322.1 From a46fa59fb716e040e943bb69cf63c99402b8120c Mon Sep 17 00:00:00 2001 From: Brennan Date: Thu, 27 Jun 2024 12:28:02 -0700 Subject: [PATCH 093/257] Quarantine RunAsync_CanFilterHealthChecks (#56246) https://github.com/dotnet/aspnetcore/issues/56245 --- .../HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs b/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs index c527473101f7..bfdea1968900 100644 --- a/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs +++ b/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs @@ -497,6 +497,7 @@ public async Task RunAsync_PublishersCanTimeout() } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/56245")] public async Task RunAsync_CanFilterHealthChecks() { // Arrange From 4b9bf254423cb8e06184329b7f2240dc7353ba52 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Thu, 27 Jun 2024 18:57:09 -0700 Subject: [PATCH 094/257] Set OpenAPI discriminators for JSON polymorphic types (#56466) * Set OpenAPI discriminators for JSON polymorphic types * Use MapPost instead of MapGet for sample endpoints --- src/OpenApi/sample/Program.cs | 5 +- src/OpenApi/sample/Sample.csproj | 3 +- .../Extensions/JsonNodeSchemaExtensions.cs | 16 +- .../src/Schemas/OpenApiJsonSchema.Helpers.cs | 19 ++ .../src/Schemas/OpenApiSchemaKeywords.cs | 1 + .../Services/Schemas/OpenApiSchemaService.cs | 1 + .../Services/Schemas/OpenApiSchemaStore.cs | 15 +- ...cument_documentName=responses.verified.txt | 77 ++++- ...t_documentName=schemas-by-ref.verified.txt | 267 +++++++++++++++++- ... OpenApiSchemaService.ParameterSchemas.cs} | 2 +- ...OpenApiSchemaService.PolymorphicSchemas.cs | 177 ++++++++++++ ...penApiSchemaService.RequestBodySchemas.cs} | 2 +- ...> OpenApiSchemaService.ResponseSchemas.cs} | 2 +- .../test/Shared/SharedTypes.Polymorphism.cs | 74 +++++ src/OpenApi/test/{ => Shared}/SharedTypes.cs | 17 -- 15 files changed, 644 insertions(+), 34 deletions(-) rename src/OpenApi/test/Services/OpenApiSchemaService/{OpenApiComponentService.ParameterSchemas.cs => OpenApiSchemaService.ParameterSchemas.cs} (99%) create mode 100644 src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs rename src/OpenApi/test/Services/OpenApiSchemaService/{OpenApiComponentService.RequestBodySchemas.cs => OpenApiSchemaService.RequestBodySchemas.cs} (99%) rename src/OpenApi/test/Services/OpenApiSchemaService/{OpenApiComponentService.ResponseSchemas.cs => OpenApiSchemaService.ResponseSchemas.cs} (99%) create mode 100644 src/OpenApi/test/Shared/SharedTypes.Polymorphism.cs rename src/OpenApi/test/{ => Shared}/SharedTypes.cs (87%) diff --git a/src/OpenApi/sample/Program.cs b/src/OpenApi/sample/Program.cs index 9d8df2a2b470..b567bb89a563 100644 --- a/src/OpenApi/sample/Program.cs +++ b/src/OpenApi/sample/Program.cs @@ -91,7 +91,7 @@ .Produces(contentType: "text/xml"); responses.MapGet("/triangle", () => new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 }); -responses.MapGet("/shape", () => new Shape { Color = "blue", Sides = 4 }); +responses.MapGet("/shape", Shape () => new Triangle { Color = "blue", Sides = 4 }); schemas.MapGet("/typed-results", () => TypedResults.Ok(new Triangle { Color = "red", Sides = 3, Hypotenuse = 5.0 })); schemas.MapGet("/multiple-results", Results, NotFound> () => Random.Shared.Next(0, 2) == 0 @@ -108,6 +108,9 @@ schemas.MapPost("/ienumerable-of-ints", (IEnumerable values) => values.Count()); schemas.MapGet("/dictionary-of-ints", () => new Dictionary { { "one", 1 }, { "two", 2 } }); schemas.MapGet("/frozen-dictionary-of-ints", () => ImmutableDictionary.CreateRange(new Dictionary { { "one", 1 }, { "two", 2 } })); +schemas.MapPost("/shape", (Shape shape) => { }); +schemas.MapPost("/weatherforecastbase", (WeatherForecastBase forecast) => { }); +schemas.MapPost("/person", (Person person) => { }); app.MapControllers(); diff --git a/src/OpenApi/sample/Sample.csproj b/src/OpenApi/sample/Sample.csproj index 929f3a18c600..aa85248ddd31 100644 --- a/src/OpenApi/sample/Sample.csproj +++ b/src/OpenApi/sample/Sample.csproj @@ -22,7 +22,8 @@ - + + diff --git a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index 366d9c25daf3..237bdbeb3d74 100644 --- a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -324,17 +324,23 @@ internal static void ApplyParameterInfo(this JsonNode schema, ApiParameterDescri /// The associated with the current type. internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaExporterContext context) { - if (context.TypeInfo.PolymorphismOptions is { } polymorphismOptions) + // The `context.Path.Length == 0` check is used to ensure that we only apply the polymorphism options + // to the top-level schema and not to any nested schemas that are generated. + if (context.TypeInfo.PolymorphismOptions is { } polymorphismOptions && context.Path.Length == 0) { var mappings = new JsonObject(); foreach (var derivedType in polymorphismOptions.DerivedTypes) { - if (derivedType.TypeDiscriminator is null) + if (derivedType.TypeDiscriminator is { } discriminator) { - continue; + var jsonDerivedType = context.TypeInfo.Options.GetTypeInfo(derivedType.DerivedType); + // Discriminator mappings are only supported in OpenAPI v3+ so we can safely assume that + // the generated reference mappings will support the OpenAPI v3 schema reference format + // that we hardcode here. We could use `OpenApiReference` to construct the reference and + // serialize it but we use a hardcoded string here to avoid allocating a new object and + // working around Microsoft.OpenApi's serialization libraries. + mappings[$"{discriminator}"] = $"#/components/schemas/{context.TypeInfo.GetSchemaReferenceId()}{jsonDerivedType.GetSchemaReferenceId()}"; } - // TODO: Use the actual reference ID instead of the empty string. - mappings[derivedType.TypeDiscriminator.ToString()!] = string.Empty; } schema[OpenApiSchemaKeywords.DiscriminatorKeyword] = polymorphismOptions.TypeDiscriminatorPropertyName; schema[OpenApiSchemaKeywords.DiscriminatorMappingKeyword] = mappings; diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index aa9fa15626fe..26bb74e2c8cc 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -83,7 +83,11 @@ internal sealed partial class OpenApiJsonSchema } internal static IOpenApiAny? ReadOpenApiAny(ref Utf8JsonReader reader) + => ReadOpenApiAny(ref reader, out _); + + internal static IOpenApiAny? ReadOpenApiAny(ref Utf8JsonReader reader, out string? type) { + type = null; if (reader.TokenType == JsonTokenType.Null) { return new OpenApiNull(); @@ -91,6 +95,7 @@ internal sealed partial class OpenApiJsonSchema if (reader.TokenType == JsonTokenType.True || reader.TokenType == JsonTokenType.False) { + type = "boolean"; return new OpenApiBoolean(reader.GetBoolean()); } @@ -98,32 +103,38 @@ internal sealed partial class OpenApiJsonSchema { if (reader.TryGetInt32(out var intValue)) { + type = "integer"; return new OpenApiInteger(intValue); } if (reader.TryGetInt64(out var longValue)) { + type = "integer"; return new OpenApiLong(longValue); } if (reader.TryGetSingle(out var floatValue) && !float.IsInfinity(floatValue)) { + type = "number"; return new OpenApiFloat(floatValue); } if (reader.TryGetDouble(out var doubleValue)) { + type = "number"; return new OpenApiDouble(doubleValue); } } if (reader.TokenType == JsonTokenType.String) { + type = "string"; return new OpenApiString(reader.GetString()); } if (reader.TokenType == JsonTokenType.StartArray) { + type = "array"; var array = new OpenApiArray(); while (reader.TokenType != JsonTokenType.EndArray) { @@ -135,6 +146,7 @@ internal sealed partial class OpenApiJsonSchema if (reader.TokenType == JsonTokenType.StartObject) { + type = "object"; var obj = new OpenApiObject(); reader.Read(); while (reader.TokenType != JsonTokenType.EndObject) @@ -294,6 +306,13 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, reader.Read(); schema.Extensions.Add(OpenApiConstants.SchemaId, new OpenApiString(reader.GetString())); break; + // OpenAPI does not support the `const` keyword in its schema implementation, so + // we map it to its closest approximation, an enum with a single value, here. + case OpenApiSchemaKeywords.ConstKeyword: + reader.Read(); + schema.Enum = [ReadOpenApiAny(ref reader, out var constType)]; + schema.Type = constType; + break; default: reader.Skip(); break; diff --git a/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs b/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs index 1c41c47e1973..7588749457db 100644 --- a/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs +++ b/src/OpenApi/src/Schemas/OpenApiSchemaKeywords.cs @@ -25,4 +25,5 @@ internal class OpenApiSchemaKeywords public const string MaxItemsKeyword = "maxItems"; public const string RefKeyword = "$ref"; public const string SchemaIdKeyword = "x-schema-id"; + public const string ConstKeyword = "const"; } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index dd26c4d0a1d0..565cb01a4c18 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -90,6 +90,7 @@ internal sealed class OpenApiSchemaService( } schema.ApplyPrimitiveTypesAndFormats(context); schema.ApplySchemaReferenceId(context); + schema.ApplyPolymorphismOptions(context); if (context.PropertyInfo is { AttributeProvider: { } attributeProvider } jsonPropertyInfo) { schema.ApplyNullabilityContextInfo(jsonPropertyInfo); diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index 2834779eeba4..67923622e71d 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -99,9 +99,15 @@ public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema) } if (schema.AnyOf is not null) { + // AnyOf schemas in a polymorphic type should contain a reference to the parent schema + // ID to support disambiguating between a derived type on its own and a derived type + // as part of a polymorphic schema. + var baseTypeSchemaId = schema.Extensions.TryGetValue(OpenApiConstants.SchemaId, out var schemaId) + ? ((OpenApiString)schemaId).Value + : null; foreach (var anyOfSchema in schema.AnyOf) { - AddOrUpdateSchemaByReference(anyOfSchema); + AddOrUpdateSchemaByReference(anyOfSchema, baseTypeSchemaId); } } if (schema.Properties is not null) @@ -113,8 +119,9 @@ public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema) } } - private void AddOrUpdateSchemaByReference(OpenApiSchema schema) + private void AddOrUpdateSchemaByReference(OpenApiSchema schema, string? baseTypeSchemaId = null) { + var targetReferenceId = baseTypeSchemaId is not null ? $"{baseTypeSchemaId}{GetSchemaReferenceId(schema)}" : GetSchemaReferenceId(schema); if (SchemasByReference.TryGetValue(schema, out var referenceId)) { // If we've already used this reference ID else where in the document, increment a counter value to the reference @@ -144,7 +151,7 @@ private void AddOrUpdateSchemaByReference(OpenApiSchema schema) // } // In this case, although the reference ID based on the .NET type we would use is `string`, the // two schemas are distinct. - if (referenceId == null && GetSchemaReferenceId(schema) is { } targetReferenceId) + if (referenceId == null && targetReferenceId is not null) { if (_referenceIdCounter.TryGetValue(targetReferenceId, out var counter)) { @@ -161,7 +168,7 @@ private void AddOrUpdateSchemaByReference(OpenApiSchema schema) } else { - SchemasByReference[schema] = null; + SchemasByReference[schema] = baseTypeSchemaId is not null ? targetReferenceId : null; } } diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt index b3fc620e73ea..65411d66e17e 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt @@ -59,7 +59,20 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "object", + "properties": { + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } } } } @@ -78,7 +91,25 @@ "content": { "application/json": { "schema": { - "type": "object" + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/ShapeTriangle" + }, + { + "$ref": "#/components/schemas/ShapeSquare" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "triangle": "#/components/schemas/ShapeTriangle", + "square": "#/components/schemas/ShapeSquare" + } + } } } } @@ -89,6 +120,48 @@ }, "components": { "schemas": { + "ShapeSquare": { + "properties": { + "$type": { + "enum": [ + "square" + ], + "type": "string" + }, + "area": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, + "ShapeTriangle": { + "properties": { + "$type": { + "enum": [ + "triangle" + ], + "type": "string" + }, + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, "Todo": { "required": [ "id", diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt index 747bf07f150a..82a7723f7d1a 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt @@ -293,6 +293,130 @@ } } } + }, + "/schemas-by-ref/shape": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/ShapeTriangle" + }, + { + "$ref": "#/components/schemas/ShapeSquare" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "triangle": "#/components/schemas/ShapeTriangle", + "square": "#/components/schemas/ShapeSquare" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/weatherforecastbase": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity" + }, + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries" + }, + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "0": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", + "1": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", + "2": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/person": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "discriminator" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/PersonStudent" + }, + { + "$ref": "#/components/schemas/PersonTeacher" + } + ], + "discriminator": { + "propertyName": "discriminator", + "mapping": { + "student": "#/components/schemas/PersonStudent", + "teacher": "#/components/schemas/PersonTeacher" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } } }, "components": { @@ -323,6 +447,36 @@ "format": "int32" } }, + "PersonStudent": { + "properties": { + "discriminator": { + "enum": [ + "student" + ], + "type": "string" + }, + "gpa": { + "type": "number", + "format": "double" + } + } + }, + "PersonTeacher": { + "required": [ + "subject" + ], + "properties": { + "discriminator": { + "enum": [ + "teacher" + ], + "type": "string" + }, + "subject": { + "type": "string" + } + } + }, "Product": { "type": "object", "properties": { @@ -335,8 +489,119 @@ } } }, + "ShapeSquare": { + "properties": { + "$type": { + "enum": [ + "square" + ], + "type": "string" + }, + "area": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, + "ShapeTriangle": { + "properties": { + "$type": { + "enum": [ + "triangle" + ], + "type": "string" + }, + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, "Triangle": { - "type": "object" + "type": "object", + "properties": { + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, + "WeatherForecastBaseWeatherForecastWithCity": { + "required": [ + "city" + ], + "properties": { + "$type": { + "enum": [ + 0 + ], + "type": "integer" + }, + "city": { + "type": "string" + } + } + }, + "WeatherForecastBaseWeatherForecastWithLocalNews": { + "required": [ + "news" + ], + "properties": { + "$type": { + "enum": [ + 2 + ], + "type": "integer" + }, + "news": { + "type": "string" + } + } + }, + "WeatherForecastBaseWeatherForecastWithTimeSeries": { + "required": [ + "summary" + ], + "properties": { + "$type": { + "enum": [ + 1 + ], + "type": "integer" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": "string" + } + } } } }, diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs similarity index 99% rename from src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs rename to src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs index 4356e98ee5db..d31829b12ea7 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ParameterSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs @@ -9,7 +9,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; -public partial class OpenApiComponentServiceTests : OpenApiDocumentServiceTestBase +public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase { #nullable enable public static object?[][] RouteParametersWithPrimitiveTypes => diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs new file mode 100644 index 000000000000..255134bc86a7 --- /dev/null +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs @@ -0,0 +1,177 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Builder; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; + +public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase +{ + [Fact] + public async Task HandlesPolymorphicTypeWithMappingsAndStringDiscriminator() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Shape shape) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + var requestBody = operation.RequestBody.Content; + Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); + var schema = mediaType.Schema; + // Assert discriminator mappings have been configured correctly + Assert.Equal("$type", schema.Discriminator.PropertyName); + Assert.Contains(schema.Discriminator.PropertyName, schema.Required); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("triangle", item.Key), + item => Assert.Equal("square", item.Key) + ); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("#/components/schemas/ShapeTriangle", item.Value), + item => Assert.Equal("#/components/schemas/ShapeSquare", item.Value) + ); + // Assert the schemas with the discriminator have been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("ShapeTriangle", out var triangleSchema)); + Assert.Contains(schema.Discriminator.PropertyName, triangleSchema.Properties.Keys); + Assert.Equal("triangle", ((OpenApiString)triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + Assert.True(document.Components.Schemas.TryGetValue("ShapeSquare", out var squareSchema)); + Assert.Equal("square", ((OpenApiString)squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + }); + } + + [Fact] + public async Task HandlesPolymorphicTypeWithMappingsAndIntegerDiscriminator() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (WeatherForecastBase forecast) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + var requestBody = operation.RequestBody.Content; + Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); + var schema = mediaType.Schema; + // Assert discriminator mappings have been configured correctly + Assert.Equal("$type", schema.Discriminator.PropertyName); + Assert.Contains(schema.Discriminator.PropertyName, schema.Required); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("0", item.Key), + item => Assert.Equal("1", item.Key), + item => Assert.Equal("2", item.Key) + ); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", item.Value), + item => Assert.Equal("#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", item.Value), + item => Assert.Equal("#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews", item.Value) + ); + // Assert schema with discriminator = 0 has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithCity", out var citySchema)); + Assert.Contains(schema.Discriminator.PropertyName, citySchema.Properties.Keys); + Assert.Equal(0, ((OpenApiInteger)citySchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + // Assert schema with discriminator = 1 has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithTimeSeries", out var timeSeriesSchema)); + Assert.Contains(schema.Discriminator.PropertyName, timeSeriesSchema.Properties.Keys); + Assert.Equal(1, ((OpenApiInteger)timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + // Assert schema with discriminator = 2 has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("WeatherForecastBaseWeatherForecastWithLocalNews", out var newsSchema)); + Assert.Contains(schema.Discriminator.PropertyName, newsSchema.Properties.Keys); + Assert.Equal(2, ((OpenApiInteger)newsSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + }); + } + + [Fact] + public async Task HandlesPolymorphicTypesWithCustomPropertyName() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Person person) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + var requestBody = operation.RequestBody.Content; + Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); + var schema = mediaType.Schema; + // Assert discriminator mappings have been configured correctly + Assert.Equal("discriminator", schema.Discriminator.PropertyName); + Assert.Contains(schema.Discriminator.PropertyName, schema.Required); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("student", item.Key), + item => Assert.Equal("teacher", item.Key) + ); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("#/components/schemas/PersonStudent", item.Value), + item => Assert.Equal("#/components/schemas/PersonTeacher", item.Value) + ); + // Assert schema with discriminator = 0 has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("PersonStudent", out var citySchema)); + Assert.Contains(schema.Discriminator.PropertyName, citySchema.Properties.Keys); + Assert.Equal("student", ((OpenApiString)citySchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + // Assert schema with discriminator = 1 has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("PersonTeacher", out var timeSeriesSchema)); + Assert.Contains(schema.Discriminator.PropertyName, timeSeriesSchema.Properties.Keys); + Assert.Equal("teacher", ((OpenApiString)timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + }); + } + + [Fact] + public async Task HandlesPolymorphicTypesWithNonAbstractBaseClass() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Color color) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + var requestBody = operation.RequestBody.Content; + Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); + var schema = mediaType.Schema; + // Assert discriminator mappings have been configured correctly + Assert.Equal("$type", schema.Discriminator.PropertyName); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("paint", item.Key), + item => Assert.Equal("fabric", item.Key) + ); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("#/components/schemas/ColorPaintColor", item.Value), + item => Assert.Equal("#/components/schemas/ColorFabricColor", item.Value) + ); + // Note that our implementation diverges from the OpenAPI specification here. OpenAPI + // requires that derived types in a polymorphic schema _always_ have a discriminator + // property associated with them. STJ permits the discriminator to be omitted from the + // if the base type is a non-abstract class and falls back to serializing to this base + // type. This is a known limitation of the current implementation. + Assert.Collection(schema.AnyOf, + schema => Assert.Equal("ColorPaintColor", schema.Reference.Id), + schema => Assert.Equal("ColorFabricColor", schema.Reference.Id), + schema => Assert.Equal("ColorColor", schema.Reference.Id)); + // Assert schema with discriminator = "paint" has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("ColorPaintColor", out var paintSchema)); + Assert.Contains(schema.Discriminator.PropertyName, paintSchema.Properties.Keys); + Assert.Equal("paint", ((OpenApiString)paintSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + // Assert schema with discriminator = "fabric" has been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("ColorFabricColor", out var fabricSchema)); + Assert.Contains(schema.Discriminator.PropertyName, fabricSchema.Properties.Keys); + Assert.Equal("fabric", ((OpenApiString)fabricSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + }); + } +} diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs similarity index 99% rename from src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs rename to src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs index 0524fb4cb7f8..d5856fed98af 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs @@ -9,7 +9,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; -public partial class OpenApiComponentServiceTests : OpenApiDocumentServiceTestBase +public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase { [Fact] public async Task GetOpenApiRequestBody_GeneratesSchemaForPoco() diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs similarity index 99% rename from src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs rename to src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs index 4f725ebc215d..c356de229cc9 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiComponentService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs @@ -7,7 +7,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; -public partial class OpenApiComponentServiceTests : OpenApiDocumentServiceTestBase +public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase { public static object[][] ResponsesWithPrimitiveTypes => [ diff --git a/src/OpenApi/test/Shared/SharedTypes.Polymorphism.cs b/src/OpenApi/test/Shared/SharedTypes.Polymorphism.cs new file mode 100644 index 000000000000..07607003d64a --- /dev/null +++ b/src/OpenApi/test/Shared/SharedTypes.Polymorphism.cs @@ -0,0 +1,74 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Text.Json.Serialization; + +[JsonDerivedType(typeof(Triangle), typeDiscriminator: "triangle")] +[JsonDerivedType(typeof(Square), typeDiscriminator: "square")] +internal abstract class Shape +{ + public string Color { get; set; } = string.Empty; + public int Sides { get; set; } +} + +internal class Triangle : Shape +{ + public double Hypotenuse { get; set; } +} +internal class Square : Shape +{ + public double Area { get; set; } +} + +[JsonDerivedType(typeof(WeatherForecastWithCity), 0)] +[JsonDerivedType(typeof(WeatherForecastWithTimeSeries), 1)] +[JsonDerivedType(typeof(WeatherForecastWithLocalNews), 2)] +internal abstract class WeatherForecastBase { } + +internal class WeatherForecastWithCity : WeatherForecastBase +{ + public required string City { get; set; } +} + +internal class WeatherForecastWithTimeSeries : WeatherForecastBase +{ + public DateTimeOffset Date { get; set; } + public int TemperatureC { get; set; } + public required string Summary { get; set; } +} + +internal class WeatherForecastWithLocalNews : WeatherForecastBase +{ + public required string News { get; set; } +} + +[JsonDerivedType(typeof(Student), typeDiscriminator: "student")] +[JsonDerivedType(typeof(Teacher), typeDiscriminator: "teacher")] +[JsonPolymorphic(TypeDiscriminatorPropertyName = "discriminator")] +internal abstract class Person { } + +internal class Student : Person +{ + public decimal GPA { get; set; } +} + +internal class Teacher : Person +{ + public required string Subject { get; set; } +} + +[JsonDerivedType(typeof(PaintColor), typeDiscriminator: "paint")] +[JsonDerivedType(typeof(FabricColor), typeDiscriminator: "fabric")] +internal class Color +{ + public required string HexCode { get; set; } +} + +internal class PaintColor : Color +{ + public bool IsMatte { get; set; } +} +internal class FabricColor : Color +{ + public required string Dye { get; set; } +} diff --git a/src/OpenApi/test/SharedTypes.cs b/src/OpenApi/test/Shared/SharedTypes.cs similarity index 87% rename from src/OpenApi/test/SharedTypes.cs rename to src/OpenApi/test/Shared/SharedTypes.cs index 15e09e44a099..0f9050ea995f 100644 --- a/src/OpenApi/test/SharedTypes.cs +++ b/src/OpenApi/test/Shared/SharedTypes.cs @@ -20,23 +20,6 @@ internal record ResumeUpload(string Name, string Description, IFormFile Resume); internal record Result(bool IsSuccessful, T Value, Error Error); -[JsonDerivedType(typeof(Triangle), typeDiscriminator: "triangle")] -[JsonDerivedType(typeof(Square), typeDiscriminator: "square")] -internal class Shape -{ - internal string Color { get; set; } = string.Empty; - internal int Sides { get; set; } -} - -internal class Triangle : Shape -{ - internal double Hypotenuse { get; set; } -} -internal class Square : Shape -{ - internal double Area { get; set; } -} - internal class Vehicle { public int Wheels { get; set; } From ecdc5189042e1997add19d8ef08d0e38f59182ba Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman2@users.noreply.github.com> Date: Fri, 28 Jun 2024 02:36:57 +0000 Subject: [PATCH 095/257] Set the baggage even when the trace id is not successfully extracted (#55341) * Set the baggage even when the trace id is not successfully extracted * Make comment more explicit. Co-authored-by: Noah Falk --------- Co-authored-by: joegoldman2 <147369450+joegoldman@users.noreply.github.com> Co-authored-by: Andrew Casey Co-authored-by: Noah Falk --- .../Internal/HostingApplicationDiagnostics.cs | 33 +++--- .../HostingApplicationDiagnosticsTests.cs | 103 +++++++++++------- 2 files changed, 85 insertions(+), 51 deletions(-) diff --git a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs index 713c1573021e..a656b804e829 100644 --- a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs +++ b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs @@ -430,28 +430,33 @@ private void RecordRequestStartMetrics(HttpContext httpContext) } } + // The trace id was successfully extracted, so we can set the trace state + // https://www.w3.org/TR/trace-context/#tracestate-header if (!string.IsNullOrEmpty(requestId)) { if (!string.IsNullOrEmpty(traceState)) { activity.TraceStateString = traceState; } - var baggage = _propagator.ExtractBaggage(headers, static (object? carrier, string fieldName, out string? fieldValue, out IEnumerable? fieldValues) => - { - fieldValues = default; - var headers = (IHeaderDictionary)carrier!; - fieldValue = headers[fieldName]; - }); + } - // AddBaggage adds items at the beginning of the list, so we need to add them in reverse to keep the same order as the client - // By contract, the propagator has already reversed the order of items so we need not reverse it again - // Order could be important if baggage has two items with the same key (that is allowed by the contract) - if (baggage is not null) + // Baggage can be used regardless of whether a distributed trace id was present on the inbound request. + // https://www.w3.org/TR/baggage/#abstract + var baggage = _propagator.ExtractBaggage(headers, static (object? carrier, string fieldName, out string? fieldValue, out IEnumerable? fieldValues) => + { + fieldValues = default; + var headers = (IHeaderDictionary)carrier!; + fieldValue = headers[fieldName]; + }); + + // AddBaggage adds items at the beginning of the list, so we need to add them in reverse to keep the same order as the client + // By contract, the propagator has already reversed the order of items so we need not reverse it again + // Order could be important if baggage has two items with the same key (that is allowed by the contract) + if (baggage is not null) + { + foreach (var baggageItem in baggage) { - foreach (var baggageItem in baggage) - { - activity.AddBaggage(baggageItem.Key, baggageItem.Value); - } + activity.AddBaggage(baggageItem.Key, baggageItem.Value); } } diff --git a/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs b/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs index 83a2efbe45e7..1d65cb5ec7ec 100644 --- a/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs +++ b/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs @@ -504,10 +504,10 @@ public void ActivityParentIdAndBaggageReadFromHeaders() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"Request-Id", "ParentId1"}, - {"baggage", "Key1=value1, Key2=value2"} - } + { + {"Request-Id", "ParentId1"}, + {"baggage", "Key1=value1, Key2=value2"} + } }); hostingApplication.CreateContext(features); Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); @@ -517,7 +517,7 @@ public void ActivityParentIdAndBaggageReadFromHeaders() } [Fact] - public void ActivityBaggageReadFromLegacyHeaders() + public void BaggageReadFromHeadersWithoutRequestId() { var diagnosticListener = new DiagnosticListener("DummySource"); var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener); @@ -535,10 +535,39 @@ public void ActivityBaggageReadFromLegacyHeaders() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() + { + {"baggage", "Key1=value1, Key2=value2"} + } + }); + hostingApplication.CreateContext(features); + Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); + Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1"); + Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2"); + } + + [Fact] + public void ActivityBaggageReadFromLegacyHeaders() + { + var diagnosticListener = new DiagnosticListener("DummySource"); + var hostingApplication = CreateApplication(out var features, diagnosticListener: diagnosticListener); + + diagnosticListener.Subscribe(new CallbackDiagnosticListener(pair => { }), + s => + { + if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) { - {"Request-Id", "ParentId1"}, - {"Correlation-Context", "Key1=value1, Key2=value2"} + return true; } + return false; + }); + + features.Set(new HttpRequestFeature() + { + Headers = new HeaderDictionary() + { + {"Request-Id", "ParentId1"}, + {"Correlation-Context", "Key1=value1, Key2=value2"} + } }); hostingApplication.CreateContext(features); Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); @@ -565,11 +594,11 @@ public void ActivityBaggagePrefersW3CBaggageHeaderName() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"Request-Id", "ParentId1"}, - {"Correlation-Context", "Key1=value1, Key2=value2"}, - {"baggage", "Key1=value3, Key2=value4"} - } + { + {"Request-Id", "ParentId1"}, + {"Correlation-Context", "Key1=value1, Key2=value2"}, + {"baggage", "Key1=value3, Key2=value4"} + } }); hostingApplication.CreateContext(features); Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); @@ -596,20 +625,20 @@ public void ActivityBaggagePreservesItemsOrder() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"Request-Id", "ParentId1"}, - {"baggage", "Key1=value1, Key2=value2, Key1=value3"} // duplicated keys allowed by the contract - } + { + {"Request-Id", "ParentId1"}, + {"baggage", "Key1=value1, Key2=value2, Key1=value3"} // duplicated keys allowed by the contract + } }); hostingApplication.CreateContext(features); Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); var expectedBaggage = new[] { - KeyValuePair.Create("Key1","value1"), - KeyValuePair.Create("Key2","value2"), - KeyValuePair.Create("Key1","value3") - }; + KeyValuePair.Create("Key1","value1"), + KeyValuePair.Create("Key2","value2"), + KeyValuePair.Create("Key1","value3") + }; Assert.Equal(expectedBaggage, Activity.Current.Baggage.ToArray()); } @@ -633,10 +662,10 @@ public void ActivityBaggageValuesAreUrlDecodedFromHeaders() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"Request-Id", "ParentId1"}, - {"baggage", "Key1=value1%2F1"} - } + { + {"Request-Id", "ParentId1"}, + {"baggage", "Key1=value1%2F1"} + } }); hostingApplication.CreateContext(features); Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); @@ -662,11 +691,11 @@ public void ActivityTraceParentAndTraceStateFromHeaders() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"}, - {"tracestate", "TraceState1"}, - {"baggage", "Key1=value1, Key2=value2"} - } + { + {"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"}, + {"tracestate", "TraceState1"}, + {"baggage", "Key1=value1, Key2=value2"} + } }); hostingApplication.CreateContext(features); Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); @@ -704,9 +733,9 @@ public void SamplersReceiveCorrectParentAndTraceIds() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"traceparent", "00-35aae61e3e99044eb5ea5007f2cd159b-40a8bd87c078cb4c-00"}, - } + { + {"traceparent", "00-35aae61e3e99044eb5ea5007f2cd159b-40a8bd87c078cb4c-00"}, + } }); hostingApplication.CreateContext(features); @@ -772,11 +801,11 @@ public void ActivityListenersAreCalled() features.Set(new HttpRequestFeature() { Headers = new HeaderDictionary() - { - {"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"}, - {"tracestate", "TraceState1"}, - {"baggage", "Key1=value1, Key2=value2"} - } + { + {"traceparent", "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01"}, + {"tracestate", "TraceState1"}, + {"baggage", "Key1=value1, Key2=value2"} + } }); hostingApplication.CreateContext(features); From d22349a295ea1df279c7b16aab95487eac0bb709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 28 Jun 2024 16:56:17 -0400 Subject: [PATCH 096/257] Add support for updatedTypes in metadata updates (#55347) * feat: Add support for updatedTypes in metadata updates * chore: Adjust typescript signatures Co-authored-by: Mackinnon Buck * Fix PublicAPI.*.txt * Make updatedTypes an optional arg * Fix PublicAPI.*.txt --------- Co-authored-by: Mackinnon Buck --- src/Components/Web.JS/src/Boot.WebAssembly.Common.ts | 4 ++-- src/Components/Web.JS/src/GlobalExports.ts | 2 +- .../WebAssembly/src/HotReload/WebAssemblyHotReload.cs | 3 ++- .../WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts b/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts index 7efd32e495f4..3f3b27ee74de 100644 --- a/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts +++ b/src/Components/Web.JS/src/Boot.WebAssembly.Common.ts @@ -97,8 +97,8 @@ async function startCore(components: RootComponentManager { - dispatcher.invokeDotNetStaticMethod('Microsoft.AspNetCore.Components.WebAssembly', 'ApplyHotReloadDelta', id, metadataDelta, ilDelta, pdbDelta); + Blazor._internal.applyHotReload = (id: string, metadataDelta: string, ilDelta: string, pdbDelta: string | undefined, updatedTypes?: number[]) => { + dispatcher.invokeDotNetStaticMethod('Microsoft.AspNetCore.Components.WebAssembly', 'ApplyHotReloadDelta', id, metadataDelta, ilDelta, pdbDelta, updatedTypes ?? null); }; Blazor._internal.getApplyUpdateCapabilities = () => dispatcher.invokeDotNetStaticMethod('Microsoft.AspNetCore.Components.WebAssembly', 'GetApplyUpdateCapabilities'); diff --git a/src/Components/Web.JS/src/GlobalExports.ts b/src/Components/Web.JS/src/GlobalExports.ts index 6bc48be0bb40..c3194481528b 100644 --- a/src/Components/Web.JS/src/GlobalExports.ts +++ b/src/Components/Web.JS/src/GlobalExports.ts @@ -89,7 +89,7 @@ export interface IBlazor { } // APIs invoked by hot reload - applyHotReload?: (id: string, metadataDelta: string, ilDelta: string, pdbDelta: string | undefined) => void; + applyHotReload?: (id: string, metadataDelta: string, ilDelta: string, pdbDelta: string | undefined, updatedTypes?: number[]) => void; getApplyUpdateCapabilities?: () => string; hotReloadApplied?: () => void; } diff --git a/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs b/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs index 29cee6e31681..8d3bcbd52e87 100644 --- a/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs +++ b/src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs @@ -43,7 +43,7 @@ internal static async Task InitializeAsync() /// For framework use only. /// [JSInvokable(nameof(ApplyHotReloadDelta))] - public static void ApplyHotReloadDelta(string moduleIdString, byte[] metadataDelta, byte[] ilDelta, byte[] pdbBytes) + public static void ApplyHotReloadDelta(string moduleIdString, byte[] metadataDelta, byte[] ilDelta, byte[] pdbBytes, int[]? updatedTypes) { // Analyzer has a bug where it doesn't handle ConditionalAttribute: https://github.com/dotnet/roslyn/issues/63464 #pragma warning disable IDE0200 // Remove unnecessary lambda expression @@ -56,6 +56,7 @@ public static void ApplyHotReloadDelta(string moduleIdString, byte[] metadataDel _updateDeltas[0].MetadataDelta = metadataDelta; _updateDeltas[0].ILDelta = ilDelta; _updateDeltas[0].PdbBytes = pdbBytes; + _updateDeltas[0].UpdatedTypes = updatedTypes; _hotReloadAgent.ApplyDeltas(_updateDeltas); } diff --git a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt index f4df58b4d22d..adb79668cc5b 100644 --- a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt @@ -1,2 +1,4 @@ #nullable enable +*REMOVED*static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDelta(string! moduleIdString, byte[]! metadataDelta, byte[]! ilDelta, byte[]! pdbBytes) -> void +static Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.ApplyHotReloadDelta(string! moduleIdString, byte[]! metadataDelta, byte[]! ilDelta, byte[]! pdbBytes, int[]? updatedTypes) -> void static Microsoft.AspNetCore.Components.WebAssembly.Http.WebAssemblyHttpRequestMessageExtensions.SetBrowserRequestStreamingEnabled(this System.Net.Http.HttpRequestMessage! requestMessage, bool streamingEnabled) -> System.Net.Http.HttpRequestMessage! From 143d72dcb207ecb15369154654262b0200d277c0 Mon Sep 17 00:00:00 2001 From: Damian Edwards Date: Fri, 28 Jun 2024 17:32:17 -0700 Subject: [PATCH 097/257] Remove IIS launch profiles from templates (#56489) * Remove IIS launch profiles from templates VS now supports showing the IIS Express launch option all the time and will auto-create the launch profile if one doesn't already exist. Fixes #46501 Fixes #42818 * Update tests * Update MvcTemplateTest.cs * Fix templates * Fix trailing comma --- .../Shared/BlazorTemplateTest.cs | 6 ++-- src/ProjectTemplates/Shared/Project.cs | 14 --------- .../Properties/launchSettings.json | 28 +++-------------- .../Properties/launchSettings.json | 31 +++---------------- .../Properties/launchSettings.json | 30 +++--------------- .../Properties/launchSettings.json | 25 +++------------ .../Properties/launchSettings.json | 30 +++--------------- .../Properties/launchSettings.json | 30 +++--------------- .../Properties/launchSettings.json | 30 +++--------------- .../Properties/launchSettings.json | 31 +++---------------- .../Properties/launchSettings.json | 31 +++---------------- .../Templates.Mvc.Tests/BlazorTemplateTest.cs | 4 +-- .../Templates.Mvc.Tests/MvcTemplateTest.cs | 10 +++--- .../RazorPagesTemplateTest.cs | 10 +++--- .../Templates.Mvc.Tests/WebApiTemplateTest.cs | 10 +++--- .../Templates.Tests/EmptyWebTemplateTest.cs | 4 +-- 16 files changed, 67 insertions(+), 257 deletions(-) diff --git a/src/ProjectTemplates/Shared/BlazorTemplateTest.cs b/src/ProjectTemplates/Shared/BlazorTemplateTest.cs index 09623962b6cc..5676a43ed1d8 100644 --- a/src/ProjectTemplates/Shared/BlazorTemplateTest.cs +++ b/src/ProjectTemplates/Shared/BlazorTemplateTest.cs @@ -62,10 +62,10 @@ protected async Task CreateBuildPublishAsync(string auth = null, string || (!serverProject && auth is not null); var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false; var expectedLaunchProfileNames = requiresHttps - ? new[] { "https", "IIS Express" } + ? new[] { "https" } : noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); } diff --git a/src/ProjectTemplates/Shared/Project.cs b/src/ProjectTemplates/Shared/Project.cs index 5b85a3d358d4..3b1c0588c96a 100644 --- a/src/ProjectTemplates/Shared/Project.cs +++ b/src/ProjectTemplates/Shared/Project.cs @@ -329,20 +329,6 @@ public async Task VerifyLaunchSettings(string[] expectedLaunchProfileNames) // Check there are no more launch profiles defined Assert.False(profilesEnumerator.MoveNext()); - - if (launchSettings.RootElement.TryGetProperty("iisSettings", out var iisSettings) - && iisSettings.TryGetProperty("iisExpress", out var iisExpressSettings)) - { - var iisSslPort = iisExpressSettings.GetProperty("sslPort").GetInt32(); - if (expectedLaunchProfileNames.Contains("https")) - { - Assert.True(iisSslPort >= 44300 && iisSslPort <= 44399, $"IIS Express port was expected to be >= 44300 and <= 44399 but was {iisSslPort} in file {filePath}"); - } - else - { - Assert.Equal(0, iisSslPort); - } - } } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Properties/launchSettings.json index 80cb2289021c..0d554caaa100 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Properties/launchSettings.json @@ -1,17 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { //#if (HasHttpProfile) "http": { @@ -25,7 +13,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#endif //#if (HasHttpsProfile) "https": { @@ -39,17 +31,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - //#if (UseWebAssembly) - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - //#endif - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Properties/launchSettings.json index 67010f80816e..167c237f02df 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { //#if (HasHttpProfile) "http": { @@ -28,7 +11,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#endif //#if (HasHttpsProfile) "https": { @@ -40,15 +27,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Properties/launchSettings.json index ae46106e41c9..d6368816ad8a 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { "http": { "commandName": "Project", @@ -26,7 +9,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#if (HasHttpsProfile) "https": { "commandName": "Project", @@ -36,14 +23,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/Properties/launchSettings.json index dd9e178766c6..8477932ebe58 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/Properties/launchSettings.json @@ -1,17 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { "http": { "commandName": "Project", @@ -21,7 +9,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#if (HasHttpsProfile) "https": { "commandName": "Project", @@ -31,14 +23,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Properties/launchSettings.json index 239dd82e3413..ce615249fbde 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { //#if (HasHttpProfile) "http": { @@ -27,7 +10,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#endif //#if (HasHttpsProfile) "https": { @@ -38,14 +25,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Properties/launchSettings.json index ec0dcf03f523..060854c587f5 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { //#if (HasHttpProfile) "http": { @@ -27,7 +10,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#endif //#if (HasHttpsProfile) "https": { @@ -38,14 +25,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Properties/launchSettings.json index ae46106e41c9..d6368816ad8a 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { "http": { "commandName": "Project", @@ -26,7 +9,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#if (HasHttpsProfile) "https": { "commandName": "Project", @@ -36,14 +23,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Properties/launchSettings.json index 556f129b328c..fbde8bdc2ea5 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { //#if (HasHttpProfile) "http": { @@ -28,7 +11,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#endif //#if (HasHttpsProfile) "https": { @@ -40,15 +27,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "weatherforecast", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Properties/launchSettings.json index 645f69a93825..fc9e71b00086 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Properties/launchSettings.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/Properties/launchSettings.json @@ -1,22 +1,5 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - //#if (WindowsAuth) - "windowsAuthentication": true, - "anonymousAuthentication": false, - //#else - "windowsAuthentication": false, - "anonymousAuthentication": true, - //#endif - "iisExpress": { - "applicationUrl": "http://localhost:8080", - //#if (HasHttpsProfile) - "sslPort": 44300 - //#else - "sslPort": 0 - //#endif - } - }, "profiles": { "http": { "commandName": "Project", @@ -27,7 +10,11 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + //#if (HasHttpsProfile) }, + //#else + } + //#endif //#if (HasHttpsProfile) "https": { "commandName": "Project", @@ -38,15 +25,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - //#endif - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "weatherforecast", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } + //#endif } } diff --git a/src/ProjectTemplates/test/Templates.Mvc.Tests/BlazorTemplateTest.cs b/src/ProjectTemplates/test/Templates.Mvc.Tests/BlazorTemplateTest.cs index be575cd36c18..a6a87e256be6 100644 --- a/src/ProjectTemplates/test/Templates.Mvc.Tests/BlazorTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Mvc.Tests/BlazorTemplateTest.cs @@ -57,8 +57,8 @@ private async Task BlazorWebTemplate_Core(string[] args) await project.RunDotNetNewAsync("blazor", args: args); var expectedLaunchProfileNames = args.Contains(ArgConstants.NoHttps) - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); var projectFileContents = await ReadProjectFileAsync(project); diff --git a/src/ProjectTemplates/test/Templates.Mvc.Tests/MvcTemplateTest.cs b/src/ProjectTemplates/test/Templates.Mvc.Tests/MvcTemplateTest.cs index 2970a45a1d21..9b4f00d47855 100644 --- a/src/ProjectTemplates/test/Templates.Mvc.Tests/MvcTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Mvc.Tests/MvcTemplateTest.cs @@ -59,8 +59,8 @@ private async Task MvcTemplateCore(string languageOverride, string[] args = null var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false; var expectedLaunchProfileNames = noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); var projectExtension = languageOverride == "F#" ? "fsproj" : "csproj"; @@ -157,8 +157,8 @@ private async Task MvcTemplate_IndividualAuth_Core(bool useLocalDB, bool useProg await project.RunDotNetNewAsync("mvc", auth: "Individual", useLocalDB: useLocalDB, args: args); var expectedLaunchProfileNames = noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); var projectFileContents = project.ReadFile($"{project.ProjectName}.csproj"); @@ -355,7 +355,7 @@ private async Task MvcTemplateBuildsAndPublishes(string auth, string[] await project.RunDotNetNewAsync("mvc", auth: auth, args: args); // Identity Web auth requires https and thus ignores the --no-https option if passed so there should never be an 'http' profile - var expectedLaunchProfileNames = new[] { "https", "IIS Express" }; + var expectedLaunchProfileNames = new[] { "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); // Verify building in debug works diff --git a/src/ProjectTemplates/test/Templates.Mvc.Tests/RazorPagesTemplateTest.cs b/src/ProjectTemplates/test/Templates.Mvc.Tests/RazorPagesTemplateTest.cs index d64a86b298b4..1301f25969ac 100644 --- a/src/ProjectTemplates/test/Templates.Mvc.Tests/RazorPagesTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Mvc.Tests/RazorPagesTemplateTest.cs @@ -54,8 +54,8 @@ public async Task RazorPagesTemplate_NoAuth(bool useProgramMain, bool noHttps) await project.RunDotNetNewAsync("razor", args: args); var expectedLaunchProfileNames = noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); var projectFileContents = ReadFile(project.TemplateOutputDir, $"{project.ProjectName}.csproj"); @@ -148,8 +148,8 @@ private async Task RazorPagesTemplate_IndividualAuth_Core(bool useLocalDB, bool // Individual auth supports no https OK var expectedLaunchProfileNames = noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); var projectFileContents = ReadFile(project.TemplateOutputDir, $"{project.ProjectName}.csproj"); @@ -293,7 +293,7 @@ private async Task BuildAndPublishRazorPagesTemplateIdentityWeb(string await project.RunDotNetNewAsync("razor", auth: auth, args: args); // Identity Web auth requires https and thus ignores the --no-https option if passed so there should never be an 'http' profile - var expectedLaunchProfileNames = new[] { "https", "IIS Express" }; + var expectedLaunchProfileNames = new[] { "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); // Verify building in debug works diff --git a/src/ProjectTemplates/test/Templates.Mvc.Tests/WebApiTemplateTest.cs b/src/ProjectTemplates/test/Templates.Mvc.Tests/WebApiTemplateTest.cs index 67762f9ddd09..c4473a9ac2e6 100644 --- a/src/ProjectTemplates/test/Templates.Mvc.Tests/WebApiTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Mvc.Tests/WebApiTemplateTest.cs @@ -195,8 +195,8 @@ public async Task WebApiTemplateCSharpNoHttps_WithoutOpenAPI(bool useProgramMain var noHttps = args.Contains(ArgConstants.NoHttps); var expectedLaunchProfileNames = noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); await project.RunDotNetBuildAsync(); @@ -220,10 +220,10 @@ private async Task PublishAndBuildWebApiTemplate(string languageOverrid || string.Equals(auth, "SingleOrg", StringComparison.OrdinalIgnoreCase); var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false; var expectedLaunchProfileNames = requiresHttps - ? new[] { "https", "IIS Express" } + ? new[] { "https" } : noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); // Avoid the F# compiler. See https://github.com/dotnet/aspnetcore/issues/14022 diff --git a/src/ProjectTemplates/test/Templates.Tests/EmptyWebTemplateTest.cs b/src/ProjectTemplates/test/Templates.Tests/EmptyWebTemplateTest.cs index ff9bf64f9907..ccf216c2264e 100644 --- a/src/ProjectTemplates/test/Templates.Tests/EmptyWebTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Tests/EmptyWebTemplateTest.cs @@ -79,8 +79,8 @@ private async Task EmtpyTemplateCore(string languageOverride, string[] args = nu var noHttps = args?.Contains(ArgConstants.NoHttps) ?? false; var expectedLaunchProfileNames = noHttps - ? new[] { "http", "IIS Express" } - : new[] { "http", "https", "IIS Express" }; + ? new[] { "http" } + : new[] { "http", "https" }; await project.VerifyLaunchSettings(expectedLaunchProfileNames); // Avoid the F# compiler. See https://github.com/dotnet/aspnetcore/issues/14022 From 77994c64cee73e0093fe25cd434bee8bd2580b4e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 29 Jun 2024 01:42:47 +0000 Subject: [PATCH 098/257] Update dependencies from https://github.com/dotnet/arcade build 20240627.1 (#56516) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 24 +++++++++---------- eng/Versions.props | 8 +++---- .../job/publish-build-assets.yml | 7 ++++-- .../steps/enable-internal-sources.yml | 4 +++- eng/common/dotnet-install.sh | 3 +++ eng/common/native/CommonLibrary.psm1 | 3 ++- global.json | 4 ++-- 7 files changed, 31 insertions(+), 22 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ee2054686198..a6c6b3b4ad6b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -388,31 +388,31 @@ https://github.com/dotnet/winforms 10bd60e8b0bbc4639035a36fb7aed414a3581431 - + https://github.com/dotnet/arcade - 3aba80fecac252e1cdaffcebc0a37a24a960228b + ede13bd35571c0c8b0c01edcb057031904c5c955 - + https://github.com/dotnet/arcade - 3aba80fecac252e1cdaffcebc0a37a24a960228b + ede13bd35571c0c8b0c01edcb057031904c5c955 - + https://github.com/dotnet/arcade - 3aba80fecac252e1cdaffcebc0a37a24a960228b + ede13bd35571c0c8b0c01edcb057031904c5c955 - + https://github.com/dotnet/arcade - 3aba80fecac252e1cdaffcebc0a37a24a960228b + ede13bd35571c0c8b0c01edcb057031904c5c955 - + https://github.com/dotnet/arcade - 3aba80fecac252e1cdaffcebc0a37a24a960228b + ede13bd35571c0c8b0c01edcb057031904c5c955 - + https://github.com/dotnet/arcade - 3aba80fecac252e1cdaffcebc0a37a24a960228b + ede13bd35571c0c8b0c01edcb057031904c5c955 https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index 96c9e7ce7220..97c47953884e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -165,10 +165,10 @@ 6.2.4 6.2.4 - 9.0.0-beta.24321.4 - 9.0.0-beta.24321.4 - 9.0.0-beta.24321.4 - 9.0.0-beta.24321.4 + 9.0.0-beta.24327.1 + 9.0.0-beta.24327.1 + 9.0.0-beta.24327.1 + 9.0.0-beta.24327.1 9.0.0-alpha.1.24320.1 diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 2cf8e1853d06..d99a1a3b2840 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -155,10 +155,13 @@ jobs: PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} is1ESPipeline: ${{ parameters.is1ESPipeline }} - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 4a06b5290824..64f881bffc3c 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -18,7 +18,9 @@ steps: displayName: Setup Internal Feeds inputs: filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: ${{ parameters.legacyCredential }} # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index a2fba4703806..7b9d97e3bd4d 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -71,6 +71,9 @@ case $cpuname in i[3-6]86) buildarch=x86 ;; + riscv64) + buildarch=riscv64 + ;; *) echo "Unknown CPU $cpuname detected, treating it as x64" buildarch=x64 diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1 index ca38268c44d8..f71f6af6cdbc 100644 --- a/eng/common/native/CommonLibrary.psm1 +++ b/eng/common/native/CommonLibrary.psm1 @@ -277,7 +277,8 @@ function Get-MachineArchitecture { if (($ProcessorArchitecture -Eq "AMD64") -Or ($ProcessorArchitecture -Eq "IA64") -Or ($ProcessorArchitecture -Eq "ARM64") -Or - ($ProcessorArchitecture -Eq "LOONGARCH64")) { + ($ProcessorArchitecture -Eq "LOONGARCH64") -Or + ($ProcessorArchitecture -Eq "RISCV64")) { return "x64" } return "x86" diff --git a/global.json b/global.json index b7291676056e..ded4dfedc28c 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ "jdk": "11" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24321.4", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24321.4" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24327.1", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24327.1" } } From 564af610ada026f03a048c0dce947ef5452cd728 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 29 Jun 2024 01:53:01 +0000 Subject: [PATCH 099/257] Update dependencies from https://github.com/dotnet/runtime build 20240627.11 (#56504) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a6c6b3b4ad6b..edaf9653027d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 58e1a7e6e499da2cd502bebb326497795101783f + d88e6680e1f9e2cb4f5ee428aa169ab715158eab https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 97c47953884e..5d4572f1b265 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 - 9.0.0-preview.7.24326.3 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24327.11 9.0.0-preview.6.24322.1 9.0.0-preview.6.24322.1 From 02c0cd606dca8b01fa65b2bbd613ce667c388b80 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 29 Jun 2024 14:11:32 +0000 Subject: [PATCH 100/257] Update dependencies from https://github.com/dotnet/runtime build 20240628.10 (#56523) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index edaf9653027d..8f7e829a9b3c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore ecd6104d7db803a976116a49d5855bce85634051 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - d88e6680e1f9e2cb4f5ee428aa169ab715158eab + a900bbf6fcf33fa2e799ed599ab86e00d6124c05 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 5d4572f1b265..b1452ae77e31 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 - 9.0.0-preview.7.24327.11 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24328.10 9.0.0-preview.6.24322.1 9.0.0-preview.6.24322.1 From d301328737c4912b95f236c4b349cf46ef7a473a Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sun, 30 Jun 2024 10:15:50 +0800 Subject: [PATCH 101/257] Annotate histograms with bucket boundaries (#56500) --- src/Hosting/Hosting/src/Internal/HostingMetrics.cs | 3 ++- .../Hosting/src/Microsoft.AspNetCore.Hosting.csproj | 1 + .../src/Microsoft.AspNetCore.RateLimiting.csproj | 1 + .../RateLimiting/src/RateLimitingMetrics.cs | 7 +++++-- .../src/Internal/Infrastructure/KestrelMetrics.cs | 7 +++++-- .../Microsoft.AspNetCore.Server.Kestrel.Core.csproj | 1 + src/Shared/Metrics/MetricsConstants.cs | 13 +++++++++++++ .../src/Internal/HttpConnectionsMetrics.cs | 3 ++- .../Microsoft.AspNetCore.Http.Connections.csproj | 1 + 9 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 src/Shared/Metrics/MetricsConstants.cs diff --git a/src/Hosting/Hosting/src/Internal/HostingMetrics.cs b/src/Hosting/Hosting/src/Internal/HostingMetrics.cs index b72f0c6d5f03..bdd83e5212be 100644 --- a/src/Hosting/Hosting/src/Internal/HostingMetrics.cs +++ b/src/Hosting/Hosting/src/Internal/HostingMetrics.cs @@ -29,7 +29,8 @@ public HostingMetrics(IMeterFactory meterFactory) _requestDuration = _meter.CreateHistogram( "http.server.request.duration", unit: "s", - description: "Duration of HTTP server requests."); + description: "Duration of HTTP server requests.", + advice: new InstrumentAdvice { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries }); } // Note: Calling code checks whether counter is enabled. diff --git a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj index 3caa14c4beb3..80948eacb708 100644 --- a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj +++ b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Middleware/RateLimiting/src/Microsoft.AspNetCore.RateLimiting.csproj b/src/Middleware/RateLimiting/src/Microsoft.AspNetCore.RateLimiting.csproj index a15b1fe9bf8c..10ee122da393 100644 --- a/src/Middleware/RateLimiting/src/Microsoft.AspNetCore.RateLimiting.csproj +++ b/src/Middleware/RateLimiting/src/Microsoft.AspNetCore.RateLimiting.csproj @@ -18,6 +18,7 @@ + diff --git a/src/Middleware/RateLimiting/src/RateLimitingMetrics.cs b/src/Middleware/RateLimiting/src/RateLimitingMetrics.cs index 3a0078acce7c..9037887f10b6 100644 --- a/src/Middleware/RateLimiting/src/RateLimitingMetrics.cs +++ b/src/Middleware/RateLimiting/src/RateLimitingMetrics.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.Diagnostics.Metrics; using System.Runtime.CompilerServices; +using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.RateLimiting; @@ -30,7 +31,8 @@ public RateLimitingMetrics(IMeterFactory meterFactory) _requestLeaseDurationCounter = _meter.CreateHistogram( "aspnetcore.rate_limiting.request_lease.duration", unit: "s", - description: "The duration of rate limiting leases held by HTTP requests on the server."); + description: "The duration of rate limiting leases held by HTTP requests on the server.", + advice: new InstrumentAdvice { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries }); _queuedRequestsCounter = _meter.CreateUpDownCounter( "aspnetcore.rate_limiting.queued_requests", @@ -40,7 +42,8 @@ public RateLimitingMetrics(IMeterFactory meterFactory) _queuedRequestDurationCounter = _meter.CreateHistogram( "aspnetcore.rate_limiting.request.time_in_queue", unit: "s", - description: "The duration of HTTP requests in a queue, waiting to acquire a rate limiting lease."); + description: "The duration of HTTP requests in a queue, waiting to acquire a rate limiting lease.", + advice: new InstrumentAdvice { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries }); _requestsCounter = _meter.CreateCounter( "aspnetcore.rate_limiting.requests", diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelMetrics.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelMetrics.cs index f6997fc8bbc1..10768d162a21 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelMetrics.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelMetrics.cs @@ -9,6 +9,7 @@ using System.Runtime.CompilerServices; using System.Security.Authentication; using Microsoft.AspNetCore.Connections; +using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; @@ -43,7 +44,8 @@ public KestrelMetrics(IMeterFactory meterFactory) _connectionDuration = _meter.CreateHistogram( "kestrel.connection.duration", unit: "s", - description: "The duration of connections on the server."); + description: "The duration of connections on the server.", + advice: new InstrumentAdvice { HistogramBucketBoundaries = MetricsConstants.LongSecondsBucketBoundaries }); _rejectedConnectionsCounter = _meter.CreateCounter( "kestrel.rejected_connections", @@ -68,7 +70,8 @@ public KestrelMetrics(IMeterFactory meterFactory) _tlsHandshakeDuration = _meter.CreateHistogram( "kestrel.tls_handshake.duration", unit: "s", - description: "The duration of TLS handshakes on the server."); + description: "The duration of TLS handshakes on the server.", + advice: new InstrumentAdvice { HistogramBucketBoundaries = MetricsConstants.ShortSecondsBucketBoundaries }); _activeTlsHandshakesCounter = _meter.CreateUpDownCounter( "kestrel.active_tls_handshakes", diff --git a/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj b/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj index 130870a922f9..1576c0f5a653 100644 --- a/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj +++ b/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj @@ -32,6 +32,7 @@ + diff --git a/src/Shared/Metrics/MetricsConstants.cs b/src/Shared/Metrics/MetricsConstants.cs new file mode 100644 index 000000000000..6cd103eb3d35 --- /dev/null +++ b/src/Shared/Metrics/MetricsConstants.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.AspNetCore.Http; + +internal static class MetricsConstants +{ + // Follows boundaries from http.server.request.duration/http.client.request.duration + public static readonly IReadOnlyList ShortSecondsBucketBoundaries = [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10]; + + // Not based on a standard. Larger bucket sizes for longer lasting operations, e.g. HTTP connection duration. See https://github.com/open-telemetry/semantic-conventions/issues/336 + public static readonly IReadOnlyList LongSecondsBucketBoundaries = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300]; +} diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionsMetrics.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionsMetrics.cs index 46556872bf05..9d289b926d28 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionsMetrics.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionsMetrics.cs @@ -33,7 +33,8 @@ public HttpConnectionsMetrics(IMeterFactory meterFactory) _connectionDuration = _meter.CreateHistogram( "signalr.server.connection.duration", unit: "s", - description: "The duration of connections on the server."); + description: "The duration of connections on the server.", + advice: new InstrumentAdvice { HistogramBucketBoundaries = MetricsConstants.LongSecondsBucketBoundaries }); _currentConnectionsCounter = _meter.CreateUpDownCounter( "signalr.server.active_connections", diff --git a/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj b/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj index 8fbe199512bf..6449f8900b1f 100644 --- a/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj +++ b/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj @@ -25,6 +25,7 @@ + From 80460917e1663c2c5e97f215c360b8aee335cc0f Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Mon, 1 Jul 2024 12:57:46 -0700 Subject: [PATCH 102/257] Increase the default number of IO queues on larger machines (#56501) --- .../Transport.Sockets/src/Internal/IOQueue.cs | 20 +++++++++++++++++++ .../src/SocketConnectionFactoryOptions.cs | 4 ++-- .../src/SocketTransportOptions.cs | 4 ++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/IOQueue.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/IOQueue.cs index b378718f1826..0c958b7ce255 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/IOQueue.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/IOQueue.cs @@ -10,6 +10,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal; internal sealed class IOQueue : PipeScheduler, IThreadPoolWorkItem { + public static readonly int DefaultCount = DetermineDefaultCount(); + private readonly ConcurrentQueue _workItems = new ConcurrentQueue(); private int _doingWork; @@ -73,4 +75,22 @@ public Work(Action callback, object? state) State = state; } } + + private static int DetermineDefaultCount() + { + // Since each IOQueue schedules one work item to process its work, the number of IOQueues determines the maximum + // parallelism of processing work queued to IOQueues. The default number below is based on the processor count and tries + // to use a high-enough number for that to not be a significant limiting factor for throughput. + // + // On Windows, the default number is limited due to some other perf issues. Once those are fixed, the same heuristic + // could apply there as well. + + int processorCount = Environment.ProcessorCount; + if (OperatingSystem.IsWindows() || processorCount <= 32) + { + return Math.Min(processorCount, 16); + } + + return processorCount / 2; + } } diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs index 35ce2bd8fd75..403f6fc108de 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs @@ -33,9 +33,9 @@ internal SocketConnectionFactoryOptions(SocketTransportOptions transportOptions) /// The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool. /// /// - /// Defaults to rounded down and clamped between 1 and 16. + /// Defaults to a value based on and limited to . /// - public int IOQueueCount { get; set; } = Math.Min(Environment.ProcessorCount, 16); + public int IOQueueCount { get; set; } = Internal.IOQueue.DefaultCount; /// /// Wait until there is data available to allocate a buffer. Setting this to false can increase throughput at the cost of increased memory usage. diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs index a307465447ad..ad1a877df63c 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs @@ -28,9 +28,9 @@ static SocketTransportOptions() /// The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool. /// /// - /// Defaults to rounded down and clamped between 1 and 16. + /// Defaults to a value based on and limited to . /// - public int IOQueueCount { get; set; } = Math.Min(Environment.ProcessorCount, 16); + public int IOQueueCount { get; set; } = Internal.IOQueue.DefaultCount; /// /// Wait until there is data available to allocate a buffer. Setting this to false can increase throughput at the cost of increased memory usage. From c02ff1223c1120d2111b0c41636538efed6f6214 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Mon, 1 Jul 2024 17:03:23 -0500 Subject: [PATCH 103/257] Annotate SignalR server for native AOT (#56460) * Annotate SignalR server for native AOT Fix SignalR Server's usage of MakeGenericMethod when using a streaming reader (IAsyncEnumerable or ChannelReader) following the same approach as the client. Add a runtime check and throw an exception when trying to stream a ValueType in native AOT. Adjust the public annotations: * Remove RequiresUnreferencedCode from AddSignalR * Add RequiresUnreferencedCode to MessagePack and NewtonsoftJson protocols Support trimming and AOT in DefaultHubDispatcher by adding a feature switch to turn off custom awaitable support. Update ObjectMethodExecutor to support trimming and AOT by a new method that doesn't look for custom awaitables, and uses reflection instead of Linq.Expressions. * Fix LinkabilityChecker warnings * Update warning suppressions baseline. * Adjust RequiresDynamicCode annotations * Move RequiresDynamicCode to the whole Hub class, so developers always get a warning when using IHubContext. This helps because THub needs to be a Hub, which will warn as soon as it is used. * Suppress the warning in AddSignalRCore that references HubContext since users will get warnings when they try using IHubContext. * Add more unit tests * Move SignalR server tests down a folder to make room for new tests. * Add trimming test for using typed clients. * Fix tests * Rename the feature switch to IsCustomAwaitableSupported to align with other feature switch naming --- AspNetCore.sln | 2 +- eng/RequiresDelayedBuildProjects.props | 1 + eng/TrimmableProjects.props | 2 + .../SupportFiles/Directory.Build.targets | 2 + ...NetCore.Components.WarningSuppressions.xml | 62 +--- ...re.Http.Extensions.WarningSuppressions.xml | 4 +- ...icrosoft.JSInterop.WarningSuppressions.xml | 66 +--- .../ObjectMethodExecutor.cs | 194 +++++++++- src/SignalR/SignalR.slnf | 2 +- ...ckProtocolDependencyInjectionExtensions.cs | 3 + ...tCore.SignalR.Protocols.MessagePack.csproj | 1 + ...re.SignalR.Protocols.NewtonsoftJson.csproj | 2 + ...onProtocolDependencyInjectionExtensions.cs | 3 + src/SignalR/common/Shared/ReflectionHelper.cs | 4 +- src/SignalR/server/Core/src/Hub.cs | 4 + .../server/Core/src/HubConnectionHandler.cs | 3 +- src/SignalR/server/Core/src/Hub`T.cs | 4 +- src/SignalR/server/Core/src/IHubActivator.cs | 6 +- src/SignalR/server/Core/src/IHubContext`T.cs | 10 +- .../Core/src/Internal/DefaultHubActivator.cs | 3 +- .../Core/src/Internal/DefaultHubDispatcher.cs | 19 +- .../server/Core/src/Internal/HubClients`T.cs | 5 +- .../Core/src/Internal/HubConnectionBinder.cs | 4 +- .../server/Core/src/Internal/HubContext`T.cs | 5 +- .../server/Core/src/Internal/HubDispatcher.cs | 3 +- .../Core/src/Internal/HubMethodDescriptor.cs | 80 +++-- .../Core/src/Internal/HubReflectionHelper.cs | 19 +- .../Core/src/Internal/TypedClientBuilder.cs | 21 +- .../Core/src/Internal/TypedHubClients.cs | 5 +- ...tCore.SignalR.Core.WarningSuppressions.xml | 12 + .../Microsoft.AspNetCore.SignalR.Core.csproj | 1 + .../src/SignalRConnectionBuilderExtensions.cs | 4 +- .../SignalRDependencyInjectionExtensions.cs | 11 +- src/SignalR/server/Core/src/StreamTracker.cs | 8 + .../src/Microsoft.AspNetCore.SignalR.csproj | 1 + .../SignalRDependencyInjectionExtensions.cs | 3 - .../AddSignalRTests.cs | 0 .../AuthConnectionHandler.cs | 0 .../AuthHub.cs | 0 .../CancellationDisposable.cs | 0 .../ClientProxyTests.cs | 0 .../DefaultHubActivatorTests.cs | 0 .../DefaultHubLifetimeManagerTests.cs | 0 .../DefaultTransportFactoryTests.cs | 0 .../EchoConnectionHandler.cs | 0 .../EndToEndTests.cs | 0 .../HttpHeaderConnectionHandler.cs | 0 .../HubConnectionHandlerTestUtils/Hubs.cs | 0 .../HubConnectionHandlerTestUtils/Utils.cs | 0 .../HubConnectionHandlerTests.Activity.cs | 0 .../HubConnectionHandlerTests.ClientResult.cs | 0 .../HubConnectionHandlerTests.cs | 0 .../HubFilterTests.cs | 0 .../HubReflectionHelperTests.cs | 0 .../DefaultHubProtocolResolverTests.cs | 0 .../Internal/MessageBufferTests.cs | 0 .../Internal/ReflectionHelperTests.cs | 0 .../Internal/TypedClientBuilderTests.cs | 0 .../MapSignalRTests.cs | 0 .../Microsoft.AspNetCore.SignalR.Tests.csproj | 0 .../NativeAotTests.cs | 340 ++++++++++++++++++ .../SerializedHubMessageTests.cs | 0 .../Startup.cs | 0 .../TestAuthHandler.cs | 0 .../TestFilters.cs | 0 .../UncreatableHub.cs | 0 .../UserAgentHeaderTest.cs | 0 .../WebSocketsTransportTests.cs | 0 .../WriteThenCloseConnectionHandler.cs | 0 ...soft.AspNetCore.SignalR.TrimmingTests.proj | 9 + .../TestTypedClients.cs | 84 +++++ 71 files changed, 816 insertions(+), 196 deletions(-) create mode 100644 src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.WarningSuppressions.xml rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/AddSignalRTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/AuthConnectionHandler.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/AuthHub.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/CancellationDisposable.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/ClientProxyTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/DefaultHubActivatorTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/DefaultHubLifetimeManagerTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/DefaultTransportFactoryTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/EchoConnectionHandler.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/EndToEndTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HttpHeaderConnectionHandler.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubConnectionHandlerTestUtils/Hubs.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubConnectionHandlerTestUtils/Utils.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubConnectionHandlerTests.Activity.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubConnectionHandlerTests.ClientResult.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubConnectionHandlerTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubFilterTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/HubReflectionHelperTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/Internal/DefaultHubProtocolResolverTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/Internal/MessageBufferTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/Internal/ReflectionHelperTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/Internal/TypedClientBuilderTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/MapSignalRTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/Microsoft.AspNetCore.SignalR.Tests.csproj (100%) create mode 100644 src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/SerializedHubMessageTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/Startup.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/TestAuthHandler.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/TestFilters.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/UncreatableHub.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/UserAgentHeaderTest.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/WebSocketsTransportTests.cs (100%) rename src/SignalR/server/SignalR/test/{ => Microsoft.AspNetCore.SignalR.Tests}/WriteThenCloseConnectionHandler.cs (100%) create mode 100644 src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/Microsoft.AspNetCore.SignalR.TrimmingTests.proj create mode 100644 src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/TestTypedClients.cs diff --git a/AspNetCore.sln b/AspNetCore.sln index 9164c1b75bba..7eba541ea0a0 100644 --- a/AspNetCore.sln +++ b/AspNetCore.sln @@ -1102,7 +1102,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "perf", "perf", "{5095E70C-6 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SignalR.Microbenchmarks", "src\SignalR\perf\Microbenchmarks\Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj", "{A6A95BEF-7E21-4D3D-921B-F77267219D27}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SignalR.Tests", "src\SignalR\server\SignalR\test\Microsoft.AspNetCore.SignalR.Tests.csproj", "{4DC9C494-9867-4319-937E-5FBC0E5F5A51}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SignalR.Tests", "src\SignalR\server\SignalR\test\Microsoft.AspNetCore.SignalR.Tests\Microsoft.AspNetCore.SignalR.Tests.csproj", "{4DC9C494-9867-4319-937E-5FBC0E5F5A51}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Specification.Tests", "Specification.Tests", "{245939DA-D68D-4B5C-A95E-D3B6923614FF}" EndProject diff --git a/eng/RequiresDelayedBuildProjects.props b/eng/RequiresDelayedBuildProjects.props index aca07fcc13f2..3c1626ba53bf 100644 --- a/eng/RequiresDelayedBuildProjects.props +++ b/eng/RequiresDelayedBuildProjects.props @@ -21,6 +21,7 @@ + diff --git a/eng/TrimmableProjects.props b/eng/TrimmableProjects.props index 3b28def7582c..6ba207ac1852 100644 --- a/eng/TrimmableProjects.props +++ b/eng/TrimmableProjects.props @@ -92,6 +92,8 @@ + + diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index dc209479dd85..8d7674b8923a 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -73,6 +73,8 @@ + + diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml b/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml index cd14d7bb7e37..4a18cf8fc813 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml @@ -1,36 +1,6 @@  - - - ILLink - IL2026 - member - M:Microsoft.AspNetCore.Components.BindConverter.FormatterDelegateCache.MakeTypeConverterFormatter``1 - - - ILLink - IL2026 - member - M:Microsoft.AspNetCore.Components.BindConverter.ParserDelegateCache.MakeTypeConverterConverter``1 - - - ILLink - IL2026 - member - M:Microsoft.AspNetCore.Components.RouteTableFactory.<GetRouteableComponents>g__GetRouteableComponents|4_0(System.Collections.Generic.List{System.Type},System.Reflection.Assembly) - - - ILLink - IL2062 - member - M:Microsoft.AspNetCore.Components.RouteTableFactory.Create(System.Collections.Generic.Dictionary{System.Type,System.String[]}) - - - ILLink - IL2067 - member - M:Microsoft.AspNetCore.Components.CascadingParameterState.CreateReflectedCascadingParameterInfos(System.Type) - + ILLink IL2072 @@ -43,47 +13,17 @@ member M:Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(System.IServiceProvider,Microsoft.AspNetCore.Components.IComponent) - - ILLink - IL2072 - member - M:Microsoft.AspNetCore.Components.DynamicComponent.SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView) - ILLink IL2072 member M:Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(Microsoft.AspNetCore.Components.ParameterView@,System.Object) - - ILLink - IL2077 - member - M:Microsoft.AspNetCore.Components.ComponentFactory.CreateInitializer(System.Type) - - - ILLink - IL2077 - member - M:Microsoft.AspNetCore.Components.LayoutView.<>c__DisplayClass13_0.<WrapInLayout>g__Render|0(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder) - - - ILLink - IL2080 - member - M:Microsoft.AspNetCore.Components.Reflection.MemberAssignment.<GetPropertiesIncludingInherited>d__0.MoveNext - ILLink IL2110 member M:Microsoft.AspNetCore.Components.RouteView.Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder) - - ILLink - IL2111 - member - M:Microsoft.AspNetCore.Components.RouteView.Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder) - \ No newline at end of file diff --git a/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.WarningSuppressions.xml b/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.WarningSuppressions.xml index 70f9e571648c..09ebb0306a2d 100644 --- a/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.WarningSuppressions.xml +++ b/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.WarningSuppressions.xml @@ -1,6 +1,6 @@ - + - + ILLink IL2026 diff --git a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml index 35166cf65fd7..2da13e369808 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml +++ b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.WarningSuppressions.xml @@ -1,72 +1,12 @@ - + - - - ILLink - IL2026 - member - M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(Microsoft.JSInterop.JSRuntime,Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo,System.String) - - - ILLink - IL2026 - member - M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.EndInvokeDotNetAfterTask(System.Threading.Tasks.Task,Microsoft.JSInterop.JSRuntime,Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo@) - - - ILLink - IL2026 - member - M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.Invoke(Microsoft.JSInterop.JSRuntime,Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo@,System.String) - - - ILLink - IL2026 - member - M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.ParseArguments(Microsoft.JSInterop.JSRuntime,System.String,System.String,System.Type[]) - - - ILLink - IL2026 - member - M:Microsoft.JSInterop.JSRuntime.EndInvokeJS(System.Int64,System.Boolean,System.Text.Json.Utf8JsonReader@) - - - ILLink - IL2026 - member - M:Microsoft.JSInterop.JSRuntime.InvokeAsync``1(System.Int64,System.String,System.Threading.CancellationToken,System.Object[]) - - - ILLink - IL2055 - member - M:Microsoft.JSInterop.Infrastructure.DotNetObjectReferenceJsonConverterFactory.CreateConverter(System.Type,System.Text.Json.JsonSerializerOptions) - + ILLink IL2065 member M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.ScanAssemblyForCallableMethods(Microsoft.JSInterop.Infrastructure.DotNetDispatcher.AssemblyKey) - - ILLink - IL2091 - member - M:Microsoft.JSInterop.JSObjectReferenceExtensions.<InvokeAsync>d__4`1.MoveNext - - - ILLink - IL2091 - member - M:Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1.MoveNext - - - ILLink - IL2091 - member - M:Microsoft.JSInterop.JSRuntimeExtensions.<InvokeAsync>d__4`1.MoveNext - ILLink IL2111 @@ -74,4 +14,4 @@ M:Microsoft.JSInterop.Infrastructure.DotNetDispatcher.GetCachedMethodInfo(Microsoft.JSInterop.Infrastructure.IDotNetObjectReference,System.String) - + \ No newline at end of file diff --git a/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs b/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs index 8de064da2216..b24d903c3ebd 100644 --- a/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs +++ b/src/Shared/ObjectMethodExecutor/ObjectMethodExecutor.cs @@ -7,11 +7,10 @@ using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Reflection; +using System.Runtime.CompilerServices; namespace Microsoft.Extensions.Internal; -[RequiresUnreferencedCode("ObjectMethodExecutor performs reflection on arbitrary types.")] -[RequiresDynamicCode("ObjectMethodExecutor performs reflection on arbitrary types.")] internal sealed class ObjectMethodExecutor { private readonly object?[]? _parameterDefaultValues; @@ -28,7 +27,7 @@ internal sealed class ObjectMethodExecutor typeof(Action) // unsafeOnCompletedMethod })!; - private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues) + private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo) { ArgumentNullException.ThrowIfNull(methodInfo); @@ -36,7 +35,13 @@ private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, obj MethodParameters = methodInfo.GetParameters(); TargetTypeInfo = targetTypeInfo; MethodReturnType = methodInfo.ReturnType; + } + [RequiresUnreferencedCode("ObjectMethodExecutor performs reflection on arbitrary types.")] + [RequiresDynamicCode("ObjectMethodExecutor performs reflection on arbitrary types.")] + private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[]? parameterDefaultValues) + : this(methodInfo, targetTypeInfo) + { var isAwaitable = CoercedAwaitableInfo.IsTypeAwaitable(MethodReturnType, out var coercedAwaitableInfo); IsMethodAsync = isAwaitable; @@ -55,6 +60,27 @@ private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, obj _parameterDefaultValues = parameterDefaultValues; } + private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, bool isTrimAotCompatible) + : this(methodInfo, targetTypeInfo) + { + Debug.Assert(isTrimAotCompatible, "isTrimAotCompatible should always be true."); + + var isAwaitable = IsTaskType(MethodReturnType, out var resultType); + + IsMethodAsync = isAwaitable; + AsyncResultType = isAwaitable ? resultType : null; + + // Upstream code may prefer to use the sync-executor even for async methods, because if it knows + // that the result is a specific Task where T is known, then it can directly cast to that type + // and await it without the extra heap allocations involved in the _executorAsync code path. + _executor = methodInfo.Invoke; + + if (IsMethodAsync) + { + _executorAsync = GetExecutorAsyncTrimAotCompatible(methodInfo, AsyncResultType!); + } + } + private delegate ObjectMethodExecutorAwaitable MethodExecutorAsync(object target, object?[]? parameters); private delegate object? MethodExecutor(object target, object?[]? parameters); @@ -74,11 +100,15 @@ private ObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetTypeInfo, obj public bool IsMethodAsync { get; } + [RequiresUnreferencedCode("ObjectMethodExecutor performs reflection on arbitrary types.")] + [RequiresDynamicCode("ObjectMethodExecutor performs reflection on arbitrary types.")] public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo) { return new ObjectMethodExecutor(methodInfo, targetTypeInfo, null); } + [RequiresUnreferencedCode("ObjectMethodExecutor performs reflection on arbitrary types.")] + [RequiresDynamicCode("ObjectMethodExecutor performs reflection on arbitrary types.")] public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo targetTypeInfo, object?[] parameterDefaultValues) { ArgumentNullException.ThrowIfNull(parameterDefaultValues); @@ -86,6 +116,19 @@ public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo target return new ObjectMethodExecutor(methodInfo, targetTypeInfo, parameterDefaultValues); } + /// + /// Creates an ObjectMethodExecutor that is compatible with trimming and Ahead-of-Time (AOT) compilation. + /// + /// + /// The difference between this method and is that + /// this method doesn't support custom awaitables and Task{unit} in F#. It only supports Task, Task{T}, ValueTask, and ValueTask{T} + /// as async methods. + /// + public static ObjectMethodExecutor CreateTrimAotCompatible(MethodInfo methodInfo, TypeInfo targetTypeInfo) + { + return new ObjectMethodExecutor(methodInfo, targetTypeInfo, isTrimAotCompatible: true); + } + /// /// Executes the configured method on . This can be used whether or not /// the configured method is asynchronous. @@ -123,6 +166,9 @@ public static ObjectMethodExecutor Create(MethodInfo methodInfo, TypeInfo target /// of it, and if it is, it will have to be boxed so the calling code can reference it as an object). /// 3. The async result value, if it's a value type (it has to be boxed as an object, since the calling /// code doesn't know what type it's going to be). + /// + /// Note if was used to create the ObjectMethodExecutor, only the + /// built-in Task types are supported and not custom awaitables. /// /// The object whose method is to be executed. /// Parameters to pass to the method. @@ -336,4 +382,146 @@ private static MethodExecutorAsync GetExecutorAsync( var lambda = Expression.Lambda(returnValueExpression, targetParameter, parametersParameter); return lambda.Compile(); } + + private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; + private static readonly MethodInfo _taskAwaiterGetIsCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("get_IsCompleted")!; + private static readonly MethodInfo _taskAwaiterGetResultMethodInfo = typeof(TaskAwaiter<>).GetMethod("GetResult")!; + private static readonly MethodInfo _taskAwaiterOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("OnCompleted")!; + private static readonly MethodInfo _taskAwaiterUnsafeOnCompletedMethodInfo = typeof(TaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; + + private static readonly MethodInfo _valueTaskGetAwaiterMethodInfo = typeof(ValueTask<>).GetMethod("GetAwaiter")!; + private static readonly MethodInfo _valueTaskAwaiterGetIsCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("get_IsCompleted")!; + private static readonly MethodInfo _valueTaskAwaiterGetResultMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("GetResult")!; + private static readonly MethodInfo _valueTaskAwaiterOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("OnCompleted")!; + private static readonly MethodInfo _valueTaskAwaiterUnsafeOnCompletedMethodInfo = typeof(ValueTaskAwaiter<>).GetMethod("UnsafeOnCompleted")!; + + private static bool IsTaskType(Type methodReturnType, [NotNullWhen(true)] out Type? resultType) + { + if (methodReturnType == typeof(Task) || methodReturnType == typeof(ValueTask)) + { + resultType = typeof(void); + return true; + } + + if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) + { + resultType = methodReturnType.GetGenericArguments()[0]; + return true; + } + + var currentType = methodReturnType; + while (currentType is not null) + { + if (currentType == typeof(Task)) + { + resultType = typeof(void); + return true; + } + + if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>)) + { + var taskGetAwaiterMethodInfo = (MethodInfo)methodReturnType.GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo); + var taskAwaiterGetResultMethodInfo = (MethodInfo)taskGetAwaiterMethodInfo.ReturnType.GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo); + + resultType = taskAwaiterGetResultMethodInfo.ReturnType; + return true; + } + + currentType = currentType.BaseType; + } + + resultType = null; + return false; + } + + private static MethodExecutorAsync? GetExecutorAsyncTrimAotCompatible(MethodInfo methodInfo, Type asyncResultType) + { + var methodReturnType = methodInfo.ReturnType; + if (asyncResultType == typeof(void)) + { + if (methodReturnType == typeof(ValueTask)) + { + return (target, args) => + { + return new ObjectMethodExecutorAwaitable( + methodInfo.Invoke(target, args), + (awaitable) => ((ValueTask)awaitable).GetAwaiter(), + (awaiter) => ((ValueTaskAwaiter)awaiter).IsCompleted, + (awaiter) => + { + ((ValueTaskAwaiter)awaiter).GetResult(); + return null; + }, + (awaiter, continuation) => + { + ((ValueTaskAwaiter)awaiter).OnCompleted(continuation); + }, + (awaiter, continuation) => + { + ((ValueTaskAwaiter)awaiter).UnsafeOnCompleted(continuation); + }); + }; + } + + // The method must return Task, or a derived type that isn't Task + return (target, args) => + { + return new ObjectMethodExecutorAwaitable( + methodInfo.Invoke(target, args), + (awaitable) => ((Task)awaitable).GetAwaiter(), + (awaiter) => ((TaskAwaiter)awaiter).IsCompleted, + (awaiter) => + { + ((TaskAwaiter)awaiter).GetResult(); + return null; + }, + (awaiter, continuation) => + { + ((TaskAwaiter)awaiter).OnCompleted(continuation); + }, + (awaiter, continuation) => + { + ((TaskAwaiter)awaiter).UnsafeOnCompleted(continuation); + }); + }; + } + + if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) + { + return (target, args) => + { + return new ObjectMethodExecutorAwaitable( + methodInfo.Invoke(target, args), + (awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty()), + (awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty())!, + (awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty())!, + (awaiter, continuation) => + { + ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); + }, + (awaiter, continuation) => + { + ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); + }); + }; + } + + // The method must return a Task or a derived type + return (target, args) => + { + return new ObjectMethodExecutorAwaitable( + methodInfo.Invoke(target, args), + (awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty()), + (awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty())!, + (awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty())!, + (awaiter, continuation) => + { + ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); + }, + (awaiter, continuation) => + { + ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); + }); + }; + } } diff --git a/src/SignalR/SignalR.slnf b/src/SignalR/SignalR.slnf index b4e7e035fe51..28592c935943 100644 --- a/src/SignalR/SignalR.slnf +++ b/src/SignalR/SignalR.slnf @@ -68,7 +68,7 @@ "src\\SignalR\\samples\\WebSocketSample\\WebSocketSample.csproj", "src\\SignalR\\server\\Core\\src\\Microsoft.AspNetCore.SignalR.Core.csproj", "src\\SignalR\\server\\SignalR\\src\\Microsoft.AspNetCore.SignalR.csproj", - "src\\SignalR\\server\\SignalR\\test\\Microsoft.AspNetCore.SignalR.Tests.csproj", + "src\\SignalR\\server\\SignalR\\test\\Microsoft.AspNetCore.SignalR.Tests\\Microsoft.AspNetCore.SignalR.Tests.csproj", "src\\SignalR\\server\\Specification.Tests\\src\\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj", "src\\SignalR\\server\\StackExchangeRedis\\src\\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj", "src\\SignalR\\server\\StackExchangeRedis\\test\\Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests.csproj", diff --git a/src/SignalR/common/Protocols.MessagePack/src/MessagePackProtocolDependencyInjectionExtensions.cs b/src/SignalR/common/Protocols.MessagePack/src/MessagePackProtocolDependencyInjectionExtensions.cs index 7a815f30d7db..26cefd96bb60 100644 --- a/src/SignalR/common/Protocols.MessagePack/src/MessagePackProtocolDependencyInjectionExtensions.cs +++ b/src/SignalR/common/Protocols.MessagePack/src/MessagePackProtocolDependencyInjectionExtensions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR.Protocol; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -21,6 +22,7 @@ public static class MessagePackProtocolDependencyInjectionExtensions /// /// The representing the SignalR server to add MessagePack protocol support to. /// The value of + [RequiresUnreferencedCode("MessagePack does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")] public static TBuilder AddMessagePackProtocol(this TBuilder builder) where TBuilder : ISignalRBuilder => AddMessagePackProtocol(builder, _ => { }); @@ -33,6 +35,7 @@ public static TBuilder AddMessagePackProtocol(this TBuilder builder) w /// The representing the SignalR server to add MessagePack protocol support to. /// A delegate that can be used to configure the /// The value of + [RequiresUnreferencedCode("MessagePack does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")] public static TBuilder AddMessagePackProtocol(this TBuilder builder, Action configure) where TBuilder : ISignalRBuilder { builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton()); diff --git a/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj b/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj index b90702bc6c8b..be6f0bab32e3 100644 --- a/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj +++ b/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj @@ -14,6 +14,7 @@ + diff --git a/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj b/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj index f905437355d7..6b621b28bc00 100644 --- a/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj +++ b/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj @@ -9,6 +9,8 @@ + + diff --git a/src/SignalR/common/Protocols.NewtonsoftJson/src/NewtonsoftJsonProtocolDependencyInjectionExtensions.cs b/src/SignalR/common/Protocols.NewtonsoftJson/src/NewtonsoftJsonProtocolDependencyInjectionExtensions.cs index 03c97811c1f1..7e0030fa2a28 100644 --- a/src/SignalR/common/Protocols.NewtonsoftJson/src/NewtonsoftJsonProtocolDependencyInjectionExtensions.cs +++ b/src/SignalR/common/Protocols.NewtonsoftJson/src/NewtonsoftJsonProtocolDependencyInjectionExtensions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR.Protocol; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -21,6 +22,7 @@ public static class NewtonsoftJsonProtocolDependencyInjectionExtensions /// /// The representing the SignalR server to add JSON protocol support to. /// The value of + [RequiresUnreferencedCode("Newtonsoft.Json does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")] public static TBuilder AddNewtonsoftJsonProtocol(this TBuilder builder) where TBuilder : ISignalRBuilder => AddNewtonsoftJsonProtocol(builder, _ => { }); @@ -33,6 +35,7 @@ public static TBuilder AddNewtonsoftJsonProtocol(this TBuilder builder /// The representing the SignalR server to add JSON protocol support to. /// A delegate that can be used to configure the /// The value of + [RequiresUnreferencedCode("Newtonsoft.Json does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")] public static TBuilder AddNewtonsoftJsonProtocol(this TBuilder builder, Action configure) where TBuilder : ISignalRBuilder { builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton()); diff --git a/src/SignalR/common/Shared/ReflectionHelper.cs b/src/SignalR/common/Shared/ReflectionHelper.cs index 70351533572f..1713ffa06da7 100644 --- a/src/SignalR/common/Shared/ReflectionHelper.cs +++ b/src/SignalR/common/Shared/ReflectionHelper.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Linq; using System.Threading.Channels; namespace Microsoft.AspNetCore.SignalR; @@ -17,7 +15,7 @@ internal static class ReflectionHelper // and 'stream' types from the client are allowed to inherit from accepted 'stream' types public static bool IsStreamingType(Type type, bool mustBeDirectType = false) { - // TODO #2594 - add Streams here, to make sending files easy + // TODO https://github.com/dotnet/aspnetcore/issues/5316 - add Streams here, to make sending files easy if (IsIAsyncEnumerable(type)) { diff --git a/src/SignalR/server/Core/src/Hub.cs b/src/SignalR/server/Core/src/Hub.cs index acf89fffc961..c32c75782847 100644 --- a/src/SignalR/server/Core/src/Hub.cs +++ b/src/SignalR/server/Core/src/Hub.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR; /// @@ -8,6 +10,8 @@ namespace Microsoft.AspNetCore.SignalR; /// public abstract class Hub : IDisposable { + internal const DynamicallyAccessedMemberTypes DynamicallyAccessedMembers = DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.PublicMethods; + private bool _disposed; private IHubCallerClients _clients = default!; private HubCallerContext _context = default!; diff --git a/src/SignalR/server/Core/src/HubConnectionHandler.cs b/src/SignalR/server/Core/src/HubConnectionHandler.cs index 342cbedb8dae..a56cd9a90835 100644 --- a/src/SignalR/server/Core/src/HubConnectionHandler.cs +++ b/src/SignalR/server/Core/src/HubConnectionHandler.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.SignalR.Internal; @@ -16,7 +17,7 @@ namespace Microsoft.AspNetCore.SignalR; /// /// Handles incoming connections and implements the SignalR Hub Protocol. /// -public class HubConnectionHandler : ConnectionHandler where THub : Hub +public class HubConnectionHandler<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> : ConnectionHandler where THub : Hub { private readonly HubLifetimeManager _lifetimeManager; private readonly ILoggerFactory _loggerFactory; diff --git a/src/SignalR/server/Core/src/Hub`T.cs b/src/SignalR/server/Core/src/Hub`T.cs index fc7c32edd388..7c3dcf83a2d5 100644 --- a/src/SignalR/server/Core/src/Hub`T.cs +++ b/src/SignalR/server/Core/src/Hub`T.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.SignalR.Internal; namespace Microsoft.AspNetCore.SignalR; @@ -9,7 +10,8 @@ namespace Microsoft.AspNetCore.SignalR; /// A base class for a strongly typed SignalR hub. /// /// The type of client. -public abstract class Hub : Hub where T : class +[RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")] +public abstract class Hub<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T> : Hub where T : class { private IHubCallerClients? _clients; diff --git a/src/SignalR/server/Core/src/IHubActivator.cs b/src/SignalR/server/Core/src/IHubActivator.cs index f76b10763cab..b8f84c2b0903 100644 --- a/src/SignalR/server/Core/src/IHubActivator.cs +++ b/src/SignalR/server/Core/src/IHubActivator.cs @@ -1,13 +1,15 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR; /// /// A activator abstraction. /// /// The hub type. -public interface IHubActivator where THub : Hub +public interface IHubActivator<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> where THub : Hub { /// /// Creates a hub. diff --git a/src/SignalR/server/Core/src/IHubContext`T.cs b/src/SignalR/server/Core/src/IHubContext`T.cs index 8cf53f1c14f1..438c49ced545 100644 --- a/src/SignalR/server/Core/src/IHubContext`T.cs +++ b/src/SignalR/server/Core/src/IHubContext`T.cs @@ -1,19 +1,25 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR; /// /// A context abstraction for a hub. /// -public interface IHubContext +public interface IHubContext where THub : Hub where T : class { /// /// Gets a that can be used to invoke methods on clients connected to the hub. /// - IHubClients Clients { get; } + IHubClients Clients + { + [RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")] + get; + } /// /// Gets a that can be used to add and remove connections to named groups. diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs b/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs index 0d9b91178f0c..f071633dd938 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs @@ -2,11 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.SignalR.Internal; -internal sealed class DefaultHubActivator : IHubActivator where THub : Hub +internal sealed class DefaultHubActivator<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> : IHubActivator where THub : Hub { // Object factory for THub instances private static readonly Lazy _objectFactory = new Lazy(() => ActivatorUtilities.CreateFactory(typeof(THub), Type.EmptyTypes)); diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs b/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs index b2e54590e2e2..ece981d2c489 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Security.Claims; @@ -16,7 +17,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal; -internal sealed partial class DefaultHubDispatcher : HubDispatcher where THub : Hub +internal sealed partial class DefaultHubDispatcher<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> : HubDispatcher where THub : Hub { private static readonly string _fullHubName = typeof(THub).FullName ?? typeof(THub).Name; @@ -31,6 +32,12 @@ internal sealed partial class DefaultHubDispatcher : HubDispatcher w private readonly Func? _onDisconnectedMiddleware; private readonly HubLifetimeManager _hubLifetimeManager; + [FeatureSwitchDefinition("Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported")] + [FeatureGuard(typeof(RequiresDynamicCodeAttribute))] + [FeatureGuard(typeof(RequiresUnreferencedCodeAttribute))] + private static bool IsCustomAwaitableSupported { get; } = + AppContext.TryGetSwitch("Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported", out bool customAwaitableSupport) ? customAwaitableSupport : true; + public DefaultHubDispatcher(IServiceScopeFactory serviceScopeFactory, IHubContext hubContext, bool enableDetailedErrors, bool disableImplicitFromServiceParameters, ILogger> logger, List? hubFilters, HubLifetimeManager lifetimeManager) { @@ -761,7 +768,10 @@ private void DiscoverHubMethods(bool disableImplicitFromServiceParameters) throw new NotSupportedException($"Duplicate definitions of '{methodName}'. Overloading is not supported."); } - var executor = ObjectMethodExecutor.Create(methodInfo, hubTypeInfo); + var executor = IsCustomAwaitableSupported + ? CreateObjectMethodExecutor(methodInfo, hubTypeInfo) + : ObjectMethodExecutor.CreateTrimAotCompatible(methodInfo, hubTypeInfo); + var authorizeAttributes = methodInfo.GetCustomAttributes(inherit: true); _methods[methodName] = new HubMethodDescriptor(executor, serviceProviderIsService, authorizeAttributes); _cachedMethodNames.Add(methodName); @@ -770,6 +780,11 @@ private void DiscoverHubMethods(bool disableImplicitFromServiceParameters) } } + [RequiresUnreferencedCode("Using SignalR with 'Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported=true' is not trim compatible.")] + [RequiresDynamicCode("Using SignalR with 'Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported=true' is not native AOT compatible.")] + private static ObjectMethodExecutor CreateObjectMethodExecutor(MethodInfo methodInfo, TypeInfo targetType) + => ObjectMethodExecutor.Create(methodInfo, targetType); + public override IReadOnlyList GetParameterTypes(string methodName) { if (!_methods.TryGetValue(methodName, out var descriptor)) diff --git a/src/SignalR/server/Core/src/Internal/HubClients`T.cs b/src/SignalR/server/Core/src/Internal/HubClients`T.cs index e168174b6464..360ae3f0e153 100644 --- a/src/SignalR/server/Core/src/Internal/HubClients`T.cs +++ b/src/SignalR/server/Core/src/Internal/HubClients`T.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR.Internal; -internal sealed class HubClients : IHubClients where THub : Hub +[RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")] +internal sealed class HubClients : IHubClients where THub : Hub { private readonly HubLifetimeManager _lifetimeManager; diff --git a/src/SignalR/server/Core/src/Internal/HubConnectionBinder.cs b/src/SignalR/server/Core/src/Internal/HubConnectionBinder.cs index 9b844929b951..512897b5489a 100644 --- a/src/SignalR/server/Core/src/Internal/HubConnectionBinder.cs +++ b/src/SignalR/server/Core/src/Internal/HubConnectionBinder.cs @@ -1,9 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR.Internal; -internal sealed class HubConnectionBinder : IInvocationBinder where THub : Hub +internal sealed class HubConnectionBinder<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> : IInvocationBinder where THub : Hub { private readonly HubDispatcher _dispatcher; private readonly HubConnectionContext _connection; diff --git a/src/SignalR/server/Core/src/Internal/HubContext`T.cs b/src/SignalR/server/Core/src/Internal/HubContext`T.cs index e7e154d7e764..14f37f934677 100644 --- a/src/SignalR/server/Core/src/Internal/HubContext`T.cs +++ b/src/SignalR/server/Core/src/Internal/HubContext`T.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR.Internal; -internal sealed class HubContext : IHubContext +[RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")] +internal sealed class HubContext : IHubContext where THub : Hub where T : class { diff --git a/src/SignalR/server/Core/src/Internal/HubDispatcher.cs b/src/SignalR/server/Core/src/Internal/HubDispatcher.cs index efae161bddd8..0edfa681bfdb 100644 --- a/src/SignalR/server/Core/src/Internal/HubDispatcher.cs +++ b/src/SignalR/server/Core/src/Internal/HubDispatcher.cs @@ -1,11 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.SignalR.Protocol; namespace Microsoft.AspNetCore.SignalR.Internal; -internal abstract class HubDispatcher where THub : Hub +internal abstract class HubDispatcher<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub> where THub : Hub { public abstract Task OnConnectedAsync(HubConnectionContext connection); public abstract Task OnDisconnectedAsync(HubConnectionContext connection, Exception? exception); diff --git a/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs b/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs index b10e83eeecd3..01ec440004eb 100644 --- a/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs +++ b/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Linq.Expressions; using System.Reflection; +using System.Runtime.CompilerServices; using System.Threading.Channels; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http.Metadata; @@ -35,27 +38,22 @@ public HubMethodDescriptor(ObjectMethodExecutor methodExecutor, IServiceProvider ? MethodExecutor.AsyncResultType! : MethodExecutor.MethodReturnType; - foreach (var returnType in NonAsyncReturnType.GetInterfaces().Concat(NonAsyncReturnType.AllBaseTypes())) + var asyncEnumerableType = ReflectionHelper.GetIAsyncEnumerableInterface(NonAsyncReturnType); + if (asyncEnumerableType is not null) { - if (!returnType.IsGenericType) - { - continue; - } - - var openReturnType = returnType.GetGenericTypeDefinition(); - - if (openReturnType == typeof(IAsyncEnumerable<>)) - { - StreamReturnType = returnType.GetGenericArguments()[0]; - _makeCancelableEnumeratorMethodInfo = MakeCancelableAsyncEnumeratorMethod; - break; - } - - if (openReturnType == typeof(ChannelReader<>)) + StreamReturnType = ValidateStreamType(asyncEnumerableType.GetGenericArguments()[0]); + _makeCancelableEnumeratorMethodInfo = MakeCancelableAsyncEnumeratorMethod; + } + else + { + foreach (var returnType in NonAsyncReturnType.AllBaseTypes()) { - StreamReturnType = returnType.GetGenericArguments()[0]; - _makeCancelableEnumeratorMethodInfo = MakeAsyncEnumeratorFromChannelMethod; - break; + if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(ChannelReader<>)) + { + StreamReturnType = ValidateStreamType(returnType.GetGenericArguments()[0]); + _makeCancelableEnumeratorMethodInfo = MakeAsyncEnumeratorFromChannelMethod; + break; + } } } @@ -75,7 +73,7 @@ public HubMethodDescriptor(ObjectMethodExecutor methodExecutor, IServiceProvider StreamingParameters = new List(); } - StreamingParameters.Add(p.ParameterType.GetGenericArguments()[0]); + StreamingParameters.Add(ValidateStreamType(p.ParameterType.GetGenericArguments()[0])); HasSyntheticArguments = true; return false; } @@ -205,15 +203,25 @@ public object GetService(IServiceProvider serviceProvider, int index, Type param public IAsyncEnumerator FromReturnedStream(object stream, CancellationToken cancellationToken) { - // there is the potential for compile to be called times but this has no harmful effect other than perf + // there is the potential for _makeCancelableEnumerator to be set multiple times but this has no harmful effect other than startup perf if (_makeCancelableEnumerator == null) { - _makeCancelableEnumerator = CompileConvertToEnumerator(_makeCancelableEnumeratorMethodInfo!, StreamReturnType!); + if (RuntimeFeature.IsDynamicCodeSupported) + { + _makeCancelableEnumerator = CompileConvertToEnumerator(_makeCancelableEnumeratorMethodInfo!, StreamReturnType!); + } + else + { + _makeCancelableEnumerator = ConvertToEnumeratorWithReflection(_makeCancelableEnumeratorMethodInfo!, StreamReturnType!); + } } return _makeCancelableEnumerator.Invoke(stream, cancellationToken); } + [UnconditionalSuppressMessage("Trimming", "IL2060:MakeGenericMethod", + Justification = "The adapter methods passed into here (MakeCancelableAsyncEnumerator and MakeAsyncEnumeratorFromChannel) don't have trimming annotations.")] + [RequiresDynamicCode("Calls MakeGenericMethod with types that may be ValueTypes")] private static Func> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) { // This will call one of two adapter methods to wrap the passed in streamable value into an IAsyncEnumerable: @@ -239,6 +247,21 @@ private static Func> Compile return lambda.Compile(); } + [UnconditionalSuppressMessage("Trimming", "IL2060:MakeGenericMethod", + Justification = "The adapter methods passed into here (MakeCancelableAsyncEnumerator and MakeAsyncEnumeratorFromChannel) don't have trimming annotations.")] + [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", + Justification = "There is a runtime check for ValueType streaming item type when PublishAot=true. Developers will get an exception in this situation before publishing.")] + private static Func> ConvertToEnumeratorWithReflection(MethodInfo adapterMethodInfo, Type streamReturnType) + { + Debug.Assert(!streamReturnType.IsValueType, "ValidateStreamType will throw during the ctor if the streamReturnType is a ValueType when PublishAot=true."); + + var genericAdapterMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); + return (stream, cancellationToken) => + { + return (IAsyncEnumerator)genericAdapterMethodInfo.Invoke(null, [stream, cancellationToken])!; + }; + } + private static Type GetServiceType(Type type) { // IServiceProviderIsService will special case IEnumerable<> and always return true @@ -252,4 +275,17 @@ private static Type GetServiceType(Type type) return type; } + + private Type ValidateStreamType(Type streamType) + { + if (!RuntimeFeature.IsDynamicCodeSupported && streamType.IsValueType) + { + // NativeAOT apps are not able to stream IAsyncEnumerable and ChannelReader of ValueTypes + // since we cannot create AsyncEnumerableAdapters.MakeCancelableAsyncEnumerator and AsyncEnumerableAdapters.MakeAsyncEnumeratorFromChannel methods with a generic ValueType. + var methodInfo = MethodExecutor.MethodInfo; + throw new InvalidOperationException($"Unable to stream an item with type '{streamType}' on method '{methodInfo.DeclaringType}.{methodInfo.Name}' because it is a ValueType. Native code to support streaming this ValueType will not be available with native AOT."); + } + + return streamType; + } } diff --git a/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs b/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs index d54fb6cfe779..a5f6332e7aba 100644 --- a/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs +++ b/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; @@ -8,24 +9,12 @@ namespace Microsoft.AspNetCore.SignalR.Internal; internal static class HubReflectionHelper { - private static readonly Type[] _excludeInterfaces = new[] { typeof(IDisposable) }; - - public static IEnumerable GetHubMethods(Type hubType) + public static IEnumerable GetHubMethods([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type hubType) { var methods = hubType.GetMethods(BindingFlags.Public | BindingFlags.Instance); - var allInterfaceMethods = _excludeInterfaces.SelectMany(i => GetInterfaceMethods(hubType, i)); - - return methods.Except(allInterfaceMethods).Where(IsHubMethod); - } - - private static IEnumerable GetInterfaceMethods(Type type, Type iface) - { - if (!iface.IsAssignableFrom(type)) - { - return Enumerable.Empty(); - } + var excludedInterfaceMethods = hubType.GetInterfaceMap(typeof(IDisposable)).TargetMethods; - return type.GetInterfaceMap(iface).TargetMethods; + return methods.Except(excludedInterfaceMethods).Where(IsHubMethod); } private static bool IsHubMethod(MethodInfo methodInfo) diff --git a/src/SignalR/server/Core/src/Internal/TypedClientBuilder.cs b/src/SignalR/server/Core/src/Internal/TypedClientBuilder.cs index 985dc14e96bf..a1afdde56598 100644 --- a/src/SignalR/server/Core/src/Internal/TypedClientBuilder.cs +++ b/src/SignalR/server/Core/src/Internal/TypedClientBuilder.cs @@ -1,13 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Reflection.Emit; namespace Microsoft.AspNetCore.SignalR.Internal; -internal static class TypedClientBuilder +[RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")] +internal static class TypedClientBuilder<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T> { private const string ClientModuleName = "Microsoft.AspNetCore.SignalR.TypedClientBuilder"; @@ -44,6 +46,7 @@ private static Func GenerateClientBuilder() return (Func)factoryMethod!.CreateDelegate(typeof(Func)); } + [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] private static Type GenerateInterfaceImplementation(ModuleBuilder moduleBuilder) { var name = ClientModuleName + "." + typeof(T).Name + "Impl"; @@ -64,14 +67,19 @@ private static Type GenerateInterfaceImplementation(ModuleBuilder moduleBuilder) BuildMethod(type, method, proxyField); } - return type.CreateTypeInfo()!; + return type.CreateType(); } - private static IEnumerable GetAllInterfaceMethods(Type interfaceType) + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2062:UnrecognizedReflectionPattern", + Justification = "interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces will be preserved as well. https://github.com/mono/linker/issues/1731 tracks not emitting warnings here.")] + private static IEnumerable GetAllInterfaceMethods([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType) { foreach (var parent in interfaceType.GetInterfaces()) { + // interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces will be preserved as well. https://github.com/mono/linker/issues/1731 tracks not emitting warnings here. +#pragma warning disable IL2072 foreach (var parentMethod in GetAllInterfaceMethods(parent)) +#pragma warning restore IL2072 { yield return parentMethod; } @@ -239,7 +247,9 @@ private static void BuildFactoryMethod(TypeBuilder type, ConstructorInfo ctor) generator.Emit(OpCodes.Ret); // Return the typed client } - private static void VerifyInterface(Type interfaceType) + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2062:UnrecognizedReflectionPattern", + Justification = "interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces will be preserved as well. https://github.com/mono/linker/issues/1731 tracks not emitting warnings here.")] + private static void VerifyInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType) { if (!interfaceType.IsInterface) { @@ -263,7 +273,10 @@ private static void VerifyInterface(Type interfaceType) foreach (var parent in interfaceType.GetInterfaces()) { + // interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces will be preserved as well. https://github.com/mono/linker/issues/1731 tracks not emitting warnings here. +#pragma warning disable IL2072 VerifyInterface(parent); +#pragma warning restore IL2072 } } diff --git a/src/SignalR/server/Core/src/Internal/TypedHubClients.cs b/src/SignalR/server/Core/src/Internal/TypedHubClients.cs index 723d09e7fbd8..e0b9a6e90d5b 100644 --- a/src/SignalR/server/Core/src/Internal/TypedHubClients.cs +++ b/src/SignalR/server/Core/src/Internal/TypedHubClients.cs @@ -1,9 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.SignalR.Internal; -internal sealed class TypedHubClients : IHubCallerClients +[RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")] +internal sealed class TypedHubClients<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T> : IHubCallerClients { private readonly IHubCallerClients _hubClients; diff --git a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.WarningSuppressions.xml b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.WarningSuppressions.xml new file mode 100644 index 000000000000..6923b9ee4686 --- /dev/null +++ b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.WarningSuppressions.xml @@ -0,0 +1,12 @@ + + + + + ILLink + IL2026 + member + M:Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.DiscoverHubMethods(System.Boolean) + This warning is left in the product so developers get an ILLink warning when trimming an app when Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported=true. + + + diff --git a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj index b4552ea0c9f6..f4276f93dcdb 100644 --- a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj +++ b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj @@ -7,6 +7,7 @@ Microsoft.AspNetCore.SignalR false enable + true diff --git a/src/SignalR/server/Core/src/SignalRConnectionBuilderExtensions.cs b/src/SignalR/server/Core/src/SignalRConnectionBuilderExtensions.cs index 9f3ef3105d28..6a5624180b28 100644 --- a/src/SignalR/server/Core/src/SignalRConnectionBuilderExtensions.cs +++ b/src/SignalR/server/Core/src/SignalRConnectionBuilderExtensions.cs @@ -12,15 +12,13 @@ namespace Microsoft.AspNetCore.SignalR; /// public static class SignalRConnectionBuilderExtensions { - private const DynamicallyAccessedMemberTypes HubAccessibility = DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.PublicMethods; - /// /// Configure the connection to host the specified type. /// /// The type to host on the connection. /// The connection to configure. /// The same instance of the for chaining. - public static IConnectionBuilder UseHub<[DynamicallyAccessedMembers(HubAccessibility)] THub>(this IConnectionBuilder connectionBuilder) where THub : Hub + public static IConnectionBuilder UseHub<[DynamicallyAccessedMembers(Hub.DynamicallyAccessedMembers)] THub>(this IConnectionBuilder connectionBuilder) where THub : Hub { var marker = connectionBuilder.ApplicationServices.GetService(typeof(SignalRCoreMarkerService)); if (marker == null) diff --git a/src/SignalR/server/Core/src/SignalRDependencyInjectionExtensions.cs b/src/SignalR/server/Core/src/SignalRDependencyInjectionExtensions.cs index 317e11a63ff3..51b5746fd96e 100644 --- a/src/SignalR/server/Core/src/SignalRDependencyInjectionExtensions.cs +++ b/src/SignalR/server/Core/src/SignalRDependencyInjectionExtensions.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR.Internal; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -24,7 +25,7 @@ public static ISignalRServerBuilder AddSignalRCore(this IServiceCollection servi services.TryAddSingleton(typeof(HubLifetimeManager<>), typeof(DefaultHubLifetimeManager<>)); services.TryAddSingleton(typeof(IHubProtocolResolver), typeof(DefaultHubProtocolResolver)); services.TryAddSingleton(typeof(IHubContext<>), typeof(HubContext<>)); - services.TryAddSingleton(typeof(IHubContext<,>), typeof(HubContext<,>)); + AddTypedHubContext(services); services.TryAddSingleton(typeof(HubConnectionHandler<>), typeof(HubConnectionHandler<>)); services.TryAddSingleton(typeof(IUserIdProvider), typeof(DefaultUserIdProvider)); services.TryAddSingleton(typeof(HubDispatcher<>), typeof(DefaultHubDispatcher<>)); @@ -36,5 +37,13 @@ public static ISignalRServerBuilder AddSignalRCore(this IServiceCollection servi var builder = new SignalRServerBuilder(services); builder.AddJsonProtocol(); return builder; + + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL3050:RequiresDynamicCode", + Justification = "HubContext<,>'s ctor creates a HubClients<,> instance, which generates code dynamically. " + + "The property that accesses the HubClients<,> is annotated as RequiresDynamicCode on IHubContext<,>, so developers will get a warning when using it.")] + static void AddTypedHubContext(IServiceCollection services) + { + services.TryAddSingleton(typeof(IHubContext<,>), typeof(HubContext<,>)); + } } } diff --git a/src/SignalR/server/Core/src/StreamTracker.cs b/src/SignalR/server/Core/src/StreamTracker.cs index b317243c7df9..81fea34566de 100644 --- a/src/SignalR/server/Core/src/StreamTracker.cs +++ b/src/SignalR/server/Core/src/StreamTracker.cs @@ -2,9 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Concurrent; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; +using System.Runtime.CompilerServices; using System.Threading.Channels; using Microsoft.AspNetCore.SignalR.Protocol; @@ -24,8 +26,14 @@ public StreamTracker(int streamBufferCapacity) /// /// Creates a new stream and returns the ChannelReader for it as an object. /// + [UnconditionalSuppressMessage("Trimming", "IL2060:MakeGenericMethod", + Justification = "BuildStream doesn't have trimming annotations.")] + [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", + Justification = "HubMethodDescriptor checks for ValueType streaming item types when PublishAot=true. Developers will get an exception in this situation before publishing.")] public object AddStream(string streamId, Type itemType, Type targetType) { + Debug.Assert(RuntimeFeature.IsDynamicCodeSupported || !itemType.IsValueType, "HubMethodDescriptor ensures itemType is not a ValueType when PublishAot=true."); + var newConverter = (IStreamConverter)_buildConverterMethod.MakeGenericMethod(itemType).Invoke(null, _streamConverterArgs)!; _lookup[streamId] = newConverter; return newConverter.GetReaderAsObject(targetType); diff --git a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj index bbe11c2ab0e9..4fabcecbe46b 100644 --- a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj +++ b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj @@ -5,6 +5,7 @@ true false enable + true diff --git a/src/SignalR/server/SignalR/src/SignalRDependencyInjectionExtensions.cs b/src/SignalR/server/SignalR/src/SignalRDependencyInjectionExtensions.cs index 20a3c6d2ab36..09893e9b02bb 100644 --- a/src/SignalR/server/SignalR/src/SignalRDependencyInjectionExtensions.cs +++ b/src/SignalR/server/SignalR/src/SignalRDependencyInjectionExtensions.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -35,7 +34,6 @@ public static ISignalRServerBuilder AddHubOptions(this ISignalRServerBuild /// /// The to add services to. /// An that can be used to further configure the SignalR services. - [RequiresUnreferencedCode("SignalR does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")] public static ISignalRServerBuilder AddSignalR(this IServiceCollection services) { ArgumentNullException.ThrowIfNull(services); @@ -55,7 +53,6 @@ public static ISignalRServerBuilder AddSignalR(this IServiceCollection services) /// The to add services to. /// An to configure the provided . /// An that can be used to further configure the SignalR services. - [RequiresUnreferencedCode("SignalR does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")] public static ISignalRServerBuilder AddSignalR(this IServiceCollection services, Action configure) { ArgumentNullException.ThrowIfNull(services); diff --git a/src/SignalR/server/SignalR/test/AddSignalRTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/AddSignalRTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/AddSignalRTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/AddSignalRTests.cs diff --git a/src/SignalR/server/SignalR/test/AuthConnectionHandler.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/AuthConnectionHandler.cs similarity index 100% rename from src/SignalR/server/SignalR/test/AuthConnectionHandler.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/AuthConnectionHandler.cs diff --git a/src/SignalR/server/SignalR/test/AuthHub.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/AuthHub.cs similarity index 100% rename from src/SignalR/server/SignalR/test/AuthHub.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/AuthHub.cs diff --git a/src/SignalR/server/SignalR/test/CancellationDisposable.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/CancellationDisposable.cs similarity index 100% rename from src/SignalR/server/SignalR/test/CancellationDisposable.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/CancellationDisposable.cs diff --git a/src/SignalR/server/SignalR/test/ClientProxyTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/ClientProxyTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/ClientProxyTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/ClientProxyTests.cs diff --git a/src/SignalR/server/SignalR/test/DefaultHubActivatorTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubActivatorTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/DefaultHubActivatorTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubActivatorTests.cs diff --git a/src/SignalR/server/SignalR/test/DefaultHubLifetimeManagerTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubLifetimeManagerTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/DefaultHubLifetimeManagerTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubLifetimeManagerTests.cs diff --git a/src/SignalR/server/SignalR/test/DefaultTransportFactoryTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/DefaultTransportFactoryTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/DefaultTransportFactoryTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/DefaultTransportFactoryTests.cs diff --git a/src/SignalR/server/SignalR/test/EchoConnectionHandler.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/EchoConnectionHandler.cs similarity index 100% rename from src/SignalR/server/SignalR/test/EchoConnectionHandler.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/EchoConnectionHandler.cs diff --git a/src/SignalR/server/SignalR/test/EndToEndTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/EndToEndTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/EndToEndTests.cs diff --git a/src/SignalR/server/SignalR/test/HttpHeaderConnectionHandler.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HttpHeaderConnectionHandler.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HttpHeaderConnectionHandler.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HttpHeaderConnectionHandler.cs diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTestUtils/Hubs.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubConnectionHandlerTestUtils/Hubs.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTestUtils/Utils.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Utils.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubConnectionHandlerTestUtils/Utils.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Utils.cs diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.Activity.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.Activity.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubConnectionHandlerTests.Activity.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.Activity.cs diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.ClientResult.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.ClientResult.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubConnectionHandlerTests.ClientResult.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.ClientResult.cs diff --git a/src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubConnectionHandlerTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs diff --git a/src/SignalR/server/SignalR/test/HubFilterTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubFilterTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubFilterTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubFilterTests.cs diff --git a/src/SignalR/server/SignalR/test/HubReflectionHelperTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubReflectionHelperTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/HubReflectionHelperTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/HubReflectionHelperTests.cs diff --git a/src/SignalR/server/SignalR/test/Internal/DefaultHubProtocolResolverTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/DefaultHubProtocolResolverTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/Internal/DefaultHubProtocolResolverTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/DefaultHubProtocolResolverTests.cs diff --git a/src/SignalR/server/SignalR/test/Internal/MessageBufferTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/MessageBufferTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/Internal/MessageBufferTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/MessageBufferTests.cs diff --git a/src/SignalR/server/SignalR/test/Internal/ReflectionHelperTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/ReflectionHelperTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/Internal/ReflectionHelperTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/ReflectionHelperTests.cs diff --git a/src/SignalR/server/SignalR/test/Internal/TypedClientBuilderTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/TypedClientBuilderTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/Internal/TypedClientBuilderTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Internal/TypedClientBuilderTests.cs diff --git a/src/SignalR/server/SignalR/test/MapSignalRTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/MapSignalRTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/MapSignalRTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/MapSignalRTests.cs diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests.csproj b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Microsoft.AspNetCore.SignalR.Tests.csproj similarity index 100% rename from src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests.csproj rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Microsoft.AspNetCore.SignalR.Tests.csproj diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs new file mode 100644 index 000000000000..94f37318eff7 --- /dev/null +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs @@ -0,0 +1,340 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Globalization; +using System.Text; +using System.Text.Json.Serialization; +using System.Threading.Channels; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.SignalR.Client; +using Microsoft.DotNet.RemoteExecutor; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; + +namespace Microsoft.AspNetCore.SignalR.Tests; + +public partial class NativeAotTests : FunctionalTestBase +{ + [ConditionalFact] + [RemoteExecutionSupported] + public void CanCallAsyncMethods() + { + RunNativeAotTest(static async () => + { + //System.Diagnostics.Debugger.Launch(); + var loggerFactory = new StringLoggerFactory(); + await using (var server = await InProcessTestServer>.StartServer(loggerFactory)) + { + var hubConnectionBuilder = new HubConnectionBuilder() + .WithUrl(server.Url + "/hub"); + AppJsonSerializerContext.AddToJsonHubProtocol(hubConnectionBuilder.Services); + var connection = hubConnectionBuilder.Build(); + + await connection.StartAsync().DefaultTimeout(); + + await connection.InvokeAsync(nameof(AsyncMethodHub.TaskMethod)).DefaultTimeout(); + Assert.Contains("TaskMethod called", loggerFactory.ToString()); + + await connection.InvokeAsync(nameof(AsyncMethodHub.ValueTaskMethod)).DefaultTimeout(); + Assert.Contains("ValueTaskMethod called", loggerFactory.ToString()); + + await connection.InvokeAsync(nameof(AsyncMethodHub.CustomTaskMethod)).DefaultTimeout(); + Assert.Contains("CustomTaskMethod called", loggerFactory.ToString()); + + var result = await connection.InvokeAsync(nameof(AsyncMethodHub.TaskValueMethod)).DefaultTimeout(); + Assert.Equal(42, result); + + result = await connection.InvokeAsync(nameof(AsyncMethodHub.ValueTaskValueMethod)).DefaultTimeout(); + Assert.Equal(43, result); + + result = await connection.InvokeAsync(nameof(AsyncMethodHub.CustomTaskValueMethod)).DefaultTimeout(); + Assert.Equal(44, result); + + var counterResults = new List(); + await foreach (var item in connection.StreamAsync(nameof(AsyncMethodHub.CounterAsyncEnumerable), 4)) + { + counterResults.Add(item); + } + Assert.Equal(["0", "1", "2", "3"], counterResults); + + counterResults.Clear(); + await foreach (var item in connection.StreamAsync(nameof(AsyncMethodHub.CounterAsyncEnumerableImpl), 5)) + { + counterResults.Add(item); + } + Assert.Equal(["0", "1", "2", "3", "4"], counterResults); + + var echoResults = new List(); + var asyncEnumerable = connection.StreamAsync(nameof(AsyncMethodHub.StreamEchoAsyncEnumerable), StreamMessages()); + await foreach (var item in asyncEnumerable) + { + echoResults.Add(item); + } + Assert.Equal(["echo:message one", "echo:message two"], echoResults); + + echoResults.Clear(); + var channel = Channel.CreateBounded(10); + var echoResponseReader = await connection.StreamAsChannelAsync(nameof(AsyncMethodHub.StreamEcho), channel.Reader); + await channel.Writer.WriteAsync("some data"); + await channel.Writer.WriteAsync("some more data"); + await channel.Writer.WriteAsync("even more data"); + channel.Writer.Complete(); + + await foreach (var item in echoResponseReader.ReadAllAsync()) + { + echoResults.Add(item); + } + Assert.Equal(["echo:some data", "echo:some more data", "echo:even more data"], echoResults); + } + }); + } + + private static async IAsyncEnumerable StreamMessages() + { + await Task.Yield(); + yield return "message one"; + await Task.Yield(); + yield return "message two"; + } + + [ConditionalFact] + [RemoteExecutionSupported] + public void UsingValueTypesInStreamingThrows() + { + RunNativeAotTest(static async () => + { + var e = await Assert.ThrowsAsync(() => InProcessTestServer>.StartServer(NullLoggerFactory.Instance)); + Assert.Contains("Unable to stream an item with type 'System.Int32' on method 'Microsoft.AspNetCore.SignalR.Tests.NativeAotTests+AsyncEnumerableIntMethodHub.StreamValueType' because it is a ValueType.", e.Message); + }); + + RunNativeAotTest(static async () => + { + var e = await Assert.ThrowsAsync(() => InProcessTestServer>.StartServer(NullLoggerFactory.Instance)); + Assert.Contains("Unable to stream an item with type 'System.Double' on method 'Microsoft.AspNetCore.SignalR.Tests.NativeAotTests+ChannelDoubleMethodHub.StreamValueType' because it is a ValueType.", e.Message); + }); + } + + private static void RunNativeAotTest(Func test) + { + var options = new RemoteInvokeOptions(); + options.RuntimeConfigurationOptions.Add("System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported", "false"); + options.RuntimeConfigurationOptions.Add("Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported", "false"); + options.RuntimeConfigurationOptions.Add("System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault", "false"); + + using var remoteHandle = RemoteExecutor.Invoke(test, options); + } + + public class Startup where THub : Hub + { + public void ConfigureServices(IServiceCollection services) + { + services.AddConnections(); + services.AddSignalR(options => + { + options.EnableDetailedErrors = true; + }); + AppJsonSerializerContext.AddToJsonHubProtocol(services); + } + + public void Configure(IApplicationBuilder app) + { + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapHub("/hub"); + }); + } + } + + public class AsyncMethodHub : TestHub + { + public async Task TaskMethod(ILogger logger) + { + await Task.Yield(); // ensure the returned Task gets awaited correctly + logger.LogInformation("TaskMethod called"); + } + + public async ValueTask ValueTaskMethod(ILogger logger) + { + await Task.Yield(); // ensure the returned Task gets awaited correctly + logger.LogInformation("ValueTaskMethod called"); + } + + public TaskDerivedType CustomTaskMethod(ILogger logger) + { + var task = new TaskDerivedType(); + task.Start(); + logger.LogInformation("CustomTaskMethod called"); + return task; + } + + public async Task TaskValueMethod() + { + await Task.Yield(); // ensure the returned Task gets awaited correctly + return 42; + } + + public async ValueTask ValueTaskValueMethod() + { + await Task.Yield(); // ensure the returned Task gets awaited correctly + return 43; + } + + public TaskOfTDerivedType CustomTaskValueMethod() + { + var task = new TaskOfTDerivedType(44); + task.Start(); + return task; + } + + public async IAsyncEnumerable CounterAsyncEnumerable(int count) + { + for (int i = 0; i < count; i++) + { + await Task.Yield(); + yield return i.ToString(CultureInfo.InvariantCulture); + } + } + + public StreamingHub.AsyncEnumerableImpl CounterAsyncEnumerableImpl(int count) + { + return new StreamingHub.AsyncEnumerableImpl(CounterAsyncEnumerable(count)); + } + + public ChannelReader StreamEcho(ChannelReader source) + { + Channel output = Channel.CreateUnbounded(); + + _ = Task.Run(async () => + { + await foreach (var item in source.ReadAllAsync()) + { + await output.Writer.WriteAsync("echo:" + item); + } + + output.Writer.TryComplete(); + }); + + return output.Reader; + } + + public async IAsyncEnumerable StreamEchoAsyncEnumerable(IAsyncEnumerable source) + { + await foreach (var item in source) + { + yield return "echo:" + item; + } + } + } + + public class AsyncEnumerableIntMethodHub : TestHub + { + public async IAsyncEnumerable StreamValueType() + { + await Task.Yield(); + yield return 1; + await Task.Yield(); + yield return 2; + } + } + + public class ChannelDoubleMethodHub : TestHub + { + public async Task StreamValueType(ILogger logger, ChannelReader source) + { + await foreach (var item in source.ReadAllAsync()) + { + logger.LogInformation("Received: {item}", item); + } + } + } + + public class TaskDerivedType : Task + { + public TaskDerivedType() + : base(() => { }) + { + } + } + + public class TaskOfTDerivedType : Task + { + public TaskOfTDerivedType(T input) + : base(() => input) + { + } + } + + public class StringLoggerFactory : ILoggerFactory + { + private readonly StringBuilder _log = new StringBuilder(); + + public void AddProvider(ILoggerProvider provider) { } + + public ILogger CreateLogger(string name) + { + return new StringLogger(name, this); + } + + public void Dispose() { } + + public override string ToString() + { + return _log.ToString(); + } + + private sealed class StringLogger : ILogger + { + private readonly StringLoggerFactory _factory; + private readonly string _name; + + public StringLogger(string name, StringLoggerFactory factory) + { + _name = name; + _factory = factory; + } + + public IDisposable BeginScope(TState state) + { + return new DummyDisposable(); + } + + public bool IsEnabled(LogLevel logLevel) => true; + + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + { + string message = string.Format(CultureInfo.InvariantCulture, + "Provider: {0}" + Environment.NewLine + + "Log level: {1}" + Environment.NewLine + + "Event id: {2}" + Environment.NewLine + + "Exception: {3}" + Environment.NewLine + + "Message: {4}", _name, logLevel, eventId, exception?.ToString(), formatter(state, exception)); + _factory._log.AppendLine(message); + } + + private sealed class DummyDisposable : IDisposable + { + public void Dispose() + { + // no-op + } + } + } + } + + [JsonSerializable(typeof(string))] + [JsonSerializable(typeof(int))] + internal partial class AppJsonSerializerContext : JsonSerializerContext + { + public static void AddToJsonHubProtocol(IServiceCollection services) + { + services.Configure(o => + { + o.PayloadSerializerOptions.TypeInfoResolverChain.Insert(0, Default); + }); + } + } +} diff --git a/src/SignalR/server/SignalR/test/SerializedHubMessageTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/SerializedHubMessageTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/SerializedHubMessageTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/SerializedHubMessageTests.cs diff --git a/src/SignalR/server/SignalR/test/Startup.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Startup.cs similarity index 100% rename from src/SignalR/server/SignalR/test/Startup.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Startup.cs diff --git a/src/SignalR/server/SignalR/test/TestAuthHandler.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/TestAuthHandler.cs similarity index 100% rename from src/SignalR/server/SignalR/test/TestAuthHandler.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/TestAuthHandler.cs diff --git a/src/SignalR/server/SignalR/test/TestFilters.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/TestFilters.cs similarity index 100% rename from src/SignalR/server/SignalR/test/TestFilters.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/TestFilters.cs diff --git a/src/SignalR/server/SignalR/test/UncreatableHub.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/UncreatableHub.cs similarity index 100% rename from src/SignalR/server/SignalR/test/UncreatableHub.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/UncreatableHub.cs diff --git a/src/SignalR/server/SignalR/test/UserAgentHeaderTest.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/UserAgentHeaderTest.cs similarity index 100% rename from src/SignalR/server/SignalR/test/UserAgentHeaderTest.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/UserAgentHeaderTest.cs diff --git a/src/SignalR/server/SignalR/test/WebSocketsTransportTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/WebSocketsTransportTests.cs similarity index 100% rename from src/SignalR/server/SignalR/test/WebSocketsTransportTests.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/WebSocketsTransportTests.cs diff --git a/src/SignalR/server/SignalR/test/WriteThenCloseConnectionHandler.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/WriteThenCloseConnectionHandler.cs similarity index 100% rename from src/SignalR/server/SignalR/test/WriteThenCloseConnectionHandler.cs rename to src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/WriteThenCloseConnectionHandler.cs diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/Microsoft.AspNetCore.SignalR.TrimmingTests.proj b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/Microsoft.AspNetCore.SignalR.TrimmingTests.proj new file mode 100644 index 000000000000..7fabca682f6a --- /dev/null +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/Microsoft.AspNetCore.SignalR.TrimmingTests.proj @@ -0,0 +1,9 @@ + + + + + Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported + + + + diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/TestTypedClients.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/TestTypedClients.cs new file mode 100644 index 000000000000..41d3a8aea858 --- /dev/null +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/TestTypedClients.cs @@ -0,0 +1,84 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +// Tests that a SignalR server can use typed clients in a trimmed app. + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting.Server; +using Microsoft.AspNetCore.Hosting.Server.Features; +using Microsoft.AspNetCore.SignalR; +using Microsoft.AspNetCore.SignalR.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; +using System.Linq; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +var builder = WebApplication.CreateSlimBuilder(args); +builder.Services.AddSignalR(); +AppJsonSerializerContext.AddToJsonHubProtocol(builder.Services); + +var app = builder.Build(); +app.MapHub("/testhub"); +await app.StartAsync().ConfigureAwait(false); + +// connect a client and ensure we can invoke a method on the server +var serverUrl = app.Services.GetRequiredService().Features.Get().Addresses.First(); +var hubConnectionBuilder = new HubConnectionBuilder() + .WithUrl(serverUrl + "/testhub"); +AppJsonSerializerContext.AddToJsonHubProtocol(hubConnectionBuilder.Services); +var connection = hubConnectionBuilder.Build(); + +var receivedMessageTask = new TaskCompletionSource(); +connection.On("ReceiveMessage", (user, message) => +{ + receivedMessageTask.SetResult($"{user}: {message}"); +}); + +await connection.StartAsync().ConfigureAwait(false); + +await connection.InvokeAsync("SendMessage", "userA", "my message").ConfigureAwait(false); + +var receivedMessage = await receivedMessageTask.Task.WaitAsync(TimeSpan.FromSeconds(10)).ConfigureAwait(false); +if (receivedMessage != "userA: my message") +{ + return -1; +} + +return 100; + +public interface ITestHubClientBase +{ + Task BaseMethod(); + Task Unused(string unused); +} + +public interface ITestHubClient : ITestHubClientBase +{ + Task ReceiveMessage(string user, string message); +} + +public class TestHub : Hub +{ + public async Task SendMessage(ILogger logger, string user, string message) + { + logger.LogInformation("Received message from {user}: {message}", user, message); + + await Clients.Caller.BaseMethod().ConfigureAwait(false); + + await Clients.All.ReceiveMessage(user, message).ConfigureAwait(false); + } +} + +[JsonSerializable(typeof(string))] +internal sealed partial class AppJsonSerializerContext : JsonSerializerContext +{ + public static void AddToJsonHubProtocol(IServiceCollection services) + { + services.Configure(o => + { + o.PayloadSerializerOptions.TypeInfoResolverChain.Insert(0, Default); + }); + } +} From 70f1f23fcab6cbdc9b10b1a8c5a57b908b973f57 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:15:01 +0000 Subject: [PATCH 104/257] Update dependencies from https://github.com/dotnet/winforms build 20240629.1 (#56551) [main] Update dependencies from dotnet/winforms --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8f7e829a9b3c..a044927459a8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -384,9 +384,9 @@ https://github.com/dotnet/runtime a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/winforms - 10bd60e8b0bbc4639035a36fb7aed414a3581431 + 2a6733dc972bbe0e4bb0489385fb7ce42163bf66 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index b1452ae77e31..26fa238ba75a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,7 +176,7 @@ 2.1.0-beta.24321.1 - 9.0.0-preview.7.24321.4 + 9.0.0-preview.7.24329.1 9.0.0-preview.24317.2 9.0.0-preview.24317.2 From bc36388b10bebe1cc9e62d59708c570fe3d48244 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:15:43 +0000 Subject: [PATCH 105/257] Update dependencies from https://github.com/dotnet/extensions build 20240630.1 (#56549) [main] Update dependencies from dotnet/extensions --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a044927459a8..cf45da94b73a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -414,13 +414,13 @@ https://github.com/dotnet/arcade ede13bd35571c0c8b0c01edcb057031904c5c955 - + https://github.com/dotnet/extensions - 2ae751573d6ccd938176891c5cb8c75226c1451d + 31c8654250e85ad161cf88b7cffbe31f3a406ce6 - + https://github.com/dotnet/extensions - 2ae751573d6ccd938176891c5cb8c75226c1451d + 31c8654250e85ad161cf88b7cffbe31f3a406ce6 https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index 26fa238ba75a..1e5bb0f5cf57 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -142,8 +142,8 @@ 9.0.0-preview.7.24328.10 9.0.0-preview.7.24328.10 - 9.0.0-preview.6.24322.1 - 9.0.0-preview.6.24322.1 + 9.0.0-preview.6.24330.1 + 9.0.0-preview.6.24330.1 9.0.0-preview.7.24322.1 9.0.0-preview.7.24322.1 From 5cbfc712a4f726b4f16bc4fc35d945b57eb891de Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:28:21 +0000 Subject: [PATCH 106/257] Update dependencies from https://github.com/dotnet/source-build-externals build 20240624.1 (#56548) [main] Update dependencies from dotnet/source-build-externals --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cf45da94b73a..43eac6ce3f8e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -372,9 +372,9 @@ a900bbf6fcf33fa2e799ed599ab86e00d6124c05 - + https://github.com/dotnet/source-build-externals - 9a2785b8409e4ee8db848cc2fbfa19b3316a3baa + 311ef7fef52828f4a70a94d13e32c394fd3292ee diff --git a/eng/Versions.props b/eng/Versions.props index 1e5bb0f5cf57..0e7314bbbeb2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -170,7 +170,7 @@ 9.0.0-beta.24327.1 9.0.0-beta.24327.1 - 9.0.0-alpha.1.24320.1 + 9.0.0-alpha.1.24324.1 9.0.0-alpha.1.24304.1 From 2aee228c9c4b7987851234f881c9a48a0e5f4aca Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 01:49:04 +0000 Subject: [PATCH 107/257] Update dependencies from https://github.com/dotnet/symreader build 20240627.2 (#56550) [main] Update dependencies from dotnet/symreader --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 43eac6ce3f8e..f75a6603f3fa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -435,9 +435,9 @@ 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 - + https://github.com/dotnet/symreader - 200bba3d3695c902b740931b8d9c2ba09d037f24 + 0710a7892d89999956e8808c28e9dd0512bd53f3 diff --git a/eng/Versions.props b/eng/Versions.props index 0e7314bbbeb2..f6f87415ed99 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,7 +174,7 @@ 9.0.0-alpha.1.24304.1 - 2.1.0-beta.24321.1 + 2.2.0-beta.24327.2 9.0.0-preview.7.24329.1 From c790ed58ce44f7ba42669429025d7f991aa2d4c8 Mon Sep 17 00:00:00 2001 From: Brennan Date: Mon, 1 Jul 2024 20:34:52 -0700 Subject: [PATCH 108/257] Add logging to MVC tests (#55592) --- src/Mvc/Mvc.slnf | 3 +- .../AntiforgeryAuthTests.cs | 22 +++++-- .../Mvc.FunctionalTests/AntiforgeryTests.cs | 20 ++++-- .../Mvc.FunctionalTests/ApiBehaviorTest.cs | 42 +++++++------ .../Mvc.FunctionalTests/ApiExplorerTest.cs | 20 ++++-- .../ApplicationModelTest.cs | 20 ++++-- .../Mvc.FunctionalTests/AsyncActionsTests.cs | 22 +++++-- .../Mvc.FunctionalTests/AsyncDisposalTest.cs | 21 +++++-- .../AsyncEnumerableTestBase.cs | 20 ++++-- .../AuthMiddlewareAndFilterTest.cs | 4 -- .../AuthMiddlewareAndFilterTestBase.cs | 22 +++++-- ...wareAndFilterWithoutEndpointRoutingTest.cs | 4 -- .../AuthMiddlewareUsingRequireAuthTest.cs | 24 +++++-- .../test/Mvc.FunctionalTests/BasicTests.cs | 19 ++++-- .../ClientValidationOptionsTests.cs | 23 +++++-- .../CompilationOptionsTests.cs | 20 ++++-- .../ComponentRenderingFunctionalTests.cs | 17 +++-- .../ConsumesAttributeEndpointRoutingTests.cs | 5 -- .../ConsumesAttributeTests.cs | 5 -- .../ConsumesAttributeTestsBase.cs | 23 +++++-- .../ContentNegotiationTest.cs | 20 ++++-- .../ControllerEndpointFiltersTest.cs | 17 +++-- .../ControllerFromServicesTests.cs | 20 ++++-- .../CorsEndpointRoutingTests.cs | 4 -- src/Mvc/test/Mvc.FunctionalTests/CorsTests.cs | 5 -- .../test/Mvc.FunctionalTests/CorsTestsBase.cs | 22 +++++-- .../CustomValueProviderTest.cs | 24 +++++-- .../DataAnnotationTests.cs | 31 ++++++--- .../Mvc.FunctionalTests/DefaultValuesTest.cs | 20 ++++-- .../Mvc.FunctionalTests/DirectivesTest.cs | 20 ++++-- .../DoNotRespectBrowserAcceptHeaderTests.cs | 22 +++++-- .../Mvc.FunctionalTests/ErrorPageTests.cs | 34 +++++----- .../Mvc.FunctionalTests/FileResultTests.cs | 21 +++++-- .../test/Mvc.FunctionalTests/FiltersTest.cs | 20 ++++-- .../Mvc.FunctionalTests/FlushPointTest.cs | 20 ++++-- .../Mvc.FunctionalTests/FormFileUploadTest.cs | 20 ++++-- ...lAuthorizationFilterEndpointRoutingTest.cs | 12 +--- .../GlobalAuthorizationFilterTestBase.cs | 25 +++++++- .../GlobalAuthorizationFilterUseMvcTest.cs | 12 +--- .../Mvc.FunctionalTests/HtmlGenerationTest.cs | 35 ++++++----- .../HtmlGenerationWithCultureTest.cs | 21 ++++--- .../HtmlHelperOptionsTest.cs | 22 +++++-- .../HttpActionResultTests.cs | 20 ++++-- .../MvcEncodedTestFixtureOfT.cs | 4 ++ .../Infrastructure/MvcTestFixture.cs | 16 ++++- .../InputFormatterTests.cs | 20 ++++-- .../InputObjectValidationTests.cs | 22 +++++-- .../InputParentValidationTests.cs | 34 +++++----- .../InputValidationTests.cs | 22 +++++-- .../JsonInputFormatterTestBase.cs | 26 +++++--- .../JsonOutputFormatterTestBase.cs | 26 +++++--- .../JsonPatchInputFormatterTest.cs | 22 +++++-- .../JsonResultWithNewtonsoftJsonTest.cs | 24 +++++-- .../JsonResultWithSystemTextJsonTest.cs | 24 +++++-- .../Mvc.FunctionalTests/KeyedServicesTests.cs | 20 ++++-- .../LinkGenerationTests.cs | 21 +++++-- .../Mvc.FunctionalTests/LinkGeneratorTest.cs | 29 ++++++--- .../Mvc.FunctionalTests/LinkParserTest.cs | 28 ++++++--- .../Mvc.FunctionalTests/MvcSandboxTest.cs | 20 ++++-- .../NewtonsoftJsonInputFormatterTest.cs | 5 -- .../NewtonsoftJsonOutputFormatterTest.cs | 5 -- .../NonNullableReferenceTypesTest.cs | 20 ++++-- .../OutputFormatterTest.cs | 20 ++++-- .../PageAsyncDisposalTest.cs | 27 +++++--- .../Mvc.FunctionalTests/RazorBuildTest.cs | 35 ++++++++--- .../Mvc.FunctionalTests/RazorPageModelTest.cs | 28 ++++++--- .../RazorPagesNamespaceTest.cs | 28 ++++++--- .../Mvc.FunctionalTests/RazorPagesTest.cs | 25 +++++--- .../RazorPagesViewSearchTest.cs | 28 ++++++--- .../RazorPagesWithBasePathTest.cs | 22 +++++-- .../RazorPagesWithEndpointRoutingTest.cs | 22 +++++-- ...zorRuntimeCompilationHostingStartupTest.cs | 29 ++++++--- .../RazorViewLocationSpecificationTest.cs | 20 ++++-- .../ReadFromDisconnectedClientTest.cs | 26 +++++--- .../RemoteAttributeValidationTest.cs | 19 ++++-- .../RequestFormLimitsTest.cs | 26 +++++--- .../RequestServicesEndpointRoutingTest.cs | 5 -- .../RequestServicesTest.cs | 5 -- .../RequestServicesTestBase.cs | 26 +++++--- .../RequestSizeLimitTest.cs | 28 ++++++--- .../RespectBrowserAcceptHeaderTests.cs | 29 ++++++--- .../RoutingAcrossPipelineBranchesTest.cs | 21 +++++-- .../RoutingDynamicOrderTest.cs | 19 ++++-- .../Mvc.FunctionalTests/RoutingDynamicTest.cs | 22 +++++-- .../RoutingEndpointRoutingTest.cs | 5 -- ...ngEndpointRoutingWithoutRazorPagesTests.cs | 4 -- .../RoutingFallbackTest.cs | 23 +++++-- .../Mvc.FunctionalTests/RoutingGroupsTest.cs | 24 ++++--- .../RoutingGroupsWithMetadataTest.cs | 19 ++++-- .../test/Mvc.FunctionalTests/RoutingTests.cs | 5 -- .../Mvc.FunctionalTests/RoutingTestsBase.cs | 26 +++++--- .../RoutingWithoutRazorPagesTests.cs | 4 -- .../RoutingWithoutRazorPagesTestsBase.cs | 26 +++++--- .../SerializableErrorTests.cs | 20 ++++-- .../test/Mvc.FunctionalTests/SimpleTests.cs | 20 ++++-- ...WithWebApplicationBuilderExceptionTests.cs | 21 +++++-- .../SimpleWithWebApplicationBuilderTests.cs | 63 +++++++++---------- .../StreamOutputFormatterTest.cs | 20 ++++-- .../SystemTextJsonInputFormatterTest.cs | 5 -- .../SystemTextJsonOutputFormatterTest.cs | 5 -- .../TagHelperComponentTagHelperTest.cs | 19 ++++-- .../TagHelpersFromServicesTest.cs | 20 ++++-- .../Mvc.FunctionalTests/TagHelpersTest.cs | 29 ++++++--- .../TempDataInCookiesTest.cs | 12 ++-- ...TempDataInCookiesUsingCookieConsentTest.cs | 36 +++++++---- .../TempDataInSessionTest.cs | 8 +-- .../TempDataPropertyTest.cs | 22 +++++-- .../Mvc.FunctionalTests/TempDataTestBase.cs | 27 +++++++- .../Mvc.FunctionalTests/UrlResolutionTest.cs | 31 ++++++--- .../VersioningEndpointRoutingTests.cs | 5 -- .../Mvc.FunctionalTests/VersioningTests.cs | 5 -- .../VersioningTestsBase.cs | 26 +++++--- .../ViewComponentFromServicesTests.cs | 21 +++++-- .../Mvc.FunctionalTests/ViewEngineTests.cs | 19 ++++-- ...ontractSerializerFormattersWrappingTest.cs | 19 ++++-- ...ataContractSerializerInputFormatterTest.cs | 21 +++++-- .../XmlOutputFormatterTests.cs | 21 +++++-- .../XmlSerializerFormattersWrappingTest.cs | 20 ++++-- .../XmlSerializerInputFormatterTests.cs | 20 ++++-- .../Mvc.FunctionalTests/xunit.runner.json | 3 + .../WebSites/ApiExplorerWebSite/Startup.cs | 2 - .../UpdateableFileProvider.cs | 2 +- .../Infrastructure/FixtureLoggedTest.cs | 2 +- .../test/Http1/Http1ConnectionTestsBase.cs | 2 +- .../TestApplicationErrorLoggerLoggedTest.cs | 2 +- .../Http2/Http2TestBase.cs | 2 +- .../Http3/Http3TestBase.cs | 2 +- src/Testing/src/LoggedTest/LoggedTest.cs | 2 +- src/Testing/src/LoggedTest/LoggedTestBase.cs | 2 +- src/Testing/test/LoggedTestXunitTests.cs | 2 +- 130 files changed, 1696 insertions(+), 719 deletions(-) diff --git a/src/Mvc/Mvc.slnf b/src/Mvc/Mvc.slnf index 1ca37ea7f216..61da89ec072d 100644 --- a/src/Mvc/Mvc.slnf +++ b/src/Mvc/Mvc.slnf @@ -28,6 +28,7 @@ "src\\Http\\Authentication.Core\\src\\Microsoft.AspNetCore.Authentication.Core.csproj", "src\\Http\\Headers\\src\\Microsoft.Net.Http.Headers.csproj", "src\\Http\\Http.Abstractions\\src\\Microsoft.AspNetCore.Http.Abstractions.csproj", + "src\\Http\\Http.Extensions\\gen\\Microsoft.AspNetCore.Http.RequestDelegateGenerator.csproj", "src\\Http\\Http.Extensions\\src\\Microsoft.AspNetCore.Http.Extensions.csproj", "src\\Http\\Http.Features\\src\\Microsoft.AspNetCore.Http.Features.csproj", "src\\Http\\Http.Results\\src\\Microsoft.AspNetCore.Http.Results.csproj", @@ -35,8 +36,8 @@ "src\\Http\\Metadata\\src\\Microsoft.AspNetCore.Metadata.csproj", "src\\Http\\Routing.Abstractions\\src\\Microsoft.AspNetCore.Routing.Abstractions.csproj", "src\\Http\\Routing\\src\\Microsoft.AspNetCore.Routing.csproj", - "src\\Http\\samples\\MinimalSample\\MinimalSample.csproj", "src\\Http\\WebUtilities\\src\\Microsoft.AspNetCore.WebUtilities.csproj", + "src\\Http\\samples\\MinimalSample\\MinimalSample.csproj", "src\\JSInterop\\Microsoft.JSInterop\\src\\Microsoft.JSInterop.csproj", "src\\Localization\\Abstractions\\src\\Microsoft.Extensions.Localization.Abstractions.csproj", "src\\Localization\\Localization\\src\\Microsoft.Extensions.Localization.csproj", diff --git a/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryAuthTests.cs b/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryAuthTests.cs index 6b4b2d603d5d..311e2288b276 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryAuthTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryAuthTests.cs @@ -1,20 +1,32 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; using SecurityWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class AntiforgeryAuthTests : IClassFixture> +public class AntiforgeryAuthTests : LoggedTest { - public AntiforgeryAuthTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task AutomaticAuthenticationBeforeAntiforgery() diff --git a/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryTests.cs b/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryTests.cs index 904b2739c3b5..375f65d2aa73 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AntiforgeryTests.cs @@ -3,17 +3,29 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class AntiforgeryTests : IClassFixture> +public class AntiforgeryTests : LoggedTest { - public AntiforgeryTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task MultipleAFTokensWithinTheSamePage_GeneratesASingleCookieToken() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ApiBehaviorTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ApiBehaviorTest.cs index 9b895e88b10d..5a1959b1d772 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ApiBehaviorTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ApiBehaviorTest.cs @@ -4,28 +4,40 @@ using System; using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using BasicWebSite.Models; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.NewtonsoftJson; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class ApiBehaviorTestBase : IClassFixture> where TStartup : class +public abstract class ApiBehaviorTestBase : LoggedTest where TStartup : class { - protected ApiBehaviorTestBase(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public virtual async Task ActionsReturnBadRequest_WhenModelStateIsInvalid() @@ -374,11 +386,6 @@ public virtual async Task SerializingValidationProblemDetails_WithExtensionData( public class ApiBehaviorTest : ApiBehaviorTestBase { - public ApiBehaviorTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override Task ActionsReturnBadRequest_WhenModelStateIsInvalid() { @@ -412,21 +419,16 @@ public override Task SerializingValidationProblemDetails_WithExtensionData() public class ApiBehaviorTestNewtonsoftJson : ApiBehaviorTestBase { - public ApiBehaviorTestNewtonsoftJson(MvcTestFixture fixture) - : base(fixture) - { - var factory = fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - CustomInvalidModelStateClient = factory.CreateDefaultClient(); - } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient CustomInvalidModelStateClient { get; } - [Fact] public async Task ActionsReturnBadRequest_UsesProblemDescriptionProviderAndApiConventionsToConfigureErrorResponse() { + await using var factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(ConfigureWebHostBuilder); + var customInvalidModelStateClient = factory.CreateDefaultClient(); + // Arrange var contactModel = new Contact { @@ -442,7 +444,7 @@ public async Task ActionsReturnBadRequest_UsesProblemDescriptionProviderAndApiCo }; // Act - var response = await CustomInvalidModelStateClient.PostAsJsonAsync("/contact/PostWithVnd", contactModel); + var response = await customInvalidModelStateClient.PostAsJsonAsync("/contact/PostWithVnd", contactModel); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.BadRequest); diff --git a/src/Mvc/test/Mvc.FunctionalTests/ApiExplorerTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ApiExplorerTest.cs index 574311cd3952..0ed76f604947 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ApiExplorerTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ApiExplorerTest.cs @@ -8,17 +8,29 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.InternalTesting; using Newtonsoft.Json; +using Microsoft.Extensions.Logging; +using System.Reflection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ApiExplorerTest : IClassFixture> +public class ApiExplorerTest : LoggedTest { - public ApiExplorerTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ApiExplorer_IsVisible_EnabledWithConvention() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ApplicationModelTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ApplicationModelTest.cs index 43314fc6faf1..ce20aa109936 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ApplicationModelTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ApplicationModelTest.cs @@ -3,17 +3,29 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ApplicationModelTest : IClassFixture> +public class ApplicationModelTest : LoggedTest { - public ApplicationModelTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ControllerModel_CustomizedWithAttribute() diff --git a/src/Mvc/test/Mvc.FunctionalTests/AsyncActionsTests.cs b/src/Mvc/test/Mvc.FunctionalTests/AsyncActionsTests.cs index 5845927598fa..b7e3f265ba41 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AsyncActionsTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AsyncActionsTests.cs @@ -1,19 +1,31 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class AsyncActionsTests : IClassFixture> +public class AsyncActionsTests : LoggedTest { - public AsyncActionsTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task AsyncVoidAction_ReturnsOK() diff --git a/src/Mvc/test/Mvc.FunctionalTests/AsyncDisposalTest.cs b/src/Mvc/test/Mvc.FunctionalTests/AsyncDisposalTest.cs index 6277d64486dc..c3de7f0ab28e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AsyncDisposalTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AsyncDisposalTest.cs @@ -3,28 +3,39 @@ using System.Net; using System.Net.Http; +using System.Reflection; using BasicWebSite.Controllers; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.DependencyInjection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class AsyncDisposalTest : IClassFixture> +public class AsyncDisposalTest : LoggedTest { - public AsyncDisposalTest(MvcTestFixture fixture) + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); Client = Factory.CreateDefaultClient(); } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup() .ConfigureServices(s => s.AddSingleton()); - public WebApplicationFactory Factory { get; } + public WebApplicationFactory Factory { get; private set; } - public HttpClient Client { get; } + public HttpClient Client { get; private set; } [Fact] public async Task CanDisposeAsyncController() diff --git a/src/Mvc/test/Mvc.FunctionalTests/AsyncEnumerableTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/AsyncEnumerableTestBase.cs index 7ec9d831c5d5..dbb0534e11ba 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AsyncEnumerableTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AsyncEnumerableTestBase.cs @@ -3,20 +3,32 @@ using System.Net; using System.Net.Http; +using System.Reflection; using System.Text.Json; using System.Xml.Linq; using FormatterWebSite; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class AsyncEnumerableTestBase : IClassFixture> +public class AsyncEnumerableTestBase : LoggedTest { - public AsyncEnumerableTestBase(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public Task AsyncEnumerableReturnedWorks() => AsyncEnumerableWorks("getallprojects"); diff --git a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTest.cs index f21644ebc1e5..2aad065cd1df 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTest.cs @@ -5,8 +5,4 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class AuthMiddlewareAndFilterTest : AuthMiddlewareAndFilterTestBase { - public AuthMiddlewareAndFilterTest(MvcTestFixture fixture) - : base(fixture) - { - } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTestBase.cs index 8cc1cd699a77..c5bc988f48d0 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterTestBase.cs @@ -4,21 +4,33 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class AuthMiddlewareAndFilterTestBase : IClassFixture> where TStartup : class +public abstract class AuthMiddlewareAndFilterTestBase : LoggedTest where TStartup : class { - protected AuthMiddlewareAndFilterTestBase(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task AllowAnonymousOnActionsWork() diff --git a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterWithoutEndpointRoutingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterWithoutEndpointRoutingTest.cs index 845bbc30e797..171c0c563b29 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterWithoutEndpointRoutingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareAndFilterWithoutEndpointRoutingTest.cs @@ -5,8 +5,4 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class AuthMiddlewareAndFilterWithoutEndpointRoutingTest : AuthMiddlewareAndFilterTestBase { - public AuthMiddlewareAndFilterWithoutEndpointRoutingTest(MvcTestFixture fixture) - : base(fixture) - { - } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareUsingRequireAuthTest.cs b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareUsingRequireAuthTest.cs index f7b71ad5654e..a0cca07d73f9 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareUsingRequireAuthTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/AuthMiddlewareUsingRequireAuthTest.cs @@ -1,24 +1,36 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class AuthMiddlewareUsingRequireAuthTest : IClassFixture> +public class AuthMiddlewareUsingRequireAuthTest : LoggedTest { - public AuthMiddlewareUsingRequireAuthTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task RequireAuthConfiguredGlobally_AppliesToControllers() diff --git a/src/Mvc/test/Mvc.FunctionalTests/BasicTests.cs b/src/Mvc/test/Mvc.FunctionalTests/BasicTests.cs index 9f5af3bf3486..3e278208a28a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/BasicTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/BasicTests.cs @@ -9,10 +9,12 @@ using System.Reflection; using System.Text.Json; using BasicWebSite.Models; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class BasicTests : IClassFixture> +public class BasicTests : LoggedTest { // Some tests require comparing the actual response body against an expected response baseline // so they require a reference to the assembly on which the resources are located, in order to @@ -20,12 +22,21 @@ public class BasicTests : IClassFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CanRender_CSharp7Views() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs index 1d101e27eb13..96663a73cf1f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs @@ -1,24 +1,35 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Reflection; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ClientValidationOptionsTests : IClassFixture> +public class ClientValidationOptionsTests : LoggedTest { - public ClientValidationOptionsTests(MvcTestFixture fixture) => - Fixture = fixture; + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public MvcTestFixture Fixture { get; } + public MvcTestFixture Factory { get; private set; } [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55926")] [Fact] public async Task DisablingClientValidation_DisablesItForPagesAndViews() { // Arrange - var client = Fixture + var client = Factory .WithWebHostBuilder(whb => whb.UseStartup()) .CreateClient(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/CompilationOptionsTests.cs b/src/Mvc/test/Mvc.FunctionalTests/CompilationOptionsTests.cs index cd081fb52062..3584233b6bb2 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/CompilationOptionsTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/CompilationOptionsTests.cs @@ -2,19 +2,31 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; // Test to verify compilation options from the application are used to compile // precompiled and dynamically compiled views. -public class CompilationOptionsTests : IClassFixture> +public class CompilationOptionsTests : LoggedTest { - public CompilationOptionsTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CompilationOptions_AreUsedByViewsAndPartials() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs index 181f67db3af7..21acf9a563a7 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs @@ -3,23 +3,32 @@ using System.Net; using System.Net.Http; +using System.Reflection; using AngleSharp.Parser.Html; using BasicWebSite; using BasicWebSite.Services; using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.DependencyInjection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ComponentRenderingFunctionalTests : IClassFixture> +public class ComponentRenderingFunctionalTests : LoggedTest { - public ComponentRenderingFunctionalTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture; + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); } - public MvcTestFixture Factory { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } [Fact] public async Task Renders_BasicComponent() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeEndpointRoutingTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeEndpointRoutingTests.cs index ee1e7fc3f810..6201834b99d3 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeEndpointRoutingTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeEndpointRoutingTests.cs @@ -8,11 +8,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class ConsumesAttributeEndpointRoutingTests : ConsumesAttributeTestsBase { - public ConsumesAttributeEndpointRoutingTests(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTests.cs index f6664623e29c..59f895feb1a0 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTests.cs @@ -8,11 +8,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class ConsumesAttributeTests : ConsumesAttributeTestsBase { - public ConsumesAttributeTests(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs b/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs index 79e8c37c0451..9e7bed9259b3 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs @@ -3,26 +3,39 @@ using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using BasicWebSite.Models; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class ConsumesAttributeTestsBase : IClassFixture> where TStartup : class +public abstract class ConsumesAttributeTestsBase : LoggedTest where TStartup : class { - protected ConsumesAttributeTestsBase(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public abstract Task HasEndpointMatch(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/ContentNegotiationTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ContentNegotiationTest.cs index 0b4e5e8722c3..b2caac2b812d 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ContentNegotiationTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ContentNegotiationTest.cs @@ -10,17 +10,29 @@ using Microsoft.AspNetCore.Mvc.Formatters.Xml; using Microsoft.AspNetCore.InternalTesting; using Newtonsoft.Json; +using Microsoft.Extensions.Logging; +using System.Reflection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ContentNegotiationTest : IClassFixture> +public class ContentNegotiationTest : LoggedTest { - public ContentNegotiationTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ProducesAttribute_SingleContentType_PicksTheFirstSupportedFormatter() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs index 64a6d255274c..5fb2f304f6a2 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs @@ -4,25 +4,34 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using System.Text.Json; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using RoutingWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ControllerEndpointFiltersTest : IClassFixture> +public class ControllerEndpointFiltersTest : LoggedTest { - public ControllerEndpointFiltersTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public WebApplicationFactory Factory { get; } + public WebApplicationFactory Factory { get; private set; } [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55929")] [Fact] diff --git a/src/Mvc/test/Mvc.FunctionalTests/ControllerFromServicesTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ControllerFromServicesTests.cs index 0c41e6d05309..47f7715b0d50 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ControllerFromServicesTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ControllerFromServicesTests.cs @@ -3,17 +3,29 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ControllerFromServicesTest : IClassFixture> +public class ControllerFromServicesTest : LoggedTest { - public ControllerFromServicesTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ControllersWithConstructorInjectionAreCreatedAndActivated() diff --git a/src/Mvc/test/Mvc.FunctionalTests/CorsEndpointRoutingTests.cs b/src/Mvc/test/Mvc.FunctionalTests/CorsEndpointRoutingTests.cs index acf56c146068..93f64494a796 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/CorsEndpointRoutingTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/CorsEndpointRoutingTests.cs @@ -5,8 +5,4 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class CorsEndpointRoutingTests : CorsTestsBase { - public CorsEndpointRoutingTests(MvcTestFixture fixture) - : base(fixture) - { - } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/CorsTests.cs b/src/Mvc/test/Mvc.FunctionalTests/CorsTests.cs index 86ed5169b54c..127edfa589e3 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/CorsTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/CorsTests.cs @@ -9,11 +9,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class CorsTests : CorsTestsBase { - public CorsTests(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task PreflightRequestOnNonCorsEnabledController_DoesNotMatchTheAction() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/CorsTestsBase.cs b/src/Mvc/test/Mvc.FunctionalTests/CorsTestsBase.cs index 99fda0edb64d..fb603ebafaa1 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/CorsTestsBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/CorsTestsBase.cs @@ -3,23 +3,35 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class CorsTestsBase : IClassFixture> where TStartup : class +public abstract class CorsTestsBase : LoggedTest where TStartup : class { - protected CorsTestsBase(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("GET")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/CustomValueProviderTest.cs b/src/Mvc/test/Mvc.FunctionalTests/CustomValueProviderTest.cs index c4fd51c23a6b..9c32a3e8f416 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/CustomValueProviderTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/CustomValueProviderTest.cs @@ -3,25 +3,37 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class CustomValueProviderTest : IClassFixture> +public class CustomValueProviderTest : LoggedTest { private IServiceCollection _serviceCollection; - public CustomValueProviderTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(b => b.UseStartup()) + .WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)); + Client = Factory.CreateDefaultClient(); + } - Client = factory.CreateDefaultClient(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CustomValueProvider_DisplayName() diff --git a/src/Mvc/test/Mvc.FunctionalTests/DataAnnotationTests.cs b/src/Mvc/test/Mvc.FunctionalTests/DataAnnotationTests.cs index 7f62af79673e..12f716d88e2b 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/DataAnnotationTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/DataAnnotationTests.cs @@ -1,26 +1,39 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using RazorWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class DataAnnotationTests : IClassFixture> +public class DataAnnotationTests : LoggedTest { - private HttpClient Client { get; set; } + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(builder => + { + builder.UseStartup(); + }); + Client = Factory.CreateDefaultClient(); + } - public DataAnnotationTests(MvcTestFixture fixture) + public override void Dispose() { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(builder => - { - builder.UseStartup(); - }); - Client = factory.CreateDefaultClient(); + Factory.Dispose(); + base.Dispose(); } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } + private const string EnumUrl = "http://localhost/Enum/Enum"; [Fact] diff --git a/src/Mvc/test/Mvc.FunctionalTests/DefaultValuesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/DefaultValuesTest.cs index b528c6a4c151..d6d33d15628a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/DefaultValuesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/DefaultValuesTest.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class DefaultValuesTest : IClassFixture> +public class DefaultValuesTest : LoggedTest { - public DefaultValuesTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Controller_WithDefaultValueAttribute_ReturnsDefault() diff --git a/src/Mvc/test/Mvc.FunctionalTests/DirectivesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/DirectivesTest.cs index e8e34ffddd41..3aa287a6976e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/DirectivesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/DirectivesTest.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class DirectivesTest : IClassFixture> +public class DirectivesTest : LoggedTest { - public DirectivesTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ViewsInheritsUsingsAndInjectDirectivesFromViewStarts() diff --git a/src/Mvc/test/Mvc.FunctionalTests/DoNotRespectBrowserAcceptHeaderTests.cs b/src/Mvc/test/Mvc.FunctionalTests/DoNotRespectBrowserAcceptHeaderTests.cs index 8c09f1609117..07c47d51f76e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/DoNotRespectBrowserAcceptHeaderTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/DoNotRespectBrowserAcceptHeaderTests.cs @@ -6,20 +6,34 @@ using System.Text; using Microsoft.AspNetCore.Mvc.Formatters.Xml; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; +using RazorWebSite; +using System.Reflection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; /// /// These tests are for scenarios when is False, which is the default. /// -public class DoNotRespectBrowserAcceptHeaderTests : IClassFixture> +public class DoNotRespectBrowserAcceptHeaderTests : LoggedTest { - public DoNotRespectBrowserAcceptHeaderTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("application/xml,*/*;q=0.2")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs index 0cad3e140d24..fd6c9f793e0a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs @@ -12,46 +12,44 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Xunit.Abstractions; +using System.Reflection; +using Microsoft.AspNetCore.Mvc.Testing; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; /// /// Functional test to verify the error reporting of Razor compilation by diagnostic middleware. /// -public class ErrorPageTests : IClassFixture> +public class ErrorPageTests : LoggedTest { private static readonly string PreserveCompilationContextMessage = HtmlEncoder.Default.Encode( "One or more compilation references may be missing. " + "If you're seeing this in a published application, set 'CopyRefAssembliesToPublishDirectory' to true in your project file to ensure files in the refs directory are published."); - private readonly AssemblyTestLog _assemblyTestLog; - private readonly MvcTestFixture _fixture; - - public ErrorPageTests( - MvcTestFixture fixture, - ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - _assemblyTestLog = AssemblyTestLog.ForAssembly(GetType().Assembly); - - var loggerProvider = _assemblyTestLog.CreateLoggerFactory(testOutputHelper, GetType().Name); - - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - Client = factory - .WithWebHostBuilder(builder => builder.ConfigureLogging(l => l.Services.AddSingleton(loggerProvider))) - .CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(b => b.UseStartup()); + Client = Factory.CreateDefaultClient(); // These tests want to verify runtime compilation and formatting in the HTML of the error page Client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html")); + } - _fixture = fixture; + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CompilationFailuresAreListedByErrorPageMiddleware() { // Arrange - var factory = _fixture.Factories.FirstOrDefault() ?? _fixture.WithWebHostBuilder(b => b.UseStartup()); + var factory = Factory.WithWebHostBuilder(b => b.UseStartup()); factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => serviceCollection.Configure(ConfigureRuntimeCompilationOptions))); var client = factory.CreateDefaultClient(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/FileResultTests.cs b/src/Mvc/test/Mvc.FunctionalTests/FileResultTests.cs index fc2901040e27..b23887892ae5 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/FileResultTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/FileResultTests.cs @@ -4,18 +4,31 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class FileResultTests : IClassFixture> +public class FileResultTests : LoggedTest { - public FileResultTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [ConditionalFact] // https://github.com/aspnet/Mvc/issues/2727 diff --git a/src/Mvc/test/Mvc.FunctionalTests/FiltersTest.cs b/src/Mvc/test/Mvc.FunctionalTests/FiltersTest.cs index ce5ee283df23..82ad4689d50f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/FiltersTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/FiltersTest.cs @@ -3,19 +3,31 @@ using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class FiltersTest : IClassFixture> +public class FiltersTest : LoggedTest { - public FiltersTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); Client.DefaultRequestHeaders.Add("Authorization", "Bearer key"); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CanAuthorize_UsersByRole() diff --git a/src/Mvc/test/Mvc.FunctionalTests/FlushPointTest.cs b/src/Mvc/test/Mvc.FunctionalTests/FlushPointTest.cs index dce076bf744c..aec2a4ebed23 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/FlushPointTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/FlushPointTest.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class FlushPointTest : IClassFixture> +public class FlushPointTest : LoggedTest { - public FlushPointTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task FlushPointsAreExecutedForPagesWithLayouts() diff --git a/src/Mvc/test/Mvc.FunctionalTests/FormFileUploadTest.cs b/src/Mvc/test/Mvc.FunctionalTests/FormFileUploadTest.cs index a9824f4e5a8d..b6e9a70cb1bf 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/FormFileUploadTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/FormFileUploadTest.cs @@ -3,17 +3,29 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class FormFileUploadTest : IClassFixture> +public class FormFileUploadTest : LoggedTest { - public FormFileUploadTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CanUploadFileInFrom() diff --git a/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterEndpointRoutingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterEndpointRoutingTest.cs index 733e4958c39c..a4f9f1036096 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterEndpointRoutingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterEndpointRoutingTest.cs @@ -6,16 +6,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class GlobalAuthorizationFilterEndpointRoutingTest : GlobalAuthorizationFilterTestBase, IClassFixture> +public class GlobalAuthorizationFilterEndpointRoutingTest : GlobalAuthorizationFilterTestBase { - public GlobalAuthorizationFilterEndpointRoutingTest(MvcTestFixture fixture) - { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = Factory.CreateDefaultClient(); - } - - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + public override void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - - public WebApplicationFactory Factory { get; } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterTestBase.cs index 3fe710ef10f1..4bc5a93fc712 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterTestBase.cs @@ -3,12 +3,33 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class GlobalAuthorizationFilterTestBase : IClassFixture> +public abstract class GlobalAuthorizationFilterTestBase : LoggedTest where TStartup : class { - public HttpClient Client { get; protected set; } + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } + + public virtual void ConfigureWebHostBuilder(IWebHostBuilder builder) { } [Fact] public virtual async Task DeniesAnonymousUsers_ByDefault() diff --git a/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterUseMvcTest.cs b/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterUseMvcTest.cs index e0aa75d67bd7..a7800689d56e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterUseMvcTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/GlobalAuthorizationFilterUseMvcTest.cs @@ -6,16 +6,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class GlobalAuthorizationFilterUseMvcTest : GlobalAuthorizationFilterTestBase, IClassFixture> +public class GlobalAuthorizationFilterUseMvcTest : GlobalAuthorizationFilterTestBase { - public GlobalAuthorizationFilterUseMvcTest(MvcTestFixture fixture) - { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = Factory.CreateDefaultClient(); - } - - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + public override void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - - public WebApplicationFactory Factory { get; } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationTest.cs b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationTest.cs index a071f5309919..6e78f6e0a518 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationTest.cs @@ -10,34 +10,39 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class HtmlGenerationTest : - IClassFixture>, - IClassFixture> +public class HtmlGenerationTest : LoggedTest { private static readonly Assembly _resourcesAssembly = typeof(HtmlGenerationTest).GetTypeInfo().Assembly; - public HtmlGenerationTest( - MvcTestFixture fixture, - MvcEncodedTestFixture encodedFixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + EncodedFactory = new MvcEncodedTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + EncodedClient = EncodedFactory.CreateDefaultClient(); + } - Client = fixture.CreateDefaultClient(); - EncodedClient = encodedFixture.CreateDefaultClient(); + public override void Dispose() + { + Factory.Dispose(); + EncodedFactory.Dispose(); + base.Dispose(); } + public WebApplicationFactory Factory { get; private set; } + public WebApplicationFactory EncodedFactory { get; private set; } + public HttpClient Client { get; private set; } + public HttpClient EncodedClient { get; private set; } + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); - public HttpClient Client { get; } - - public HttpClient EncodedClient { get; } - - public WebApplicationFactory Factory { get; } - public static TheoryData WebPagesData { get diff --git a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs index 513a56947d51..c99b02591af1 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs @@ -14,22 +14,29 @@ using Microsoft.Extensions.DependencyInjection; using Xunit.Abstractions; using Xunit.Sdk; +using Microsoft.AspNetCore.Builder; +using System.Reflection; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class HtmlGenerationWithCultureTest : LoggedTest, IClassFixture> +public class HtmlGenerationWithCultureTest : LoggedTest { - public HtmlGenerationWithCultureTest( - ITestOutputHelper testOutputHelper, - MvcTestFixture fixture) : base(testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.WithWebHostBuilder(builder => builder.UseStartup()); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(builder => builder.UseStartup()); Client = Factory.CreateDefaultClient(); } - public WebApplicationFactory Factory { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/4907")] [Fact] diff --git a/src/Mvc/test/Mvc.FunctionalTests/HtmlHelperOptionsTest.cs b/src/Mvc/test/Mvc.FunctionalTests/HtmlHelperOptionsTest.cs index c7fa70a4a1a0..6bd04c8f9eb6 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HtmlHelperOptionsTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HtmlHelperOptionsTest.cs @@ -2,18 +2,32 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using Microsoft.AspNetCore.Builder; +using System.Reflection; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class HtmlHelperOptionsTest : IClassFixture> +public class HtmlHelperOptionsTest : LoggedTest { - public HtmlHelperOptionsTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task AppWideDefaultsInViewAndPartialView() diff --git a/src/Mvc/test/Mvc.FunctionalTests/HttpActionResultTests.cs b/src/Mvc/test/Mvc.FunctionalTests/HttpActionResultTests.cs index 4314dd4060d5..a0b5563aa332 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HttpActionResultTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HttpActionResultTests.cs @@ -4,18 +4,30 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using BasicWebSite.Models; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class HttpActionResultTests : IClassFixture> +public class HttpActionResultTests : LoggedTest { - public HttpActionResultTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ActionCanReturnIResultWithContent() diff --git a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcEncodedTestFixtureOfT.cs b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcEncodedTestFixtureOfT.cs index 3247b47ae832..5f9a0054bf4e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcEncodedTestFixtureOfT.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcEncodedTestFixtureOfT.cs @@ -4,13 +4,17 @@ using System.Text.Encodings.Web; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.WebEncoders.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class MvcEncodedTestFixture : MvcTestFixture where TStartup : class { + public MvcEncodedTestFixture(ILoggerFactory outputHelper) : base(outputHelper) { } + protected override void ConfigureWebHost(IWebHostBuilder builder) { base.ConfigureWebHost(builder); diff --git a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcTestFixture.cs b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcTestFixture.cs index 5ded03158a7c..45c33dad7268 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcTestFixture.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/MvcTestFixture.cs @@ -15,16 +15,28 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class MvcTestFixture : WebApplicationFactory where TStartup : class { + private ILoggerFactory _loggerFactory; + + public MvcTestFixture(ILoggerFactory loggerFactory) + { + _loggerFactory = loggerFactory; + } + protected override void ConfigureWebHost(IWebHostBuilder builder) { + ILoggerFactory loggerFactory = _loggerFactory; + var testSink = new TestSink(); + if (_loggerFactory is null) + { + loggerFactory = new TestLoggerFactory(testSink, enabled: true); + } + builder .UseRequestCulture("en-GB", "en-US") .UseEnvironment("Production") .ConfigureServices( services => { - var testSink = new TestSink(); - var loggerFactory = new TestLoggerFactory(testSink, enabled: true); services.AddSingleton(loggerFactory); services.AddSingleton(testSink); }); diff --git a/src/Mvc/test/Mvc.FunctionalTests/InputFormatterTests.cs b/src/Mvc/test/Mvc.FunctionalTests/InputFormatterTests.cs index bc40e1afa013..f6ec536880f1 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/InputFormatterTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/InputFormatterTests.cs @@ -5,22 +5,34 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using System.Text; using FormatterWebSite.Controllers; using FormatterWebSite.Models; +using Microsoft.AspNetCore.InternalTesting; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class InputFormatterTests : IClassFixture> +public class InputFormatterTests : LoggedTest { - public InputFormatterTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CheckIfXmlInputFormatterIsBeingCalled() diff --git a/src/Mvc/test/Mvc.FunctionalTests/InputObjectValidationTests.cs b/src/Mvc/test/Mvc.FunctionalTests/InputObjectValidationTests.cs index 13cda556bd14..aceacceb3060 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/InputObjectValidationTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/InputObjectValidationTests.cs @@ -3,22 +3,36 @@ using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using FormatterWebSite; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class InputObjectValidationTests : IClassFixture> +public class InputObjectValidationTests : LoggedTest { - public InputObjectValidationTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } // Parameters: Request Content, Expected status code, Expected model state error message public static IEnumerable SimpleTypePropertiesModelRequestData diff --git a/src/Mvc/test/Mvc.FunctionalTests/InputParentValidationTests.cs b/src/Mvc/test/Mvc.FunctionalTests/InputParentValidationTests.cs index d11f9856ad3e..b44e280cf152 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/InputParentValidationTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/InputParentValidationTests.cs @@ -2,11 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; using System.Text; using FormatterWebSite.Models; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; @@ -15,20 +19,26 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; /// public class InputParentValidationTests { - public abstract class BaseTests : IClassFixture> + public abstract class BaseTests : LoggedTest where TStartup : class { - protected BaseTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(builder => - builder.UseStartup()); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(builder => builder.UseStartup()); + Client = Factory.CreateDefaultClient(); + } - Client = factory.CreateDefaultClient(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - protected abstract bool ShouldParentBeValidatedWhenChildIsInvalid { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } - private HttpClient Client { get; } + protected abstract bool ShouldParentBeValidatedWhenChildIsInvalid { get; } [Fact] public async Task ParentObjectValidation_RespectsMvcOptions_WhenChildIsInvalid() @@ -102,11 +112,6 @@ private IDictionary GetExpectedErrors(bool parentInvalid, bool /// public class ParentValidationScenarios : BaseTests { - public ParentValidationScenarios(MvcTestFixture fixture) - : base(fixture) - { - } - protected override bool ShouldParentBeValidatedWhenChildIsInvalid => true; } @@ -116,11 +121,6 @@ public ParentValidationScenarios(MvcTestFixture public class ParentNonValidationScenarios : BaseTests { - public ParentNonValidationScenarios(MvcTestFixture fixture) - : base(fixture) - { - } - protected override bool ShouldParentBeValidatedWhenChildIsInvalid => false; } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/InputValidationTests.cs b/src/Mvc/test/Mvc.FunctionalTests/InputValidationTests.cs index 380bc7ef4e74..a46ae079f788 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/InputValidationTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/InputValidationTests.cs @@ -1,21 +1,33 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class InputValidationTests : IClassFixture> +public class InputValidationTests : LoggedTest { - public InputValidationTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ValidRequest_IsAccepted() diff --git a/src/Mvc/test/Mvc.FunctionalTests/JsonInputFormatterTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/JsonInputFormatterTestBase.cs index e4ae77d43048..47292a453ef2 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/JsonInputFormatterTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/JsonInputFormatterTestBase.cs @@ -5,24 +5,36 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using System.Text; using FormatterWebSite.Controllers; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class JsonInputFormatterTestBase : IClassFixture> where TStartup : class +public abstract class JsonInputFormatterTestBase : LoggedTest where TStartup : class { - protected JsonInputFormatterTestBase(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("application/json")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/JsonOutputFormatterTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/JsonOutputFormatterTestBase.cs index 2cb2a5b490d4..218bf5633d0a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/JsonOutputFormatterTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/JsonOutputFormatterTestBase.cs @@ -1,31 +1,41 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using System.Text; using FormatterWebSite.Controllers; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class JsonOutputFormatterTestBase : IClassFixture> where TStartup : class +public abstract class JsonOutputFormatterTestBase : LoggedTest where TStartup : class { - protected JsonOutputFormatterTestBase(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public WebApplicationFactory Factory { get; } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public virtual async Task SerializableErrorIsReturnedInExpectedFormat() diff --git a/src/Mvc/test/Mvc.FunctionalTests/JsonPatchInputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/JsonPatchInputFormatterTest.cs index 572ad2902444..aed9ef7b838b 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/JsonPatchInputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/JsonPatchInputFormatterTest.cs @@ -1,22 +1,34 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using FormatterWebSite; +using Microsoft.AspNetCore.InternalTesting; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class JsonPatchSampleTest : IClassFixture> +public class JsonPatchSampleTest : LoggedTest { - public JsonPatchSampleTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task AddOperation_Works() diff --git a/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithNewtonsoftJsonTest.cs b/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithNewtonsoftJsonTest.cs index 92fce9476146..a927c93d5f35 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithNewtonsoftJsonTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithNewtonsoftJsonTest.cs @@ -3,25 +3,37 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class JsonResultWithNewtonsoftJsonTest : IClassFixture> +public class JsonResultWithNewtonsoftJsonTest : LoggedTest { private IServiceCollection _serviceCollection; - public JsonResultWithNewtonsoftJsonTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)) + .WithWebHostBuilder(b => b.UseStartup()); + Client = Factory.CreateDefaultClient(); + } - Client = factory.CreateDefaultClient(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task JsonResult_UsesDefaultContentType() diff --git a/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithSystemTextJsonTest.cs b/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithSystemTextJsonTest.cs index 99fd8a61812a..4ea1bf228f61 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithSystemTextJsonTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/JsonResultWithSystemTextJsonTest.cs @@ -3,25 +3,37 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class JsonResultWithSystemTextJsonTest : IClassFixture> +public class JsonResultWithSystemTextJsonTest : LoggedTest { private IServiceCollection _serviceCollection; - public JsonResultWithSystemTextJsonTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)) + .WithWebHostBuilder(b => b.UseStartup()); + Client = Factory.CreateDefaultClient(); + } - Client = factory.CreateDefaultClient(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task JsonResult_UsesDefaultContentType() diff --git a/src/Mvc/test/Mvc.FunctionalTests/KeyedServicesTests.cs b/src/Mvc/test/Mvc.FunctionalTests/KeyedServicesTests.cs index 87f304163e7d..3cad946ba07d 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/KeyedServicesTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/KeyedServicesTests.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class KeyedServicesTests : IClassFixture> +public class KeyedServicesTests : LoggedTest { - public KeyedServicesTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ExplicitSingleFromKeyedServiceAttribute() diff --git a/src/Mvc/test/Mvc.FunctionalTests/LinkGenerationTests.cs b/src/Mvc/test/Mvc.FunctionalTests/LinkGenerationTests.cs index 5f1e96840156..52a6c68e1e91 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/LinkGenerationTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/LinkGenerationTests.cs @@ -5,11 +5,15 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Reflection; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class LinkGenerationTests : IClassFixture> +public class LinkGenerationTests : LoggedTest { // Some tests require comparing the actual response body against an expected response baseline // so they require a reference to the assembly on which the resources are located, in order to @@ -17,12 +21,21 @@ public class LinkGenerationTests : IClassFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } public static TheoryData RelativeLinksData { diff --git a/src/Mvc/test/Mvc.FunctionalTests/LinkGeneratorTest.cs b/src/Mvc/test/Mvc.FunctionalTests/LinkGeneratorTest.cs index a8b76a311a8d..cd5d7381c4ac 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/LinkGeneratorTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/LinkGeneratorTest.cs @@ -1,25 +1,38 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; // Functional tests for MVC's scenarios with LinkGenerator (2.2+ only) -public class LinkGeneratorTest : IClassFixture> +public class LinkGeneratorTest : LoggedTest { - public LinkGeneratorTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder) + .WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task GetPathByAction_CanGeneratePathToSelf() diff --git a/src/Mvc/test/Mvc.FunctionalTests/LinkParserTest.cs b/src/Mvc/test/Mvc.FunctionalTests/LinkParserTest.cs index aca7e51a6d89..73a9efa8dd04 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/LinkParserTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/LinkParserTest.cs @@ -1,26 +1,38 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Newtonsoft.Json.Linq; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; // Functional tests for MVC's scenarios with LinkParser -public class LinkParserTest : IClassFixture> +public class LinkParserTest : LoggedTest { - public LinkParserTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ParsePathByEndpoint_CanParsedWithDefaultRoute() diff --git a/src/Mvc/test/Mvc.FunctionalTests/MvcSandboxTest.cs b/src/Mvc/test/Mvc.FunctionalTests/MvcSandboxTest.cs index d91faf0a618c..c118a944020f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/MvcSandboxTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/MvcSandboxTest.cs @@ -3,17 +3,29 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class MvcSandboxTest : IClassFixture> +public class MvcSandboxTest : LoggedTest { - public MvcSandboxTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Home_Pages_ReturnSuccess() diff --git a/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonInputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonInputFormatterTest.cs index 9e8ed6e254d7..88b0b7548f6c 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonInputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonInputFormatterTest.cs @@ -9,11 +9,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class NewtonsoftJsonInputFormatterTest : JsonInputFormatterTestBase { - public NewtonsoftJsonInputFormatterTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] // This test covers the 2.0 behavior. JSON.Net error messages are not preserved. public virtual async Task JsonInputFormatter_SuppliedJsonDeserializationErrorMessage() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonOutputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonOutputFormatterTest.cs index f8931ee5b957..a32599fc3759 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonOutputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/NewtonsoftJsonOutputFormatterTest.cs @@ -10,11 +10,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class NewtonsoftJsonOutputFormatterTest : JsonOutputFormatterTestBase { - public NewtonsoftJsonOutputFormatterTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public async Task JsonOutputFormatter_ReturnsIndentedJson() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/NonNullableReferenceTypesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/NonNullableReferenceTypesTest.cs index f17a6b163acc..cec22f3d78f2 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/NonNullableReferenceTypesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/NonNullableReferenceTypesTest.cs @@ -3,18 +3,30 @@ using System.Net; using System.Net.Http; +using System.Reflection; using AngleSharp.Parser.Html; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class NonNullableReferenceTypesTest : IClassFixture> +public class NonNullableReferenceTypesTest : LoggedTest { - public NonNullableReferenceTypesTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - private HttpClient Client { get; set; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CanUseNonNullableReferenceType_WithController_OmitData_ValidationErrors() diff --git a/src/Mvc/test/Mvc.FunctionalTests/OutputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/OutputFormatterTest.cs index 29a5667d5ab7..2741e929f74d 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/OutputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/OutputFormatterTest.cs @@ -4,17 +4,29 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class OutputFormatterTest : IClassFixture> +public class OutputFormatterTest : LoggedTest { - public OutputFormatterTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("ReturnTaskOfString")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/PageAsyncDisposalTest.cs b/src/Mvc/test/Mvc.FunctionalTests/PageAsyncDisposalTest.cs index a2a5f880044e..1813be613c39 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/PageAsyncDisposalTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/PageAsyncDisposalTest.cs @@ -3,28 +3,37 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.DependencyInjection; using RazorPagesWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class PageAsyncDisposalTest : IClassFixture> +public class PageAsyncDisposalTest : LoggedTest { - public PageAsyncDisposalTest(MvcTestFixture fixture) - { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = Factory.CreateDefaultClient(); - } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup() .ConfigureServices(s => s.AddSingleton()); - public WebApplicationFactory Factory { get; } + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CanDisposeAsyncPage() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs index ce32e882979f..e3a7bfdb7fe5 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorBuildTest.cs @@ -3,21 +3,30 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorBuildTest : IClassFixture> +// These tests test razor caching which is affected if the site is built by another test class +// Use a named Collection to avoid the test classes running in parallel +[Collection("RazorBuildWebSite")] +public class RazorBuildTest : LoggedTest { - public RazorBuildTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => serviceCollection.Configure(ConfigureRuntimeCompilationOptions))); - - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(b => b.UseStartup()) + .WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => serviceCollection.Configure(ConfigureRuntimeCompilationOptions))); static void ConfigureRuntimeCompilationOptions(MvcRazorRuntimeCompilationOptions options) { @@ -28,9 +37,17 @@ static void ConfigureRuntimeCompilationOptions(MvcRazorRuntimeCompilationOptions options.AdditionalReferencePaths.Add(path); } } + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Rzc_LocalPageWithDifferentContent_IsUsed() @@ -83,6 +100,8 @@ public async Task RzcViewsArePreferredToRuntimeViews() } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/56553")] + [LogLevel(LogLevel.Trace)] public async Task RazorViews_AreUpdatedOnChange() { // Arrange @@ -120,6 +139,8 @@ public async Task RazorViews_AreUpdatedOnChange() } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/56553")] + [LogLevel(LogLevel.Trace)] public async Task RazorPages_AreUpdatedOnChange() { // Arrange diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPageModelTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPageModelTest.cs index 73af9d332d7d..48e03282e365 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPageModelTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPageModelTest.cs @@ -1,24 +1,36 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorPageModelTest : IClassFixture> +public class RazorPageModelTest : LoggedTest { - public RazorPageModelTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Page_TryUpdateModelAsync_Success() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesNamespaceTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesNamespaceTest.cs index 2e7e87267dac..2032b050256e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesNamespaceTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesNamespaceTest.cs @@ -1,23 +1,35 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorPagesNamespaceTest : IClassFixture> +public class RazorPagesNamespaceTest : LoggedTest { - public RazorPagesNamespaceTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Page_DefaultNamespace_IfUnset() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs index 9d222476a383..8fbcec28f8c4 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs @@ -10,23 +10,34 @@ using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.InternalTesting; using Newtonsoft.Json.Linq; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorPagesTest : IClassFixture> +public class RazorPagesTest : LoggedTest { private static readonly Assembly _resourcesAssembly = typeof(RazorPagesTest).GetTypeInfo().Assembly; - public RazorPagesTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Page_SimpleForms_RenderAntiforgery() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesViewSearchTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesViewSearchTest.cs index d1a3c3d383bd..20218ab1712f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesViewSearchTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesViewSearchTest.cs @@ -1,23 +1,35 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorPagesViewSearchTest : IClassFixture> +public class RazorPagesViewSearchTest : LoggedTest { - public RazorPagesViewSearchTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Page_CanFindPartial_InCurrentDirectory() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs index 6248530b9baa..aa2228c5d22a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs @@ -1,20 +1,32 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Globalization; using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorPagesWithBasePathTest : IClassFixture> +public class RazorPagesWithBasePathTest : LoggedTest { - public RazorPagesWithBasePathTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task PageOutsideBasePath_IsNotRouteable() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithEndpointRoutingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithEndpointRoutingTest.cs index cff46de7852c..dd491175cad2 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithEndpointRoutingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesWithEndpointRoutingTest.cs @@ -1,19 +1,31 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorPagesWithEndpointRoutingTest : IClassFixture> +public class RazorPagesWithEndpointRoutingTest : LoggedTest { - public RazorPagesWithEndpointRoutingTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Authorize_AppliedUsingConvention_Works() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs index 3961eea10b53..8d2fa13ea0e1 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs @@ -2,21 +2,28 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorRuntimeCompilationHostingStartupTest : IClassFixture> +// These tests test razor caching which is affected if the site is built by another test class +// Use a named Collection to avoid the test classes running in parallel +[Collection("RazorBuildWebSite")] +public class RazorRuntimeCompilationHostingStartupTest : LoggedTest { - public RazorRuntimeCompilationHostingStartupTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => serviceCollection.Configure(ConfigureRuntimeCompilationOptions))); - - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory) + .WithWebHostBuilder(b => b.UseStartup()) + .WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => serviceCollection.Configure(ConfigureRuntimeCompilationOptions))); static void ConfigureRuntimeCompilationOptions(MvcRazorRuntimeCompilationOptions options) { @@ -27,9 +34,17 @@ static void ConfigureRuntimeCompilationOptions(MvcRazorRuntimeCompilationOptions options.AdditionalReferencePaths.Add(path); } } + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task RazorViews_CanBeServedAndUpdatedViaRuntimeCompilation() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorViewLocationSpecificationTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorViewLocationSpecificationTest.cs index 451e05e3a7a0..14fcbc034bf1 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorViewLocationSpecificationTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorViewLocationSpecificationTest.cs @@ -3,19 +3,31 @@ using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RazorViewLocationSpecificationTest : IClassFixture> +public class RazorViewLocationSpecificationTest : LoggedTest { private const string BaseUrl = "http://localhost/ViewNameSpecification_Home/"; - public RazorViewLocationSpecificationTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("LayoutSpecifiedWithPartialPathInViewStart")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/ReadFromDisconnectedClientTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ReadFromDisconnectedClientTest.cs index 36e5924de823..1c7dfc9163e8 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ReadFromDisconnectedClientTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ReadFromDisconnectedClientTest.cs @@ -4,24 +4,36 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; // These tests verify the behavior of MVC when responding to a client that simulates a disconnect. // See https://github.com/dotnet/aspnetcore/issues/13333 -public class ReadFromDisconnectedClientTest : IClassFixture> +public class ReadFromDisconnectedClientTest : LoggedTest { - public ReadFromDisconnectedClientTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ActionWithAntiforgery_Returns400_WhenReadingBodyThrows() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RemoteAttributeValidationTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RemoteAttributeValidationTest.cs index a80c4fdc7580..dcc59732bfdf 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RemoteAttributeValidationTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RemoteAttributeValidationTest.cs @@ -4,20 +4,31 @@ using System.Net; using System.Net.Http; using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RemoteAttributeValidationTest : IClassFixture> +public class RemoteAttributeValidationTest : LoggedTest { private static readonly Assembly _resourcesAssembly = typeof(RemoteAttributeValidationTest).GetTypeInfo().Assembly; - public RemoteAttributeValidationTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("Area1", "/Area1")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/RequestFormLimitsTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RequestFormLimitsTest.cs index 68896a3159ad..35bb229dd0e3 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RequestFormLimitsTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RequestFormLimitsTest.cs @@ -3,22 +3,34 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RequestFormLimitsTest : IClassFixture> +public class RequestFormLimitsTest : LoggedTest { - public RequestFormLimitsTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task RequestFormLimitCheckHappens_WithAntiforgeryValidation() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RequestServicesEndpointRoutingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RequestServicesEndpointRoutingTest.cs index 7fd616c7f76f..b864db653fb7 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RequestServicesEndpointRoutingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RequestServicesEndpointRoutingTest.cs @@ -8,11 +8,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class RequestServicesEndpointRoutingTest : RequestServicesTestBase { - public RequestServicesEndpointRoutingTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTest.cs index 95bb5b847ca4..e6c7d94b9401 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTest.cs @@ -8,11 +8,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class RequestServicesTest : RequestServicesTestBase { - public RequestServicesTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTestBase.cs index 51dd3eee89e9..495d02e38870 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RequestServicesTestBase.cs @@ -3,25 +3,37 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Net.Http.Headers; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; // Each of these tests makes two requests, because we want each test to verify that the data is // PER-REQUEST and does not linger around to impact the next request. -public abstract class RequestServicesTestBase : IClassFixture> where TStartup : class +public abstract class RequestServicesTestBase : LoggedTest where TStartup : class { - protected RequestServicesTestBase(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public abstract Task HasEndpointMatch(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/RequestSizeLimitTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RequestSizeLimitTest.cs index 103273dad870..b39026f86675 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RequestSizeLimitTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RequestSizeLimitTest.cs @@ -1,25 +1,37 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RequestSizeLimitTest : IClassFixture> +public class RequestSizeLimitTest : LoggedTest { - public RequestSizeLimitTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task RequestSizeLimitCheckHappens_BeforeAntiforgeryTokenValidation() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RespectBrowserAcceptHeaderTests.cs b/src/Mvc/test/Mvc.FunctionalTests/RespectBrowserAcceptHeaderTests.cs index 57d8b68fc6f3..5b5824f014a7 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RespectBrowserAcceptHeaderTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RespectBrowserAcceptHeaderTests.cs @@ -1,27 +1,40 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using FormatterWebSite; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; /// /// These tests are for scenarios when is True(default is False). /// -public class RespectBrowserAcceptHeaderTests : IClassFixture> +public class RespectBrowserAcceptHeaderTests : LoggedTest { - public RespectBrowserAcceptHeaderTests(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ReturnStringFromAction_StringOutputFormatterDoesNotWriteTheResponse() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs index 1c24d644df6a..127975092ed6 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs @@ -4,23 +4,34 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using RoutingWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RoutingAcrossPipelineBranchesTests : IClassFixture> +public class RoutingAcrossPipelineBranchesTests : LoggedTest { - public RoutingAcrossPipelineBranchesTests(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public WebApplicationFactory Factory { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55933")] [Fact] diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs index e6d40aa8c314..52b61ee7e1c3 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs @@ -4,23 +4,32 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; +using System.Reflection; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using RoutingWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RoutingDynamicOrderTest : IClassFixture> +public class RoutingDynamicOrderTest : LoggedTest { - public RoutingDynamicOrderTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public WebApplicationFactory Factory { get; } + public WebApplicationFactory Factory { get; private set; } [Fact] public async Task PrefersAttributeRoutesOverDynamicControllerRoutes() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicTest.cs index 2903f93dc807..64d388dc4ae8 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicTest.cs @@ -3,24 +3,34 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using RoutingWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RoutingDynamicTest : IClassFixture> +public class RoutingDynamicTest : LoggedTest { - public RoutingDynamicTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public WebApplicationFactory Factory { get; } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task DynamicController_CanGet404ForMissingAction() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingTest.cs index ed6bc854db55..5d44ded05a72 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingTest.cs @@ -9,11 +9,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class RoutingEndpointRoutingTest : RoutingTestsBase { - public RoutingEndpointRoutingTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public async Task AttributeRoutedAction_ContainsPage_RouteMatched() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingWithoutRazorPagesTests.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingWithoutRazorPagesTests.cs index 22b91f183322..9a140a6aba68 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingWithoutRazorPagesTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingEndpointRoutingWithoutRazorPagesTests.cs @@ -5,8 +5,4 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class RoutingEndpointRoutingWithoutRazorPagesTests : RoutingWithoutRazorPagesTestsBase { - public RoutingEndpointRoutingWithoutRazorPagesTests(MvcTestFixture fixture) - : base(fixture) - { - } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingFallbackTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingFallbackTest.cs index 17150746f341..64946603c62b 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingFallbackTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingFallbackTest.cs @@ -3,24 +3,35 @@ using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RoutingFallbackTest : IClassFixture> +public class RoutingFallbackTest : LoggedTest { - public RoutingFallbackTest(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task Fallback_CanGet404ForMissingFile() diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs index 77cbbbc5d427..01176a8fa630 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs @@ -4,25 +4,35 @@ using System.Net; using System.Net.Http; using System.Net.Http.Json; -using System.Text.Json; +using System.Reflection; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using RoutingWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RoutingGroupsTests : IClassFixture> +public class RoutingGroupsTests : LoggedTest { - public RoutingGroupsTests(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public WebApplicationFactory Factory { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55931")] [Fact] diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs index 86a8596113ef..30788a036f4c 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs @@ -3,24 +3,33 @@ using System.Net; using System.Net.Http.Json; +using System.Reflection; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using RoutingWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class RoutingGroupsWithMetadataTests : IClassFixture> +public class RoutingGroupsWithMetadataTests : LoggedTest { - public RoutingGroupsWithMetadataTests(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public WebApplicationFactory Factory { get; } + public WebApplicationFactory Factory { get; private set; } [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55927")] [Fact] diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingTests.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingTests.cs index 8b2bd1a77870..635af1d3866a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingTests.cs @@ -10,11 +10,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class RoutingTests : RoutingTestsBase { - public RoutingTests(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingTestsBase.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingTestsBase.cs index 9b50c6e3485a..f67c67f52aa4 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingTestsBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingTestsBase.cs @@ -3,23 +3,35 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class RoutingTestsBase : IClassFixture> where TStartup : class +public abstract class RoutingTestsBase : LoggedTest where TStartup : class { - protected RoutingTestsBase(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("http://localhost/Login/Index", "Login", "Index", "http://localhost/Login")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTests.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTests.cs index 5c07c980e49c..e1526b460ea0 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTests.cs @@ -5,8 +5,4 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class RoutingWithoutRazorPagesTests : RoutingWithoutRazorPagesTestsBase { - public RoutingWithoutRazorPagesTests(MvcTestFixture fixture) - : base(fixture) - { - } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTestsBase.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTestsBase.cs index aa53e8b2014a..7f31453447fd 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTestsBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingWithoutRazorPagesTestsBase.cs @@ -3,23 +3,35 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class RoutingWithoutRazorPagesTestsBase : IClassFixture> where TStartup : class +public abstract class RoutingWithoutRazorPagesTestsBase : LoggedTest where TStartup : class { - protected RoutingWithoutRazorPagesTestsBase(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task AttributeRoutedAction_ContainsPage_RouteMatched() diff --git a/src/Mvc/test/Mvc.FunctionalTests/SerializableErrorTests.cs b/src/Mvc/test/Mvc.FunctionalTests/SerializableErrorTests.cs index c283f0c86e45..4231ce8828da 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SerializableErrorTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SerializableErrorTests.cs @@ -4,19 +4,31 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using System.Text; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Formatters.Xml; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class SerializableErrorTests : IClassFixture> +public class SerializableErrorTests : LoggedTest { - public SerializableErrorTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } public static TheoryData AcceptHeadersData { diff --git a/src/Mvc/test/Mvc.FunctionalTests/SimpleTests.cs b/src/Mvc/test/Mvc.FunctionalTests/SimpleTests.cs index 1f2addaf1ffa..d848b1c836f6 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SimpleTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SimpleTests.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class SimpleTests : IClassFixture> +public class SimpleTests : LoggedTest { - public SimpleTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task JsonSerializeFormatted() diff --git a/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderExceptionTests.cs b/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderExceptionTests.cs index 6ffc8bcf31af..7af2ed72a884 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderExceptionTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderExceptionTests.cs @@ -1,21 +1,32 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; + namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class SimpleWithWebApplicationBuilderExceptionTests : IClassFixture> +public class SimpleWithWebApplicationBuilderExceptionTests : LoggedTest { - private readonly MvcTestFixture _fixture; + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + } - public SimpleWithWebApplicationBuilderExceptionTests(MvcTestFixture fixture) + public override void Dispose() { - _fixture = fixture; + Factory.Dispose(); + base.Dispose(); } + public MvcTestFixture Factory { get; private set; } + [Fact] public void ExceptionThrownFromApplicationCanBeObserved() { - var ex = Assert.Throws(() => _fixture.CreateClient()); + var ex = Assert.Throws(() => Factory.CreateClient()); Assert.Equal("This application failed to start", ex.Message); } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderTests.cs b/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderTests.cs index 62450dae7e96..bc179c812b0e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderTests.cs @@ -4,38 +4,46 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class SimpleWithWebApplicationBuilderTests : IClassFixture> +public class SimpleWithWebApplicationBuilderTests : LoggedTest { - private readonly MvcTestFixture _fixture; + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); + } - public SimpleWithWebApplicationBuilderTests(MvcTestFixture fixture) + public override void Dispose() { - _fixture = fixture; - Client = _fixture.CreateDefaultClient(); + Factory.Dispose(); + base.Dispose(); } - public HttpClient Client { get; } + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task HelloWorld() { // Arrange var expected = "Hello World"; - using var client = _fixture.CreateDefaultClient(); // Act - var content = await client.GetStringAsync("http://localhost/"); + var content = await Client.GetStringAsync("http://localhost/"); // Assert Assert.Equal(expected, content); @@ -46,10 +54,9 @@ public async Task JsonResult_Works() { // Arrange var expected = "{\"name\":\"John\",\"age\":42}"; - using var client = _fixture.CreateDefaultClient(); // Act - var response = await client.GetAsync("/json"); + var response = await Client.GetAsync("/json"); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.OK); @@ -62,10 +69,9 @@ public async Task OkObjectResult_Works() { // Arrange var expected = "{\"name\":\"John\",\"age\":42}"; - using var client = _fixture.CreateDefaultClient(); // Act - var response = await client.GetAsync("/ok-object"); + var response = await Client.GetAsync("/ok-object"); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.OK); @@ -78,10 +84,9 @@ public async Task AcceptedObjectResult_Works() { // Arrange var expected = "{\"name\":\"John\",\"age\":42}"; - using var client = _fixture.CreateDefaultClient(); // Act - var response = await client.GetAsync("/accepted-object"); + var response = await Client.GetAsync("/accepted-object"); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.Accepted); @@ -94,10 +99,9 @@ public async Task AcceptedObjectResult_Works() public async Task ActionReturningMoreThanOneResult_NotFound() { // Arrange - using var client = _fixture.CreateDefaultClient(); // Act - var response = await client.GetAsync("/many-results?id=-1"); + var response = await Client.GetAsync("/many-results?id=-1"); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.NotFound); @@ -107,10 +111,9 @@ public async Task ActionReturningMoreThanOneResult_NotFound() public async Task ActionReturningMoreThanOneResult_Found() { // Arrange - using var client = _fixture.CreateDefaultClient(); // Act - var response = await client.GetAsync("/many-results?id=7"); + var response = await Client.GetAsync("/many-results?id=7"); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.MovedPermanently); @@ -121,10 +124,9 @@ public async Task ActionReturningMoreThanOneResult_Found() public async Task MvcControllerActionWorks() { // Arrange - using var client = _fixture.CreateDefaultClient(); // Act - var response = await client.GetAsync("/greet"); + var response = await Client.GetAsync("/greet"); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.OK); @@ -150,7 +152,7 @@ public async Task DefaultEnvironment_Is_Development() public async Task Configuration_Can_Be_Overridden() { // Arrange - var fixture = _fixture.WithWebHostBuilder(builder => + var fixture = Factory.WithWebHostBuilder(builder => { builder.ConfigureAppConfiguration(builder => { @@ -177,7 +179,7 @@ public async Task Configuration_Can_Be_Overridden() public async Task Environment_Can_Be_Overridden() { // Arrange - var fixture = _fixture.WithWebHostBuilder(builder => + var fixture = Factory.WithWebHostBuilder(builder => { builder.UseEnvironment(Environments.Staging); }); @@ -198,7 +200,7 @@ public async Task WebRoot_Can_Be_Overriden() var webRoot = "foo"; var expectedWebRoot = ""; // Arrange - var fixture = _fixture.WithWebHostBuilder(builder => + var fixture = Factory.WithWebHostBuilder(builder => { expectedWebRoot = Path.GetFullPath(Path.Combine(builder.GetSetting(WebHostDefaults.ContentRootKey), webRoot)); builder.UseSetting(WebHostDefaults.WebRootKey, webRoot); @@ -261,15 +263,14 @@ public async Task FileUpload_Works_WithAntiforgeryToken() var content = new MultipartFormDataContent(); content.Add(new StringContent(new string('a', 42)), "file", "file.txt"); - using var client = _fixture.CreateDefaultClient(); - var antiforgery = _fixture.Services.GetRequiredService(); - var antiforgeryOptions = _fixture.Services.GetRequiredService>(); + var antiforgery = Factory.Services.GetRequiredService(); + var antiforgeryOptions = Factory.Services.GetRequiredService>(); var tokens = antiforgery.GetAndStoreTokens(new DefaultHttpContext()); - client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(antiforgeryOptions.Value.Cookie.Name, tokens.CookieToken).ToString()); - client.DefaultRequestHeaders.Add(tokens.HeaderName, tokens.RequestToken); + Client.DefaultRequestHeaders.Add("Cookie", new CookieHeaderValue(antiforgeryOptions.Value.Cookie.Name, tokens.CookieToken).ToString()); + Client.DefaultRequestHeaders.Add(tokens.HeaderName, tokens.RequestToken); // Act - var response = await client.PostAsync("/fileupload", content); + var response = await Client.PostAsync("/fileupload", content); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.OK); @@ -284,10 +285,8 @@ public async Task FileUpload_Fails_WithoutAntiforgeryToken() var content = new MultipartFormDataContent(); content.Add(new StringContent(new string('a', 42)), "file", "file.txt"); - using var client = _fixture.CreateDefaultClient(); - // Act - var response = await client.PostAsync("/fileupload", content); + var response = await Client.PostAsync("/fileupload", content); // Assert await response.AssertStatusCodeAsync(HttpStatusCode.BadRequest); diff --git a/src/Mvc/test/Mvc.FunctionalTests/StreamOutputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/StreamOutputFormatterTest.cs index e29c965a66f2..733f90527283 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/StreamOutputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/StreamOutputFormatterTest.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class StreamOutputFormatterTest : IClassFixture> +public class StreamOutputFormatterTest : LoggedTest { - public StreamOutputFormatterTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("SimpleMemoryStream", null)] diff --git a/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs index cb89037bf131..2db7a9a8fe09 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs @@ -5,11 +5,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class SystemTextJsonInputFormatterTest : JsonInputFormatterTestBase { - public SystemTextJsonInputFormatterTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact(Skip = "https://github.com/dotnet/runtime/issues/38539")] public override Task JsonInputFormatter_RoundtripsRecordType() => base.JsonInputFormatter_RoundtripsRecordType(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonOutputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonOutputFormatterTest.cs index 2067351335cd..df54ab0d8cd9 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonOutputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonOutputFormatterTest.cs @@ -10,11 +10,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class SystemTextJsonOutputFormatterTest : JsonOutputFormatterTestBase { - public SystemTextJsonOutputFormatterTest(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override Task SerializableErrorIsReturnedInExpectedFormat() => base.SerializableErrorIsReturnedInExpectedFormat(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/TagHelperComponentTagHelperTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TagHelperComponentTagHelperTest.cs index f76045e6f925..b68fa3d9e995 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TagHelperComponentTagHelperTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TagHelperComponentTagHelperTest.cs @@ -4,19 +4,30 @@ using System.Net; using System.Net.Http; using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TagHelperComponentTagHelperTest : IClassFixture> +public class TagHelperComponentTagHelperTest : LoggedTest { private static readonly Assembly _resourcesAssembly = typeof(TagHelperComponentTagHelperTest).GetTypeInfo().Assembly; - public TagHelperComponentTagHelperTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task InjectsTestHeadTagHelperComponent() diff --git a/src/Mvc/test/Mvc.FunctionalTests/TagHelpersFromServicesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TagHelpersFromServicesTest.cs index e81fd78849c6..ee8b90ceccb2 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TagHelpersFromServicesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TagHelpersFromServicesTest.cs @@ -2,17 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TagHelpersFromServicesTest : IClassFixture> +public class TagHelpersFromServicesTest : LoggedTest { - public TagHelpersFromServicesTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task TagHelpersWithConstructorInjectionAreCreatedAndActivated() diff --git a/src/Mvc/test/Mvc.FunctionalTests/TagHelpersTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TagHelpersTest.cs index a2e5ef98f8db..c914b3500c95 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TagHelpersTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TagHelpersTest.cs @@ -6,12 +6,12 @@ using System.Net.Http.Headers; using System.Reflection; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TagHelpersTest : - IClassFixture>, - IClassFixture> +public class TagHelpersTest : LoggedTest { // Some tests require comparing the actual response body against an expected response baseline // so they require a reference to the assembly on which the resources are located, in order to @@ -19,17 +19,26 @@ public class TagHelpersTest : // use it on all the rest of the tests. private static readonly Assembly _resourcesAssembly = typeof(TagHelpersTest).GetTypeInfo().Assembly; - public TagHelpersTest( - MvcTestFixture fixture, - MvcEncodedTestFixture encodedFixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); - EncodedClient = encodedFixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + EncodedFactory = new MvcEncodedTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); + EncodedClient = EncodedFactory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public MvcEncodedTestFixture EncodedFactory { get; private set; } + public HttpClient Client { get; private set; } - public HttpClient EncodedClient { get; } + public HttpClient EncodedClient { get; private set; } [Theory] [InlineData("Index")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesTest.cs index 372bc0e697e7..f25096cc9acc 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesTest.cs @@ -5,6 +5,7 @@ using System.Net.Http; using System.Text; using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure; @@ -14,20 +15,15 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TempDataInCookiesTest : TempDataTestBase, IClassFixture> +public class TempDataInCookiesTest : TempDataTestBase { private IServiceCollection _serviceCollection; - public TempDataInCookiesTest(MvcTestFixture fixture) + protected override void ConfigureWebHostBuilder(IWebHostBuilder builder) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(b => b.UseStartup()); - factory = factory.WithWebHostBuilder(b => b.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection)); - - Client = factory.CreateDefaultClient(); + builder.ConfigureTestServices(serviceCollection => _serviceCollection = serviceCollection); } - protected override HttpClient Client { get; } - [Fact] public void VerifyNewtonsoftJsonTempDataSerializer() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesUsingCookieConsentTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesUsingCookieConsentTest.cs index 68c719fe4461..627e78d28fe6 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesUsingCookieConsentTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TempDataInCookiesUsingCookieConsentTest.cs @@ -3,23 +3,33 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Net.Http.Headers; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TempDataInCookiesUsingCookieConsentTest - : IClassFixture> +public class TempDataInCookiesUsingCookieConsentTest : LoggedTest { - private readonly HttpClient _client; + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } - public TempDataInCookiesUsingCookieConsentTest( - MvcTestFixture fixture) + public override void Dispose() { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - _client = factory.CreateDefaultClient(); + Factory.Dispose(); + base.Dispose(); } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup(); @@ -33,16 +43,16 @@ public async Task CookieTempDataProviderCookie_SetInResponse_OnGrantingConsent() }; var content = new FormUrlEncodedContent(nameValueCollection); // This response would have the consent cookie which would be sent on rest of the requests here - var response = await _client.GetAsync("/TempData/GrantConsent"); + var response = await Client.GetAsync("/TempData/GrantConsent"); // Act 1 - response = await _client.SendAsync(GetPostRequest("/TempData/SetTempData", content, response)); + response = await Client.SendAsync(GetPostRequest("/TempData/SetTempData", content, response)); // Assert 1 Assert.Equal(HttpStatusCode.OK, response.StatusCode); // Act 2 - response = await _client.SendAsync(GetRequest("/TempData/GetTempData", response)); + response = await Client.SendAsync(GetRequest("/TempData/GetTempData", response)); // Assert 2 Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -50,7 +60,7 @@ public async Task CookieTempDataProviderCookie_SetInResponse_OnGrantingConsent() Assert.Equal("Foo", body); // Act 3 - response = await _client.SendAsync(GetRequest("/TempData/GetTempData", response)); + response = await Client.SendAsync(GetRequest("/TempData/GetTempData", response)); // Assert 3 Assert.Equal(HttpStatusCode.NoContent, response.StatusCode); @@ -67,13 +77,13 @@ public async Task CookieTempDataProviderCookie_NotSetInResponse_OnNoConsent() var content = new FormUrlEncodedContent(nameValueCollection); // Act 1 - var response = await _client.PostAsync("/TempData/SetTempData", content); + var response = await Client.PostAsync("/TempData/SetTempData", content); // Assert 1 Assert.Equal(HttpStatusCode.OK, response.StatusCode); // Act 2 - response = await _client.SendAsync(GetRequest("/TempData/GetTempData", response)); + response = await Client.SendAsync(GetRequest("/TempData/GetTempData", response)); // Assert 2 Assert.Equal(HttpStatusCode.NoContent, response.StatusCode); diff --git a/src/Mvc/test/Mvc.FunctionalTests/TempDataInSessionTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TempDataInSessionTest.cs index d7d5b4902da5..80d48cafb51f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TempDataInSessionTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TempDataInSessionTest.cs @@ -5,12 +5,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TempDataInSessionTest : TempDataTestBase, IClassFixture> +public class TempDataInSessionTest : TempDataTestBase { - public TempDataInSessionTest(MvcTestFixture fixture) - { - Client = fixture.CreateDefaultClient(); - } - - protected override HttpClient Client { get; } } diff --git a/src/Mvc/test/Mvc.FunctionalTests/TempDataPropertyTest.cs b/src/Mvc/test/Mvc.FunctionalTests/TempDataPropertyTest.cs index f019555bba72..c86191791948 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TempDataPropertyTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TempDataPropertyTest.cs @@ -1,21 +1,33 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.Net.Http.Headers; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class TempDataPropertyTest : IClassFixture> +public class TempDataPropertyTest : LoggedTest { - protected HttpClient Client { get; } + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); + } - public TempDataPropertyTest(MvcTestFixture fixture) + public override void Dispose() { - Client = fixture.CreateDefaultClient(); + Factory.Dispose(); + base.Dispose(); } + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } + [Fact] public async Task TempDataPropertyAttribute_RetainsTempDataWithView() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/TempDataTestBase.cs b/src/Mvc/test/Mvc.FunctionalTests/TempDataTestBase.cs index 9b39742d1319..2b982c237281 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TempDataTestBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TempDataTestBase.cs @@ -1,15 +1,36 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Net.Http.Headers; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class TempDataTestBase +public abstract class TempDataTestBase : LoggedTest where TStartup : class { - protected abstract HttpClient Client { get; } + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + { + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); + } + + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } + + protected virtual void ConfigureWebHostBuilder(IWebHostBuilder builder) { } [Fact] public async Task PersistsJustForNextRequest() diff --git a/src/Mvc/test/Mvc.FunctionalTests/UrlResolutionTest.cs b/src/Mvc/test/Mvc.FunctionalTests/UrlResolutionTest.cs index 9934fd438843..af802baf278a 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/UrlResolutionTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/UrlResolutionTest.cs @@ -3,26 +3,37 @@ using System.Net.Http; using System.Reflection; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class UrlResolutionTest : - IClassFixture>, - IClassFixture> +public class UrlResolutionTest : LoggedTest { private static readonly Assembly _resourcesAssembly = typeof(UrlResolutionTest).GetTypeInfo().Assembly; - public UrlResolutionTest( - MvcTestFixture fixture, - MvcEncodedTestFixture encodedFixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); - EncodedClient = encodedFixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + EncodedFactory = new MvcEncodedTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); + EncodedClient = EncodedFactory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + EncodedFactory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public MvcEncodedTestFixture EncodedFactory { get; private set; } + public HttpClient Client { get; private set; } - public HttpClient EncodedClient { get; } + public HttpClient EncodedClient { get; private set; } [Fact] public async Task AppRelativeUrlsAreResolvedCorrectly() diff --git a/src/Mvc/test/Mvc.FunctionalTests/VersioningEndpointRoutingTests.cs b/src/Mvc/test/Mvc.FunctionalTests/VersioningEndpointRoutingTests.cs index 107579fac361..907cac369899 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/VersioningEndpointRoutingTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/VersioningEndpointRoutingTests.cs @@ -9,11 +9,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class VersioningEndpointRoutingTests : VersioningTestsBase { - public VersioningEndpointRoutingTests(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/VersioningTests.cs b/src/Mvc/test/Mvc.FunctionalTests/VersioningTests.cs index 09e916db782c..871e1959ed54 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/VersioningTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/VersioningTests.cs @@ -8,11 +8,6 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests; public class VersioningTests : VersioningTestsBase { - public VersioningTests(MvcTestFixture fixture) - : base(fixture) - { - } - [Fact] public override async Task HasEndpointMatch() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/VersioningTestsBase.cs b/src/Mvc/test/Mvc.FunctionalTests/VersioningTestsBase.cs index 16c1953d446a..2bdd56adff02 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/VersioningTestsBase.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/VersioningTestsBase.cs @@ -3,23 +3,35 @@ using System.Net; using System.Net.Http; +using System.Reflection; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Mvc.Testing; using Newtonsoft.Json; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public abstract class VersioningTestsBase : IClassFixture> where TStartup : class +public abstract class VersioningTestsBase : LoggedTest where TStartup : class { - protected VersioningTestsBase(MvcTestFixture fixture) + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); - Client = factory.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory).WithWebHostBuilder(ConfigureWebHostBuilder); + Client = Factory.CreateDefaultClient(); } - private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => - builder.UseStartup(); + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } - public HttpClient Client { get; } + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public abstract Task HasEndpointMatch(); diff --git a/src/Mvc/test/Mvc.FunctionalTests/ViewComponentFromServicesTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ViewComponentFromServicesTests.cs index 48f3e1d920a7..9e04ff1bc567 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ViewComponentFromServicesTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ViewComponentFromServicesTests.cs @@ -2,17 +2,30 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net.Http; +using System.Reflection; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.InternalTesting; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ViewComponentFromServicesTest : IClassFixture> +public class ViewComponentFromServicesTest : LoggedTest { - public ViewComponentFromServicesTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task ViewComponentsWithConstructorInjectionAreCreatedAndActivated() diff --git a/src/Mvc/test/Mvc.FunctionalTests/ViewEngineTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ViewEngineTests.cs index 335b3a44b116..6a4deae7ab38 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ViewEngineTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ViewEngineTests.cs @@ -7,19 +7,30 @@ using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.InternalTesting; using Microsoft.Net.Http.Headers; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class ViewEngineTests : IClassFixture> +public class ViewEngineTests : LoggedTest { private static readonly Assembly _assembly = typeof(ViewEngineTests).GetTypeInfo().Assembly; - public ViewEngineTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } public static IEnumerable RazorView_ExecutesPageAndLayoutData { diff --git a/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerFormattersWrappingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerFormattersWrappingTest.cs index 892670ddd182..0c99845b9c51 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerFormattersWrappingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerFormattersWrappingTest.cs @@ -10,19 +10,28 @@ using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.InternalTesting; using XmlFormattersWebSite; +using System.Reflection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class XmlDataContractSerializerFormattersWrappingTest : IClassFixture> +public class XmlDataContractSerializerFormattersWrappingTest : LoggedTest { - public XmlDataContractSerializerFormattersWrappingTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(builder => builder.UseStartup()); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } - public WebApplicationFactory Factory { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public HttpClient Client { get; private set; } + public WebApplicationFactory Factory { get; private set; } [ConditionalTheory] // Mono issue - https://github.com/aspnet/External/issues/18 diff --git a/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerInputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerInputFormatterTest.cs index 56ca2990c1d4..bff567a47a24 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerInputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/XmlDataContractSerializerInputFormatterTest.cs @@ -4,20 +4,33 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using System.Runtime.Serialization; using System.Text; +using Microsoft.AspNetCore.InternalTesting; using XmlFormattersWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class XmlDataContractSerializerInputFormatterTest : IClassFixture> +public class XmlDataContractSerializerInputFormatterTest : LoggedTest { - public XmlDataContractSerializerInputFormatterTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public HttpClient Client { get; private set; } + + public MvcTestFixture Factory { get; private set; } [Fact] public async Task ThrowsOnInvalidInput_AndAddsToModelState() diff --git a/src/Mvc/test/Mvc.FunctionalTests/XmlOutputFormatterTests.cs b/src/Mvc/test/Mvc.FunctionalTests/XmlOutputFormatterTests.cs index 886574b5a9c3..31367b6e4fe3 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/XmlOutputFormatterTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/XmlOutputFormatterTests.cs @@ -6,17 +6,30 @@ using System.Net.Http.Headers; using Microsoft.AspNetCore.Mvc.Formatters.Xml; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.Extensions.Logging; +using System.Reflection; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class XmlOutputFormatterTests : IClassFixture> +public class XmlOutputFormatterTests : LoggedTest { - public XmlOutputFormatterTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public HttpClient Client { get; private set; } + + public MvcTestFixture Factory { get; private set; } [ConditionalFact] // Mono.Xml2.XmlTextReader.ReadText is unable to read the XML. This is fixed in mono 4.3.0. diff --git a/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerFormattersWrappingTest.cs b/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerFormattersWrappingTest.cs index b8f1f1578c49..f85d681eb6b6 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerFormattersWrappingTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerFormattersWrappingTest.cs @@ -5,24 +5,34 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using System.Xml.Linq; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Formatters.Xml; using Microsoft.AspNetCore.Mvc.Testing; using XmlFormattersWebSite; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class XmlSerializerFormattersWrappingTest : IClassFixture> +public class XmlSerializerFormattersWrappingTest : LoggedTest { - public XmlSerializerFormattersWrappingTest(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(builder => builder.UseStartup()); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); Client = Factory.CreateDefaultClient(); } - public WebApplicationFactory Factory { get; } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public WebApplicationFactory Factory { get; private set; } + public HttpClient Client { get; private set; } [Theory] [InlineData("http://localhost/IEnumerable/ValueTypes")] diff --git a/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerInputFormatterTests.cs b/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerInputFormatterTests.cs index c69db507661a..728a7332b5f4 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerInputFormatterTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/XmlSerializerInputFormatterTests.cs @@ -4,19 +4,31 @@ using System.Globalization; using System.Net; using System.Net.Http; +using System.Reflection; using System.Text; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.Extensions.Logging; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Mvc.FunctionalTests; -public class XmlSerializerInputFormatterTests : IClassFixture> +public class XmlSerializerInputFormatterTests : LoggedTest { - public XmlSerializerInputFormatterTests(MvcTestFixture fixture) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - Client = fixture.CreateDefaultClient(); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); + Factory = new MvcTestFixture(LoggerFactory); + Client = Factory.CreateDefaultClient(); } - public HttpClient Client { get; } + public override void Dispose() + { + Factory.Dispose(); + base.Dispose(); + } + + public MvcTestFixture Factory { get; private set; } + public HttpClient Client { get; private set; } [Fact] public async Task CheckIfXmlSerializerInputFormatterIsCalled() diff --git a/src/Mvc/test/Mvc.FunctionalTests/xunit.runner.json b/src/Mvc/test/Mvc.FunctionalTests/xunit.runner.json index 1c72a421ad32..c72abd7754f7 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/xunit.runner.json +++ b/src/Mvc/test/Mvc.FunctionalTests/xunit.runner.json @@ -1,3 +1,6 @@ { + "longRunningTestSeconds": 30, + "diagnosticMessages": true, + "maxParallelThreads": -1, "shadowCopy": false } diff --git a/src/Mvc/test/WebSites/ApiExplorerWebSite/Startup.cs b/src/Mvc/test/WebSites/ApiExplorerWebSite/Startup.cs index f13a31df7560..c2bfec25d45e 100644 --- a/src/Mvc/test/WebSites/ApiExplorerWebSite/Startup.cs +++ b/src/Mvc/test/WebSites/ApiExplorerWebSite/Startup.cs @@ -12,8 +12,6 @@ public class Startup // Set up application services public void ConfigureServices(IServiceCollection services) { - services.AddTransient(); - var wellKnownChangeToken = new WellKnownChangeToken(); services.AddControllers(options => { diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite/UpdateableFileProvider.cs b/src/Mvc/test/WebSites/RazorBuildWebSite/UpdateableFileProvider.cs index b717657e2bc4..596e62a1bbab 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite/UpdateableFileProvider.cs +++ b/src/Mvc/test/WebSites/RazorBuildWebSite/UpdateableFileProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/FixtureLoggedTest.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/FixtureLoggedTest.cs index e51c8515c2c5..57b78e68d1dd 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/FixtureLoggedTest.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/FixtureLoggedTest.cs @@ -17,7 +17,7 @@ public FixtureLoggedTest(IISTestSiteFixture fixture) Fixture = fixture; } - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); Fixture.Attach(this); diff --git a/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTestsBase.cs b/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTestsBase.cs index ba86cff87fb6..c4008d7b2208 100644 --- a/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTestsBase.cs +++ b/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTestsBase.cs @@ -27,7 +27,7 @@ public class Http1ConnectionTestsBase : LoggedTest, IDisposable internal SequencePosition _examined; internal Mock _timeoutControl; - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); diff --git a/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs b/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs index 8b4a8dd776d1..f8bab65d13fb 100644 --- a/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs +++ b/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs @@ -34,7 +34,7 @@ public bool ThrowOnUngracefulShutdown public Task WaitForLogMessage(Func messageFilter) => TestApplicationErrorLogger.WaitForMessage(messageFilter); - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs index c334ee588dab..546d1337cade 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs @@ -384,7 +384,7 @@ public Http2TestBase() }; } - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs index 373a453214a6..a7ed4cba8849 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs @@ -114,7 +114,7 @@ public Http3TestBase() }; } - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); diff --git a/src/Testing/src/LoggedTest/LoggedTest.cs b/src/Testing/src/LoggedTest/LoggedTest.cs index 9c6d87582060..0030f37e6428 100644 --- a/src/Testing/src/LoggedTest/LoggedTest.cs +++ b/src/Testing/src/LoggedTest/LoggedTest.cs @@ -14,7 +14,7 @@ public LoggedTest(ITestOutputHelper output = null) : base(output) { } public ITestSink TestSink { get; set; } - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); diff --git a/src/Testing/src/LoggedTest/LoggedTestBase.cs b/src/Testing/src/LoggedTest/LoggedTestBase.cs index 51188982c04a..a361ad0d528b 100644 --- a/src/Testing/src/LoggedTest/LoggedTestBase.cs +++ b/src/Testing/src/LoggedTest/LoggedTestBase.cs @@ -55,7 +55,7 @@ public IDisposable StartLog(out ILoggerFactory loggerFactory, LogLevel minLogLev return AssemblyTestLog.ForAssembly(GetType().GetTypeInfo().Assembly).StartTestLog(TestOutputHelper, GetType().FullName, out loggerFactory, minLogLevel, testName); } - public virtual void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected virtual void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { try { diff --git a/src/Testing/test/LoggedTestXunitTests.cs b/src/Testing/test/LoggedTestXunitTests.cs index 1dbf854b9881..7d1b7dc87620 100644 --- a/src/Testing/test/LoggedTestXunitTests.cs +++ b/src/Testing/test/LoggedTestXunitTests.cs @@ -177,7 +177,7 @@ public class TestLoggedTest : LoggedTest public bool SetupInvoked { get; private set; } = false; public bool ITestOutputHelperIsInitialized { get; private set; } = false; - public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + protected override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); From ac9f9806c9cd0c45ee2b4038da1ddc672663683b Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Mon, 1 Jul 2024 22:47:46 -0700 Subject: [PATCH 109/257] Quarantine StreamPool_ManyConcurrentStreams_StreamPoolFull (#56562) --- .../Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs b/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs index 8a37f8668fb5..52f36132215e 100644 --- a/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs +++ b/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs @@ -554,6 +554,7 @@ public async Task StreamPool_Heartbeat_ExpiredStreamRemoved() [ConditionalFact] [MsQuicSupported] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/56517")] public async Task StreamPool_ManyConcurrentStreams_StreamPoolFull() { // Arrange From e6a0cc8d0dbb25e6307cba3a99dbdf8a0775cba8 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 2 Jul 2024 15:44:02 +0800 Subject: [PATCH 110/257] Don't use diagnostics memory pool in GracefulTurnsAbortiveIfRequestsDoNotFinish (#56281) --- .../test/FunctionalTests/Http2/ShutdownTests.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs index 6cad6c6cea71..0bc6dfe31a03 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs @@ -1,22 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Collections.Generic; +using System.Buffers; using System.Net; using System.Net.Http; using System.Security.Cryptography.X509Certificates; -using System.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.FunctionalTests; -using Microsoft.AspNetCore.InternalTesting; -using Moq; -using Xunit; #if SOCKETS namespace Microsoft.AspNetCore.Server.Kestrel.Sockets.FunctionalTests.Http2; @@ -173,11 +167,9 @@ public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish() var requestStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var requestUnblocked = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - var memoryPoolFactory = new DiagnosticMemoryPoolFactory(allowLateReturn: true); - var testContext = new TestServiceContext(LoggerFactory) { - MemoryPoolFactory = memoryPoolFactory.Create + MemoryPoolFactory = () => new PinnedBlockMemoryPool() }; ThrowOnUngracefulShutdown = false; @@ -227,7 +219,5 @@ public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish() Assert.Contains(LogMessages, m => m.Message.Contains("is closed. The last processed stream ID was 1.")); Assert.Contains(LogMessages, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown.")); Assert.DoesNotContain(LogMessages, m => m.Message.Contains("Request finished in")); - - await memoryPoolFactory.WhenAllBlocksReturned(TestConstants.DefaultTimeout); } } From 13f371317d64d05666797de23fd6b03b97710939 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Tue, 2 Jul 2024 01:07:07 -0700 Subject: [PATCH 111/257] Always ref request body and response schemas and fix nested types (#56513) * Always ref request body and response schemas and fix nested types * Address feedback --- .../src/Extensions/JsonTypeInfoExtensions.cs | 3 +- .../src/Schemas/OpenApiJsonSchema.Helpers.cs | 4 + .../src/Services/OpenApiDocumentService.cs | 12 +- .../Services/Schemas/OpenApiSchemaService.cs | 12 +- .../Services/Schemas/OpenApiSchemaStore.cs | 11 +- ...cument_documentName=responses.verified.txt | 72 +++++----- ...t_documentName=schemas-by-ref.verified.txt | 131 ++++++++++-------- ...enApiDocument_documentName=v1.verified.txt | 108 ++++++++------- ...enApiDocument_documentName=v2.verified.txt | 16 ++- .../OpenApiDocumentServiceTests.Responses.cs | 7 +- ...OpenApiSchemaService.PolymorphicSchemas.cs | 8 +- ...OpenApiSchemaService.RequestBodySchemas.cs | 76 +++++++--- .../OpenApiSchemaService.ResponseSchemas.cs | 75 +++++----- .../OpenApiSchemaReferenceTransformerTests.cs | 14 +- .../Transformers/SchemaTransformerTests.cs | 6 +- 15 files changed, 324 insertions(+), 231 deletions(-) diff --git a/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs b/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs index ac1a87c129cc..acb82909000b 100644 --- a/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonTypeInfoExtensions.cs @@ -53,7 +53,8 @@ internal static class JsonTypeInfoExtensions internal static string? GetSchemaReferenceId(this JsonTypeInfo jsonTypeInfo, bool isTopLevel = true) { var type = jsonTypeInfo.Type; - if (isTopLevel && OpenApiConstants.PrimitiveTypes.Contains(type)) + var underlyingType = Nullable.GetUnderlyingType(type); + if (isTopLevel && OpenApiConstants.PrimitiveTypes.Contains(underlyingType ?? type)) { return null; } diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index 26bb74e2c8cc..d069ce9836c4 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -313,6 +313,10 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, schema.Enum = [ReadOpenApiAny(ref reader, out var constType)]; schema.Type = constType; break; + case OpenApiSchemaKeywords.RefKeyword: + reader.Read(); + schema.Reference = new OpenApiReference { Type = ReferenceType.Schema, Id = reader.GetString() }; + break; default: reader.Skip(); break; diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index 34987212ab95..a6b9db95a407 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -228,7 +228,7 @@ private async Task GetResponseAsync(ApiDescription apiDescripti .Select(responseFormat => responseFormat.MediaType); foreach (var contentType in apiResponseFormatContentTypes) { - var schema = apiResponseType.Type is { } type ? await _componentService.GetOrCreateSchemaAsync(type, null, cancellationToken) : new OpenApiSchema(); + var schema = apiResponseType.Type is { } type ? await _componentService.GetOrCreateSchemaAsync(type, null, captureSchemaByRef: true, cancellationToken) : new OpenApiSchema(); response.Content[contentType] = new OpenApiMediaType { Schema = schema }; } @@ -269,7 +269,7 @@ private async Task GetResponseAsync(ApiDescription apiDescripti _ => throw new InvalidOperationException($"Unsupported parameter source: {parameter.Source.Id}") }, Required = IsRequired(parameter), - Schema = await _componentService.GetOrCreateSchemaAsync(parameter.Type, parameter, cancellationToken), + Schema = await _componentService.GetOrCreateSchemaAsync(parameter.Type, parameter, cancellationToken: cancellationToken), Description = GetParameterDescriptionFromAttribute(parameter) }; @@ -347,7 +347,7 @@ private async Task GetFormRequestBody(IList parameter.ModelMetadata.ContainerType is null)) { var description = parameter.Single(); - var parameterSchema = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken); + var parameterSchema = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken: cancellationToken); // Form files are keyed by their parameter name so we must capture the parameter name // as a property in the schema. if (description.Type == typeof(IFormFile) || description.Type == typeof(IFormFileCollection)) @@ -410,7 +410,7 @@ private async Task GetFormRequestBody(IList() }; foreach (var description in parameter) { - propertySchema.Properties[description.Name] = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken); + propertySchema.Properties[description.Name] = await _componentService.GetOrCreateSchemaAsync(description.Type, null, cancellationToken: cancellationToken); } schema.AllOf.Add(propertySchema); } @@ -418,7 +418,7 @@ private async Task GetFormRequestBody(IList GetJsonRequestBody(IList() is { } validationAttributes) { @@ -112,7 +120,7 @@ internal sealed class OpenApiSchemaService( } }; - internal async Task GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) + internal async Task GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, bool captureSchemaByRef = false, CancellationToken cancellationToken = default) { var key = parameterDescription?.ParameterDescriptor is IParameterInfoParameterDescriptor parameterInfoDescription && parameterDescription.ModelMetadata.PropertyName is null @@ -126,7 +134,7 @@ internal async Task GetOrCreateSchemaAsync(Type type, ApiParamete Debug.Assert(deserializedSchema != null, "The schema should have been deserialized successfully and materialize a non-null value."); var schema = deserializedSchema.Schema; await ApplySchemaTransformersAsync(schema, type, parameterDescription, cancellationToken); - _schemaStore.PopulateSchemaIntoReferenceCache(schema); + _schemaStore.PopulateSchemaIntoReferenceCache(schema, captureSchemaByRef); return schema; } diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index 67923622e71d..2937a37ba5c1 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -79,9 +79,12 @@ public JsonNode GetOrAdd(OpenApiSchemaKey key, Func /// schemas into the top-level document. /// /// The to add to the schemas-with-references cache. - public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema) + /// if schema should always be referenced instead of inlined. + public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema, bool captureSchemaByRef) { - AddOrUpdateSchemaByReference(schema); + // Only capture top-level schemas by ref. Nested schemas will follow the + // reference by duplicate rules. + AddOrUpdateSchemaByReference(schema, captureSchemaByRef: captureSchemaByRef); if (schema.AdditionalProperties is not null) { AddOrUpdateSchemaByReference(schema.AdditionalProperties); @@ -119,10 +122,10 @@ public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema) } } - private void AddOrUpdateSchemaByReference(OpenApiSchema schema, string? baseTypeSchemaId = null) + private void AddOrUpdateSchemaByReference(OpenApiSchema schema, string? baseTypeSchemaId = null, bool captureSchemaByRef = false) { var targetReferenceId = baseTypeSchemaId is not null ? $"{baseTypeSchemaId}{GetSchemaReferenceId(schema)}" : GetSchemaReferenceId(schema); - if (SchemasByReference.TryGetValue(schema, out var referenceId)) + if (SchemasByReference.TryGetValue(schema, out var referenceId) || captureSchemaByRef) { // If we've already used this reference ID else where in the document, increment a counter value to the reference // ID to avoid name collisions. These collisions are most likely to occur when the same .NET type produces a different diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt index 65411d66e17e..12fb88cb35e6 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt @@ -59,20 +59,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "hypotenuse": { - "type": "number", - "format": "double" - }, - "color": { - "type": "string" - }, - "sides": { - "type": "integer", - "format": "int32" - } - } + "$ref": "#/components/schemas/Triangle" } } } @@ -91,25 +78,7 @@ "content": { "application/json": { "schema": { - "required": [ - "$type" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/ShapeTriangle" - }, - { - "$ref": "#/components/schemas/ShapeSquare" - } - ], - "discriminator": { - "propertyName": "$type", - "mapping": { - "triangle": "#/components/schemas/ShapeTriangle", - "square": "#/components/schemas/ShapeSquare" - } - } + "$ref": "#/components/schemas/Shape" } } } @@ -120,6 +89,27 @@ }, "components": { "schemas": { + "Shape": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/ShapeTriangle" + }, + { + "$ref": "#/components/schemas/ShapeSquare" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "triangle": "#/components/schemas/ShapeTriangle", + "square": "#/components/schemas/ShapeSquare" + } + } + }, "ShapeSquare": { "properties": { "$type": { @@ -186,6 +176,22 @@ "format": "date-time" } } + }, + "Triangle": { + "type": "object", + "properties": { + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } } } }, diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt index 82a7723f7d1a..13d82fc07859 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt @@ -303,25 +303,7 @@ "content": { "application/json": { "schema": { - "required": [ - "$type" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/ShapeTriangle" - }, - { - "$ref": "#/components/schemas/ShapeSquare" - } - ], - "discriminator": { - "propertyName": "$type", - "mapping": { - "triangle": "#/components/schemas/ShapeTriangle", - "square": "#/components/schemas/ShapeSquare" - } - } + "$ref": "#/components/schemas/Shape" } } }, @@ -343,29 +325,7 @@ "content": { "application/json": { "schema": { - "required": [ - "$type" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity" - }, - { - "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries" - }, - { - "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" - } - ], - "discriminator": { - "propertyName": "$type", - "mapping": { - "0": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", - "1": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", - "2": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" - } - } + "$ref": "#/components/schemas/WeatherForecastBase" } } }, @@ -387,25 +347,7 @@ "content": { "application/json": { "schema": { - "required": [ - "discriminator" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/PersonStudent" - }, - { - "$ref": "#/components/schemas/PersonTeacher" - } - ], - "discriminator": { - "propertyName": "discriminator", - "mapping": { - "student": "#/components/schemas/PersonStudent", - "teacher": "#/components/schemas/PersonTeacher" - } - } + "$ref": "#/components/schemas/Person" } } }, @@ -447,6 +389,27 @@ "format": "int32" } }, + "Person": { + "required": [ + "discriminator" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/PersonStudent" + }, + { + "$ref": "#/components/schemas/PersonTeacher" + } + ], + "discriminator": { + "propertyName": "discriminator", + "mapping": { + "student": "#/components/schemas/PersonStudent", + "teacher": "#/components/schemas/PersonTeacher" + } + } + }, "PersonStudent": { "properties": { "discriminator": { @@ -489,6 +452,27 @@ } } }, + "Shape": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/ShapeTriangle" + }, + { + "$ref": "#/components/schemas/ShapeSquare" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "triangle": "#/components/schemas/ShapeTriangle", + "square": "#/components/schemas/ShapeSquare" + } + } + }, "ShapeSquare": { "properties": { "$type": { @@ -547,6 +531,31 @@ } } }, + "WeatherForecastBase": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity" + }, + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries" + }, + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "0": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", + "1": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", + "2": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" + } + } + }, "WeatherForecastBaseWeatherForecastWithCity": { "required": [ "city" diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt index d8b4654e535a..cb5f0bf47425 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt @@ -62,29 +62,7 @@ "content": { "application/json": { "schema": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/Todo" } } }, @@ -128,34 +106,7 @@ "content": { "application/json": { "schema": { - "required": [ - "dueDate", - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "dueDate": { - "type": "string", - "format": "date-time" - }, - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string" - }, - "completed": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - } - } + "$ref": "#/components/schemas/TodoWithDueDate" } } } @@ -172,6 +123,61 @@ "type": "string", "format": "uuid" } + }, + "Todo": { + "required": [ + "id", + "title", + "completed", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "TodoWithDueDate": { + "required": [ + "dueDate", + "id", + "title", + "completed", + "createdAt" + ], + "type": "object", + "properties": { + "dueDate": { + "type": "string", + "format": "date-time" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } } }, "securitySchemes": { diff --git a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt index 62cb111a0e15..e9d352c92a3d 100644 --- a/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt +++ b/src/OpenApi/test/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt @@ -23,10 +23,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/ArrayOfstring" } } } @@ -45,7 +42,16 @@ } } }, - "components": { }, + "components": { + "schemas": { + "ArrayOfstring": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "tags": [ { "name": "users" diff --git a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs index af2d994fe972..9c1d5b3c61ab 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Responses.cs @@ -231,7 +231,7 @@ await VerifyOpenApiDocument(builder, document => Assert.Empty(response.Value.Description); var mediaTypeEntry = Assert.Single(response.Value.Content); Assert.Equal("application/json", mediaTypeEntry.Key); - var schema = mediaTypeEntry.Value.Schema; + var schema = mediaTypeEntry.Value.Schema.GetEffective(document); Assert.Equal("object", schema.Type); Assert.Collection(schema.Properties, property => { @@ -264,7 +264,8 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(defaultResponse); Assert.Empty(defaultResponse.Description); var defaultContent = Assert.Single(defaultResponse.Content.Values); - Assert.Collection(defaultContent.Schema.Properties, + var defaultSchema = defaultContent.Schema.GetEffective(document); + Assert.Collection(defaultSchema.Properties, property => { Assert.Equal("code", property.Key); @@ -281,7 +282,7 @@ await VerifyOpenApiDocument(builder, document => Assert.Equal("OK", okResponse.Description); var okContent = Assert.Single(okResponse.Content); Assert.Equal("application/json", okContent.Key); - var schema = okContent.Value.Schema; + var schema = okContent.Value.Schema.GetEffective(document); Assert.Equal("object", schema.Type); Assert.Collection(schema.Properties, property => { diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs index 255134bc86a7..7d84741d7818 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.PolymorphicSchemas.cs @@ -23,7 +23,7 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(operation.RequestBody); var requestBody = operation.RequestBody.Content; Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); - var schema = mediaType.Schema; + var schema = mediaType.Schema.GetEffective(document); // Assert discriminator mappings have been configured correctly Assert.Equal("$type", schema.Discriminator.PropertyName); Assert.Contains(schema.Discriminator.PropertyName, schema.Required); @@ -60,7 +60,7 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(operation.RequestBody); var requestBody = operation.RequestBody.Content; Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); - var schema = mediaType.Schema; + var schema = mediaType.Schema.GetEffective(document); // Assert discriminator mappings have been configured correctly Assert.Equal("$type", schema.Discriminator.PropertyName); Assert.Contains(schema.Discriminator.PropertyName, schema.Required); @@ -105,7 +105,7 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(operation.RequestBody); var requestBody = operation.RequestBody.Content; Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); - var schema = mediaType.Schema; + var schema = mediaType.Schema.GetEffective(document); // Assert discriminator mappings have been configured correctly Assert.Equal("discriminator", schema.Discriminator.PropertyName); Assert.Contains(schema.Discriminator.PropertyName, schema.Required); @@ -144,7 +144,7 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(operation.RequestBody); var requestBody = operation.RequestBody.Content; Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); - var schema = mediaType.Schema; + var schema = mediaType.Schema.GetEffective(document); // Assert discriminator mappings have been configured correctly Assert.Equal("$type", schema.Discriminator.PropertyName); Assert.Collection(schema.Discriminator.Mapping, diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs index d5856fed98af..8930d88c0410 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs @@ -30,8 +30,9 @@ await VerifyOpenApiDocument(builder, document => var content = Assert.Single(requestBody.Content); Assert.Equal("application/json", content.Key); Assert.NotNull(content.Value.Schema); - Assert.Equal("object", content.Value.Schema.Type); - Assert.Collection(content.Value.Schema.Properties, + var schema = content.Value.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); @@ -76,8 +77,9 @@ await VerifyOpenApiDocument(builder, document => var content = Assert.Single(requestBody.Content); Assert.Equal("application/json", content.Key); Assert.NotNull(content.Value.Schema); - Assert.Equal("object", content.Value.Schema.Type); - Assert.Collection(content.Value.Schema.Properties, + var effectiveSchema = content.Value.Schema.GetEffective(document); + Assert.Equal("object", effectiveSchema.Type); + Assert.Collection(effectiveSchema.Properties, property => { Assert.Equal("id", property.Key); @@ -148,7 +150,7 @@ await VerifyOpenApiDocument(builder, document => var operation = document.Paths["/required-properties"].Operations[OperationType.Post]; var requestBody = operation.RequestBody; var content = Assert.Single(requestBody.Content); - var schema = content.Value.Schema; + var schema = content.Value.Schema.GetEffective(document); Assert.Collection(schema.Required, property => Assert.Equal("title", property), property => Assert.Equal("completed", property)); @@ -175,7 +177,7 @@ await VerifyOpenApiDocument(builder, document => var operation = document.Paths[$"/{path}"].Operations[OperationType.Post]; var requestBody = operation.RequestBody; - var effectiveSchema = requestBody.Content["application/octet-stream"].Schema; + var effectiveSchema = requestBody.Content["application/octet-stream"].Schema.GetEffective(document); Assert.Equal("string", effectiveSchema.Type); Assert.Equal("binary", effectiveSchema.Format); @@ -198,15 +200,18 @@ await VerifyOpenApiDocument(builder, document => var operation = document.Paths[$"/proposal"].Operations[OperationType.Post]; var requestBody = operation.RequestBody; var schema = requestBody.Content["application/json"].Schema; - Assert.Collection(schema.Properties, + Assert.Equal("Proposal", schema.Reference.Id); + var effectiveSchema = schema.GetEffective(document); + Assert.Collection(effectiveSchema.Properties, property => { Assert.Equal("proposalElement", property.Key); - // Todo: Assert that refs are used correctly. + Assert.Equal("Proposal", property.Value.Reference.Id); }, property => { Assert.Equal("stream", property.Key); - Assert.Equal("string", property.Value.Type); - Assert.Equal("binary", property.Value.Format); + var targetSchema = property.Value.GetEffective(document); + Assert.Equal("string", targetSchema.Type); + Assert.Equal("binary", targetSchema.Format); }); }); } @@ -290,9 +295,10 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(operation.RequestBody); var requestBody = operation.RequestBody.Content; Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Empty(mediaType.Schema.AnyOf); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Empty(schema.AnyOf); + Assert.Collection(schema.Properties, property => { Assert.Equal("length", property.Key); @@ -329,8 +335,9 @@ await VerifyOpenApiDocument(builder, document => Assert.NotNull(operation.RequestBody); var requestBody = operation.RequestBody.Content; Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); @@ -393,7 +400,7 @@ await VerifyOpenApiDocument(builder, document => var operation = document.Paths["/api"].Operations[OperationType.Post]; var requestBody = operation.RequestBody; var content = Assert.Single(requestBody.Content); - var schema = content.Value.Schema; + var schema = content.Value.Schema.GetEffective(document); Assert.Collection(schema.Properties, property => { @@ -430,6 +437,37 @@ await VerifyOpenApiDocument(builder, document => }); } + [Fact] + public async Task SupportsNestedTypes() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (NestedType type) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var content = Assert.Single(requestBody.Content); + Assert.Equal("NestedType", content.Value.Schema.Reference.Id); + var schema = content.Value.Schema.GetEffective(document); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("name", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("nested", property.Key); + Assert.Equal("NestedType", property.Value.Reference.Id); + }); + }); + } + private class DescriptionTodo { [Description("The unique identifier for a todo item.")] @@ -455,4 +493,10 @@ private class NullablePropertiesType public Uri? NullableUri { get; set; } } #nullable restore + + private class NestedType + { + public string Name { get; set; } + public NestedType Nested { get; set; } + } } diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs index c356de229cc9..2850fddb4df0 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs @@ -65,8 +65,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); @@ -111,8 +112,9 @@ await VerifyOpenApiDocument(builder, document => var content = Assert.Single(response.Content); Assert.Equal("application/json", content.Key); Assert.NotNull(content.Value.Schema); - Assert.Equal("object", content.Value.Schema.Type); - Assert.Collection(content.Value.Schema.Properties, + var schema = content.Value.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); @@ -156,8 +158,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); @@ -198,7 +201,7 @@ await VerifyOpenApiDocument(builder, document => var operation = document.Paths["/required-properties"].Operations[OperationType.Post]; var response = operation.Responses["200"]; var content = Assert.Single(response.Content); - var schema = content.Value.Schema; + var schema = content.Value.Schema.GetEffective(document); Assert.Collection(schema.Required, property => Assert.Equal("title", property), property => Assert.Equal("completed", property)); @@ -221,8 +224,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("dueDate", property.Key); @@ -276,8 +280,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("isSuccessful", property.Key); @@ -341,9 +346,10 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Empty(mediaType.Schema.AnyOf); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Empty(schema.AnyOf); + Assert.Collection(schema.Properties, property => { Assert.Equal("length", property.Key); @@ -380,8 +386,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("id", property.Key); @@ -440,10 +447,12 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("array", mediaType.Schema.Type); - Assert.NotNull(mediaType.Schema.Items); - Assert.Equal("object", mediaType.Schema.Items.Type); - Assert.Collection(mediaType.Schema.Items.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("array", schema.Type); + Assert.NotNull(schema.Items); + var effectiveItemsSchema = schema.Items.GetEffective(document); + Assert.Equal("object", effectiveItemsSchema.Type); + Assert.Collection(effectiveItemsSchema.Properties, property => { Assert.Equal("id", property.Key); @@ -487,8 +496,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("pageIndex", property.Key); @@ -565,20 +575,18 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/problem+json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - // `string` schemas appear multiple times in this document so they should - // all resolve to reference IDs, hence the use of `GetEffective` to resolve the - // final schema. - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("type", property.Key); - Assert.Equal("string", property.Value.GetEffective(document).Type); + Assert.Equal("string", property.Value.Type); }, property => { Assert.Equal("title", property.Key); - Assert.Equal("string", property.Value.GetEffective(document).Type); + Assert.Equal("string", property.Value.Type); }, property => { @@ -589,12 +597,12 @@ await VerifyOpenApiDocument(builder, document => property => { Assert.Equal("detail", property.Key); - Assert.Equal("string", property.Value.GetEffective(document).Type); + Assert.Equal("string", property.Value.Type); }, property => { Assert.Equal("instance", property.Key); - Assert.Equal("string", property.Value.GetEffective(document).Type); + Assert.Equal("string", property.Value.Type); }, property => { @@ -625,8 +633,9 @@ await VerifyOpenApiDocument(builder, document => var responses = Assert.Single(operation.Responses); var response = responses.Value; Assert.True(response.Content.TryGetValue("application/json", out var mediaType)); - Assert.Equal("object", mediaType.Schema.Type); - Assert.Collection(mediaType.Schema.Properties, + var schema = mediaType.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, property => { Assert.Equal("object", property.Key); diff --git a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs index a2c88e306c38..de63d9ed42dd 100644 --- a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs +++ b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs @@ -130,11 +130,11 @@ await VerifyOpenApiDocument(builder, document => { var operation = document.Paths["/api"].Operations[OperationType.Post]; var requestBody = operation.RequestBody.Content["application/json"]; - var requestBodySchema = requestBody.Schema; + var requestBodySchema = requestBody.Schema.GetEffective(document); var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; var requestBody2 = operation2.RequestBody.Content["application/json"]; - var requestBodySchema2 = requestBody2.Schema; + var requestBodySchema2 = requestBody2.Schema.GetEffective(document); // { // "type": "array", @@ -281,16 +281,12 @@ await VerifyOpenApiDocument(builder, options, document => var path = Assert.Single(document.Paths.Values); var postOperation = path.Operations[OperationType.Post]; var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; - // Schemas are distinct because of applied transformer so no reference is used. - Assert.Null(requestSchema.Reference); - Assert.Equal("todo", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); var getOperation = path.Operations[OperationType.Get]; var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; - Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _)); // Schemas are distinct because of applied transformer so no reference is used. - Assert.Null(responseSchema.Reference); - // No schemas get componentized here - Assert.Empty(document.Components.Schemas); + Assert.NotEqual(requestSchema.Reference.Id, responseSchema.Reference.Id); + Assert.Equal("todo", ((OpenApiString)requestSchema.GetEffective(document).Extensions["x-my-extension"]).Value); + Assert.False(responseSchema.GetEffective(document).Extensions.TryGetValue("x-my-extension", out var _)); }); } } diff --git a/src/OpenApi/test/Transformers/SchemaTransformerTests.cs b/src/OpenApi/test/Transformers/SchemaTransformerTests.cs index 291a331e4fa8..757fd3eb87fa 100644 --- a/src/OpenApi/test/Transformers/SchemaTransformerTests.cs +++ b/src/OpenApi/test/Transformers/SchemaTransformerTests.cs @@ -107,7 +107,7 @@ public async Task SchemaTransformer_RunsInRegisteredOrder() await VerifyOpenApiDocument(builder, options, document => { var operation = Assert.Single(document.Paths.Values).Operations.Values.Single(); - var schema = operation.RequestBody.Content["application/json"].Schema; + var schema = operation.RequestBody.Content["application/json"].Schema.GetEffective(document); Assert.Equal("2", ((OpenApiString)schema.Extensions["x-my-extension"]).Value); }); } @@ -164,10 +164,10 @@ await VerifyOpenApiDocument(builder, options, document => { var path = Assert.Single(document.Paths.Values); var postOperation = path.Operations[OperationType.Post]; - var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; + var requestSchema = postOperation.RequestBody.Content["application/json"].Schema.GetEffective(document); Assert.Equal("todo", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); var getOperation = path.Operations[OperationType.Get]; - var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; + var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema.GetEffective(document); Assert.False(responseSchema.Extensions.TryGetValue("x-my-extension", out var _)); }); } From 59d4050e7a26326764aa0f008b378f0adbc40efa Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 2 Jul 2024 13:25:49 -0700 Subject: [PATCH 112/257] Update Selenium dependency to 4.22.0 (#56564) --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index f6f87415ed99..22b68940506f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -323,8 +323,8 @@ 1.28.0 3.0.0 7.2.4 - 4.21.0 - 4.21.0 + 4.22.0 + 4.22.0 1.4.0 4.0.0 2.7.27 From 102f4bdbf10aac8dc821a8ef2e00a086a1fcdea6 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Tue, 2 Jul 2024 17:14:29 -0500 Subject: [PATCH 113/257] Simply SignalR Client IAsyncEnumerable usage (#56561) Today we create a separate "cancelable" async enumerable so we can "link" the passed in CancellationTokenSource with the CancellationToken passed into GetAsyncEnumerator. We don't need to do this in this scenario because we are the ones enumerating over the object, and we aren't passing in a CancellationToken during the enumeration. Instead, we can simply enumerate over the supplied IAsyncEnumerable and call WithCancellation, passing in the supplied CancellationTokenSource. --- src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index e111b803d794..93d4c3492b9b 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -899,9 +899,7 @@ private Task SendIAsyncEnumerableStreamItems(ConnectionState connectionState, { async Task ReadAsyncEnumerableStream() { - var streamValues = AsyncEnumerableAdapters.MakeCancelableTypedAsyncEnumerable(stream, tokenSource); - - await foreach (var streamValue in streamValues.ConfigureAwait(false)) + await foreach (var streamValue in stream.WithCancellation(tokenSource.Token).ConfigureAwait(false)) { await SendWithLock(connectionState, new StreamItemMessage(streamId, streamValue), tokenSource.Token).ConfigureAwait(false); Log.SendingStreamItem(_logger, streamId); From 091da452aab1838fd30f6de1decd921326736146 Mon Sep 17 00:00:00 2001 From: gitslav Date: Wed, 3 Jul 2024 02:43:41 +0300 Subject: [PATCH 114/257] Fix comment typos in build props (#56544) --- eng/Build.props | 2 +- eng/Signing.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Build.props b/eng/Build.props index 7312a0fb224d..57f53a3ce17b 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -88,7 +88,7 @@ - diff --git a/eng/Signing.props b/eng/Signing.props index db20e2e9a45f..c8f233696c6f 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -100,7 +100,7 @@ - + From 7390ce748e0df75b963d35b318a4984212254a19 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:08:34 +0000 Subject: [PATCH 115/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#56569) [main] Update dependencies from dotnet/efcore, dotnet/runtime --- eng/Version.Details.xml | 320 ++++++++++++++++++++-------------------- eng/Versions.props | 160 ++++++++++---------- 2 files changed, 240 insertions(+), 240 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f75a6603f3fa..002ec347324d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,325 +9,325 @@ --> - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/efcore - ecd6104d7db803a976116a49d5855bce85634051 + 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - a900bbf6fcf33fa2e799ed599ab86e00d6124c05 + c07a81f90938a8c3ec5b056b78ddd1718dc9931c https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 22b68940506f..1b885a08727c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,92 +67,92 @@ --> - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 - 9.0.0-preview.7.24328.10 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.1 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 - 9.0.0-preview.7.24322.1 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24352.6 4.11.0-1.24218.5 4.11.0-1.24218.5 From 98c4546ddccfe2f62c4dc239fabd0c92848b255d Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Wed, 3 Jul 2024 16:26:26 +0800 Subject: [PATCH 116/257] Add more logging to StreamPool_ManyConcurrentStreams_StreamPoolFull (#56570) --- .../test/QuicConnectionContextTests.cs | 98 ++++++++++++------- .../test/QuicConnectionListenerTests.cs | 2 +- .../test/QuicStreamContextTests.cs | 10 +- 3 files changed, 70 insertions(+), 40 deletions(-) diff --git a/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs b/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs index 52f36132215e..264d7b61d8b9 100644 --- a/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs +++ b/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionContextTests.cs @@ -8,8 +8,8 @@ using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Connections.Features; using Microsoft.AspNetCore.Internal; -using Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Internal; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Internal; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Time.Testing; @@ -325,7 +325,7 @@ public async Task StreamPool_StreamAbortedOnServer_NotPooled() var quicConnectionContext = Assert.IsType(serverConnection); Assert.Equal(0, quicConnectionContext.StreamPool.Count); - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); @@ -368,7 +368,7 @@ public async Task StreamPool_StreamAbortedOnServerAfterComplete_NotPooled() var quicConnectionContext = Assert.IsType(serverConnection); Assert.Equal(0, quicConnectionContext.StreamPool.Count); - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); @@ -413,7 +413,7 @@ public async Task StreamPool_StreamAbortedOnClient_NotPooled() var quicConnectionContext = Assert.IsType(serverConnection); Assert.Equal(0, quicConnectionContext.StreamPool.Count); - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); @@ -462,7 +462,7 @@ public async Task StreamPool_StreamAbortedOnClientAndServer_NotPooled() var quicConnectionContext = Assert.IsType(serverConnection); Assert.Equal(0, quicConnectionContext.StreamPool.Count); - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); @@ -558,6 +558,8 @@ public async Task StreamPool_Heartbeat_ExpiredStreamRemoved() public async Task StreamPool_ManyConcurrentStreams_StreamPoolFull() { // Arrange + using var httpEventSource = new HttpEventSourceListener(LoggerFactory); + await using var connectionListener = await QuicTestHelpers.CreateConnectionListenerFactory(LoggerFactory); var options = QuicTestHelpers.CreateClientConnectionOptions(connectionListener.EndPoint); @@ -580,52 +582,80 @@ public async Task StreamPool_ManyConcurrentStreams_StreamPoolFull() const int StreamsSent = 101; for (var i = 0; i < StreamsSent; i++) { - streamTasks.Add(SendStream(requestState)); + streamTasks.Add(SendStream(Logger, streamIndex: i, requestState)); } + Logger.LogInformation("Waiting for all connections to be received by the server."); await allConnectionsOnServerTcs.Task.DefaultTimeout(); pauseCompleteTcs.SetResult(); + Logger.LogInformation("Waiting for all stream tasks."); await Task.WhenAll(streamTasks).DefaultTimeout(); + Logger.LogInformation("Stream tasks finished."); // Assert // Up to 100 streams are pooled. Assert.Equal(100, quicConnectionContext.StreamPool.Count); - static async Task SendStream(RequestState requestState) + static async Task SendStream(ILogger logger, int streamIndex, RequestState requestState) { - var clientStream = await requestState.QuicConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); - await clientStream.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); - var serverStream = await requestState.ServerConnection.AcceptAsync().DefaultTimeout(); - var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); - serverStream.Transport.Input.AdvanceTo(readResult.Buffer.End); - - // Input should be completed. - readResult = await serverStream.Transport.Input.ReadAsync(); - Assert.True(readResult.IsCompleted); - - lock (requestState) + try { - requestState.ActiveConcurrentConnections++; - if (requestState.ActiveConcurrentConnections == StreamsSent) + logger.LogInformation($"{StreamId(streamIndex)}: Client opening outbound stream."); + await using var clientStream = await requestState.QuicConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + logger.LogInformation($"{StreamId(streamIndex)}: Client writing to stream."); + await clientStream.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); + + logger.LogInformation($"{StreamId(streamIndex)}: Server accepting incoming stream."); + var serverStream = await requestState.ServerConnection.AcceptAsync().DefaultTimeout(); + logger.LogInformation($"{StreamId(streamIndex)}: Server reading data."); + var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); + serverStream.Transport.Input.AdvanceTo(readResult.Buffer.End); + + // Input should be completed. + logger.LogInformation($"{StreamId(streamIndex)}: Server verifying all data received."); + readResult = await serverStream.Transport.Input.ReadAsync(); + Assert.True(readResult.IsCompleted); + + lock (requestState) { - requestState.AllConnectionsOnServerTcs.SetResult(); + requestState.ActiveConcurrentConnections++; + + logger.LogInformation($"{StreamId(streamIndex)}: Increasing active concurrent connections to {requestState.ActiveConcurrentConnections}."); + if (requestState.ActiveConcurrentConnections == StreamsSent) + { + logger.LogInformation($"{StreamId(streamIndex)}: All connections on server."); + requestState.AllConnectionsOnServerTcs.SetResult(); + } } - } - await requestState.PauseCompleteTask; + await requestState.PauseCompleteTask; - // Complete reading and writing. - await serverStream.Transport.Input.CompleteAsync(); - await serverStream.Transport.Output.CompleteAsync(); + // Complete reading and writing. + logger.LogInformation($"{StreamId(streamIndex)}: Server completing reading and writing."); + await serverStream.Transport.Input.CompleteAsync(); + await serverStream.Transport.Output.CompleteAsync(); - var quicStreamContext = Assert.IsType(serverStream); + logger.LogInformation($"{StreamId(streamIndex)}: Client verifying all data received."); + var count = await clientStream.ReadAsync(new byte[1024]); + Assert.Equal(0, count); - // Both send and receive loops have exited. - await quicStreamContext._processingTask.DefaultTimeout(); - await quicStreamContext.DisposeAsync(); - quicStreamContext.Dispose(); + logger.LogInformation($"{StreamId(streamIndex)}: Diposing {nameof(QuicStreamContext)}."); + var quicStreamContext = Assert.IsType(serverStream); + + // Both send and receive loops have exited. + await quicStreamContext._processingTask.DefaultTimeout(); + await quicStreamContext.DisposeAsync(); + quicStreamContext.Dispose(); + } + catch (Exception ex) + { + logger.LogError(ex, $"{StreamId(streamIndex)}: Error."); + throw; + } } + + static string StreamId(int index) => $"Stream-{index}"; } [ConditionalFact] @@ -644,7 +674,7 @@ public async Task PersistentState_StreamsReused_StatePersisted() // Act Logger.LogInformation("Client starting stream 1"); - var clientStream1 = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream1 = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream1.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); Logger.LogInformation("Server accept stream 1"); @@ -672,7 +702,7 @@ public async Task PersistentState_StreamsReused_StatePersisted() quicStreamContext1.Dispose(); Logger.LogInformation("Client starting stream 2"); - var clientStream2 = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream2 = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream2.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); Logger.LogInformation("Server accept stream 2"); @@ -722,7 +752,7 @@ public async Task IProtocolErrorFeature_InvalidErrorCode(long errorCode) await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); // Act - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); diff --git a/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionListenerTests.cs b/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionListenerTests.cs index d4002e4eb2e7..cad3310251e8 100644 --- a/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionListenerTests.cs +++ b/src/Servers/Kestrel/Transport.Quic/test/QuicConnectionListenerTests.cs @@ -126,7 +126,7 @@ public async Task ClientCertificate_Required_Sent_Populated() var serverStreamTask = serverConnection.AcceptAsync().DefaultTimeout(); // Client creates stream - using var clientStream = await quicConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await quicConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); // Server finishes accepting diff --git a/src/Servers/Kestrel/Transport.Quic/test/QuicStreamContextTests.cs b/src/Servers/Kestrel/Transport.Quic/test/QuicStreamContextTests.cs index 0dd698dd2e2a..a3a0c1810406 100644 --- a/src/Servers/Kestrel/Transport.Quic/test/QuicStreamContextTests.cs +++ b/src/Servers/Kestrel/Transport.Quic/test/QuicStreamContextTests.cs @@ -64,7 +64,7 @@ public async Task BidirectionalStream_ReadAborted_NotPooled() await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); // Act - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); var readResult = await serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).DefaultTimeout(); @@ -113,7 +113,7 @@ public async Task BidirectionalStream_ClientAbortedAfterDisposeCalled_NotPooled( // Act Logger.LogInformation("Client starting stream."); - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var readTask = clientStream.ReadUntilEndAsync(); @@ -181,7 +181,7 @@ public async Task BidirectionalStream_ServerWritesDataAndDisposes_ClientReadsDat // Act Logger.LogInformation("Client starting stream."); - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData, completeWrites: true).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); @@ -542,7 +542,7 @@ public async Task IProtocolErrorFeature_InvalidErrorCode(long errorCode) await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); // Act - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); @@ -569,7 +569,7 @@ public async Task IStreamAbortFeature_InvalidErrorCode(long errorCode) await using var serverConnection = await connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); // Act - var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await using var clientStream = await clientConnection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); await clientStream.WriteAsync(TestData).DefaultTimeout(); var serverStream = await serverConnection.AcceptAsync().DefaultTimeout(); From 3dda72ef96fcc06c08898f0428379dc512483e8b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:50:33 +0000 Subject: [PATCH 117/257] Update dependencies from https://github.com/dotnet/efcore build 20240703.1 (#56590) [main] Update dependencies from dotnet/efcore --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 002ec347324d..9be25fe90beb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,38 +9,38 @@ --> - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/efcore - 4649fb31e33a3a083cc399ec4ce4ec3dd77e06a0 + 0337960316a38200faf5e21d06713bc04b48eaa7 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 1b885a08727c..de29cdd88fa3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,14 +145,14 @@ 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 - 9.0.0-preview.7.24352.6 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.1 4.11.0-1.24218.5 4.11.0-1.24218.5 From 79a59a5dc16f74ea43b6599fbfb1fcde23005b20 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:52:04 +0000 Subject: [PATCH 118/257] Update dependencies from https://github.com/dotnet/runtime build 20240702.15 (#56593) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9be25fe90beb..136ecbb2b5a1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore 0337960316a38200faf5e21d06713bc04b48eaa7 - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - c07a81f90938a8c3ec5b056b78ddd1718dc9931c + 1d16fd14fa772621c7b09ebd00f83610207b1abf https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index de29cdd88fa3..64a41a2a555e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 - 9.0.0-preview.7.24352.1 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24352.15 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 From 16fb9434a38e8e19d35ee01c2c238571c6e91502 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:19:10 +0000 Subject: [PATCH 119/257] Update dependencies from https://github.com/dotnet/efcore build 20240703.2 (#56601) [main] Update dependencies from dotnet/efcore --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 136ecbb2b5a1..0eaedd3db4af 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,38 +9,38 @@ --> - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd - + https://github.com/dotnet/efcore - 0337960316a38200faf5e21d06713bc04b48eaa7 + 97d23658be5e87375a8338d36381785721e0b6bd https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 64a41a2a555e..b94afe59dcf7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,14 +145,14 @@ 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 - 9.0.0-preview.7.24353.1 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.2 4.11.0-1.24218.5 4.11.0-1.24218.5 From 8bf997070e8723f0366902651989fe00aa6a3a53 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 4 Jul 2024 12:14:35 +0800 Subject: [PATCH 120/257] Add test for the order of activity and metrics with HTTP requests (#56592) --- .../Internal/HostingApplicationDiagnostics.cs | 5 +- .../HostingApplicationDiagnosticsTests.cs | 52 +++++++++++++++++-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs index a656b804e829..6bd24cc8eee5 100644 --- a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs +++ b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs @@ -208,7 +208,10 @@ public void RequestEnd(HttpContext httpContext, Exception? exception, HostingApp } var activity = context.Activity; - // Always stop activity if it was started + // Always stop activity if it was started. + // The HTTP activity must be stopped after the HTTP request duration metric is recorded. + // This order means the activity is ongoing while the metric is recorded and libraries like OTEL + // can capture the activity as a metric exemplar. if (activity is not null) { StopActivity(httpContext, activity, context.HasDiagnosticListener); diff --git a/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs b/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs index 1d65cb5ec7ec..9f38f34a6ac1 100644 --- a/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs +++ b/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs @@ -156,17 +156,63 @@ public void EventCountersEnabled() } [Fact] - public void MetricsEnabled() + public void Metrics_RequestDuration_RecordedWithHttpActivity() { // Arrange - var hostingEventSource = new HostingEventSource(Guid.NewGuid().ToString()); + Activity measurementActivity = null; + var measureCount = 0; + + // Listen to hosting activity source. + var testSource = new ActivitySource(Path.GetRandomFileName()); + using var activityListener = new ActivityListener + { + ShouldListenTo = activitySource => ReferenceEquals(activitySource, testSource), + Sample = (ref ActivityCreationOptions _) => ActivitySamplingResult.AllData + }; + ActivitySource.AddActivityListener(activityListener); + + // Listen to http.server.request.duration. + var testMeterFactory = new TestMeterFactory(); + var meterListener = new MeterListener(); + meterListener.InstrumentPublished = (i, l) => + { + if (i.Meter.Scope == testMeterFactory && i.Meter.Name == HostingMetrics.MeterName && i.Name == "http.server.request.duration") + { + l.EnableMeasurementEvents(i); + } + }; + meterListener.SetMeasurementEventCallback((i, m, t, s) => + { + if (Interlocked.Increment(ref measureCount) > 1) + { + throw new Exception("Unexpected measurement count."); + } + + measurementActivity = Activity.Current; + }); + meterListener.Start(); + + // Act + var hostingApplication = CreateApplication(out var features, activitySource: testSource, meterFactory: testMeterFactory); + var context = hostingApplication.CreateContext(features); + hostingApplication.DisposeContext(context, null); + // Assert + Assert.Equal(1, measureCount); + Assert.NotNull(measurementActivity); + Assert.Equal(HostingApplicationDiagnostics.ActivityName, measurementActivity.OperationName); + } + + [Fact] + public void MetricsEnabled() + { + // Arrange var testMeterFactory = new TestMeterFactory(); using var activeRequestsCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.active_requests"); using var requestDurationCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.request.duration"); // Act - var hostingApplication = CreateApplication(out var features, eventSource: hostingEventSource, meterFactory: testMeterFactory); + var hostingApplication = CreateApplication(out var features, meterFactory: testMeterFactory); var context = hostingApplication.CreateContext(features); // Assert From 75368e2d448d34180e55857cfd98aa080435d309 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 4 Jul 2024 14:35:01 +0800 Subject: [PATCH 121/257] Add named pipes methods to Kestrel configuration loader (#56563) --- .../Core/src/KestrelConfigurationLoader.cs | 21 +++++++++++++++++++ .../Kestrel/Core/src/PublicAPI.Unshipped.txt | 2 ++ .../test/KestrelConfigurationLoaderTests.cs | 17 +++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs b/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs index 9b71c5127fcd..49842d4c3389 100644 --- a/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs +++ b/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs @@ -191,6 +191,27 @@ public KestrelConfigurationLoader UnixSocketEndpoint(string socketPath, Action + /// Bind to given named pipe. + /// + public KestrelConfigurationLoader NamedPipeEndpoint(string pipeName) => NamedPipeEndpoint(pipeName, _ => { }); + + /// + /// Bind to given named pipe. + /// + public KestrelConfigurationLoader NamedPipeEndpoint(string pipeName, Action configure) + { + ArgumentNullException.ThrowIfNull(pipeName); + ArgumentNullException.ThrowIfNull(configure); + + EndpointsToAdd.Add(() => + { + Options.ListenNamedPipe(pipeName, configure); + }); + + return this; + } + /// /// Open a socket file descriptor. /// diff --git a/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt b/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..562e688fc91b 100644 --- a/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt +++ b/src/Servers/Kestrel/Core/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.NamedPipeEndpoint(string! pipeName) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! +Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader.NamedPipeEndpoint(string! pipeName, System.Action! configure) -> Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader! diff --git a/src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs b/src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs index d5138fd5688d..641ab4d4d079 100644 --- a/src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs +++ b/src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs @@ -1844,6 +1844,23 @@ public void ReloadDoesNotAddEndpoints() _ = serverOptions.ConfigurationLoader.Reload(); } + [Fact] + public void AddNamedPipeEndpoint() + { + var serverOptions = CreateServerOptions(); + var builder = serverOptions.Configure() + .NamedPipeEndpoint("abc"); + + Assert.Empty(serverOptions.GetListenOptions()); + Assert.Equal(builder, serverOptions.ConfigurationLoader); + + builder.Load(); + + Assert.Single(serverOptions.GetListenOptions()); + Assert.Equal("abc", serverOptions.CodeBackedListenOptions[0].PipeName); + Assert.NotNull(serverOptions.ConfigurationLoader); + } + private static string GetCertificatePath() { var appData = Environment.GetEnvironmentVariable("APPDATA"); From b0df1001803bd65403cb52719c5c1e6c223473b9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:17:35 +0000 Subject: [PATCH 122/257] [main] Update dependencies from dotnet/efcore (#56614) [main] Update dependencies from dotnet/efcore --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0eaedd3db4af..af7dc421f6eb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,38 +9,38 @@ --> - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df - + https://github.com/dotnet/efcore - 97d23658be5e87375a8338d36381785721e0b6bd + ac7380ef5962a06314491ff6412945a84ca8f2df https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index b94afe59dcf7..e47719a318b6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,14 +145,14 @@ 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 - 9.0.0-preview.7.24353.2 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24353.5 4.11.0-1.24218.5 4.11.0-1.24218.5 From a4e80840b500ea51b6a63bcc6429ec54d9ae72b9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:56:22 +0000 Subject: [PATCH 123/257] Update dependencies from https://github.com/dotnet/efcore build 20240704.1 (#56626) [main] Update dependencies from dotnet/efcore --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af7dc421f6eb..0478a85a5266 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,38 +9,38 @@ --> - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/efcore - ac7380ef5962a06314491ff6412945a84ca8f2df + ec42520f1717d410314bfca41aba9f4cd04f7ab3 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index e47719a318b6..0d50030b3c68 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,14 +145,14 @@ 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 - 9.0.0-preview.7.24353.5 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24354.1 4.11.0-1.24218.5 4.11.0-1.24218.5 From 7c5a46712279dea7a99c992e5ec12fe065d843ca Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 00:28:32 +0000 Subject: [PATCH 124/257] [main] Update dependencies from dotnet/source-build-reference-packages (#56506) * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240627.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24327.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240627.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24327.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240627.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24327.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240627.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24327.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240627.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24327.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240702.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24352.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240702.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24304.1 -> To Version 9.0.0-alpha.1.24352.1 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Igor Velikorossov --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0478a85a5266..40bf4f8e1ca6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -339,9 +339,9 @@ 0d51607fb791c51a14b552ed24fe3430c252148b - + https://github.com/dotnet/source-build-reference-packages - 9ae78a4e6412926d19ba97cfed159bf9de70b538 + cc732c57199f725857c201da146525e3be6bc504 diff --git a/eng/Versions.props b/eng/Versions.props index 0d50030b3c68..2d614674771c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -172,7 +172,7 @@ 9.0.0-alpha.1.24324.1 - 9.0.0-alpha.1.24304.1 + 9.0.0-alpha.1.24352.1 2.2.0-beta.24327.2 From b0ea53411230be27ef6faeda23990db3e7af2c34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 04:36:39 +0000 Subject: [PATCH 125/257] [main] (deps): Bump src/submodules/googletest (#56232) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `a7f443b` to `1d17ea1`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/a7f443b80b105f940225332ed3c31f2790092f47...1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../RazorRuntimeCompilationHostingStartupTest.cs | 1 + src/submodules/googletest | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs index 8d2fa13ea0e1..a9826634983f 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorRuntimeCompilationHostingStartupTest.cs @@ -47,6 +47,7 @@ public override void Dispose() public HttpClient Client { get; private set; } [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/56553")] public async Task RazorViews_CanBeServedAndUpdatedViaRuntimeCompilation() { // Arrange diff --git a/src/submodules/googletest b/src/submodules/googletest index a7f443b80b10..1d17ea141d2c 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit a7f443b80b105f940225332ed3c31f2790092f47 +Subproject commit 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2 From 2291eaf3d92fc55f02bdf456df54284b1a44460d Mon Sep 17 00:00:00 2001 From: Andrew J Said Date: Fri, 5 Jul 2024 14:09:43 +0100 Subject: [PATCH 126/257] [Blazor] Optimize RouteTableFactory.DetectAmbiguous routes (#56415) * Uses a HashSet to keep track of existing routes and checks it before adding a new route. --- ...t.AspNetCore.Components.Performance.csproj | 3 +- .../perf/RouteTableFactoryBenchmarks.cs | 83 +++++++++++ .../src/Routing/RouteTableFactory.cs | 136 +++++++++++------- .../test/Routing/RouteTableFactoryTests.cs | 18 +++ 4 files changed, 185 insertions(+), 55 deletions(-) create mode 100644 src/Components/Components/perf/RouteTableFactoryBenchmarks.cs diff --git a/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj b/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj index f40a0a40987a..c2e4bddac209 100644 --- a/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj +++ b/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj @@ -1,4 +1,4 @@ - + $(DefaultNetCoreTargetFramework) @@ -10,6 +10,7 @@ + diff --git a/src/Components/Components/perf/RouteTableFactoryBenchmarks.cs b/src/Components/Components/perf/RouteTableFactoryBenchmarks.cs new file mode 100644 index 000000000000..0bd284244a30 --- /dev/null +++ b/src/Components/Components/perf/RouteTableFactoryBenchmarks.cs @@ -0,0 +1,83 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using BenchmarkDotNet.Attributes; +using Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.AspNetCore.Components.Performance; + +public class RouteTableFactoryBenchmarks +{ + private const int NumRoutes = 3000; + + private IServiceProvider _serviceProvider; + private Dictionary _templatesByHandler; + + public RouteTableFactoryBenchmarks() + { + _serviceProvider = new ServiceCollection() + .AddLogging() + .BuildServiceProvider(); + + _templatesByHandler = new Dictionary + { + { typeof(object), GenerateRoutes() } + }; + } + + private string[] GenerateRoutes() + { + ReadOnlySpan segments1 = ["first", "second", "third", "fourth", "fifth", "sixth", "{parameter1}"]; + ReadOnlySpan segments2 = ["apple", "banana", "cake", "dates", "eggs", "flour", "{parameter2}"]; + ReadOnlySpan segments3 = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "{parameter3}"]; + ReadOnlySpan segments4 = ["create", "read", "update", "delete", "list"]; + + var routes = new string[NumRoutes]; + var i = 0; + + foreach (var segment1 in segments1) + { + if (i >= routes.Length) + { + break; + } + routes[i++] = $"/{segment1}"; + + foreach (var segment2 in segments2) + { + if (i >= routes.Length) + { + break; + } + + routes[i++] = $"/{segment1}/{segment2}"; + + foreach (var segment3 in segments3) + { + if (i >= routes.Length) + { + break; + } + + routes[i++] = $"/{segment1}/{segment2}/{segment3}"; + + foreach (var segment4 in segments4) + { + if (i >= routes.Length) + { + break; + } + + routes[i++] = $"/{segment1}/{segment2}/{segment3}/{segment4}"; + } + } + } + } + + return routes; + } + + [Benchmark] + public object CreateRouteTable() => RouteTableFactory.Create(_templatesByHandler, _serviceProvider); + +} diff --git a/src/Components/Components/src/Routing/RouteTableFactory.cs b/src/Components/Components/src/Routing/RouteTableFactory.cs index 17074e267e5e..0d07baaa531a 100644 --- a/src/Components/Components/src/Routing/RouteTableFactory.cs +++ b/src/Components/Components/src/Routing/RouteTableFactory.cs @@ -6,14 +6,14 @@ using System.Reflection; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Routing; -using Microsoft.AspNetCore.Routing.Template; +using Microsoft.AspNetCore.Routing.Constraints; using Microsoft.AspNetCore.Routing.Patterns; +using Microsoft.AspNetCore.Routing.Template; using Microsoft.AspNetCore.Routing.Tree; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using static Microsoft.AspNetCore.Internal.LinkerFlags; -using Microsoft.AspNetCore.Routing.Constraints; namespace Microsoft.AspNetCore.Components; @@ -197,66 +197,28 @@ internal static InboundRouteEntry CreateEntry([DynamicallyAccessedMembers(Compon UnusedRouteParameterNames = GetUnusedParameterNames(result.AllRouteParameterNames, routeParameterNames!), }; } - private static void DetectAmbiguousRoutes(TreeRouteBuilder builder) { - for (var i = 0; i < builder.InboundEntries.Count; i++) - { - var left = builder.InboundEntries[i]; - for (var j = i + 1; j < builder.InboundEntries.Count; j++) - { - var right = builder.InboundEntries[j]; - var leftText = left.RoutePattern.RawText!.Trim('/'); - var rightText = right.RoutePattern.RawText!.Trim('/'); - if (left.Precedence != right.Precedence) - { - continue; - } + var seen = new HashSet(new InboundRouteEntryAmbiguityEqualityComparer()); + seen.EnsureCapacity(builder.InboundEntries.Count); - var ambiguous = CompareSegments(left, right); - if (ambiguous) - { - throw new InvalidOperationException($@"The following routes are ambiguous: -'{leftText}' in '{left.Handler.FullName}' -'{rightText}' in '{right.Handler.FullName}' -"); - } - } - } - } - - private static bool CompareSegments(InboundRouteEntry left, InboundRouteEntry right) - { - var ambiguous = true; - for (var k = 0; k < left.RoutePattern.PathSegments.Count; k++) + for (var i = 0; i < builder.InboundEntries.Count; i++) { - var leftSegment = left.RoutePattern.PathSegments[k]; - var rightSegment = right.RoutePattern.PathSegments[k]; - if (leftSegment.Parts.Count != rightSegment.Parts.Count) - { - ambiguous = false; - break; - } + var current = builder.InboundEntries[i]; - for (var l = 0; l < leftSegment.Parts.Count; l++) - { - var leftPart = leftSegment.Parts[l]; - var rightPart = rightSegment.Parts[l]; - if (leftPart is RoutePatternLiteralPart leftLiteral && - rightPart is RoutePatternLiteralPart rightLiteral && - !string.Equals(leftLiteral.Content, rightLiteral.Content, StringComparison.OrdinalIgnoreCase)) - { - ambiguous = false; - break; - } - } - if (!ambiguous) + if (!seen.Add(current)) { - break; + seen.TryGetValue(current, out var existing); + var existingText = existing!.RoutePattern.RawText!.Trim('/'); + var currentText = current.RoutePattern.RawText!.Trim('/'); + throw new InvalidOperationException($""" + The following routes are ambiguous: + '{existingText}' in '{existing.Handler.FullName}' + '{currentText}' in '{current.Handler.FullName}' + + """); } } - - return ambiguous; } private static HashSet GetParameterNames(RoutePattern routeTemplate) @@ -334,4 +296,70 @@ internal static int RouteComparison(InboundRouteEntry x, InboundRouteEntry y) _ => throw new InvalidOperationException("Invalid comparison result."), }; } + + private sealed class InboundRouteEntryAmbiguityEqualityComparer : IEqualityComparer + { + public bool Equals(InboundRouteEntry? x, InboundRouteEntry? y) + { + if (x is null) + { + return y is null; + } + + if (y is null) + { + return false; + } + + if (x.Precedence != y.Precedence) + { + return false; + } + + for (var k = 0; k < x.RoutePattern.PathSegments.Count; k++) + { + var leftSegment = x.RoutePattern.PathSegments[k]; + var rightSegment = y.RoutePattern.PathSegments[k]; + if (leftSegment.Parts.Count != rightSegment.Parts.Count) + { + return false; + } + + for (var l = 0; l < leftSegment.Parts.Count; l++) + { + var leftPart = leftSegment.Parts[l]; + var rightPart = rightSegment.Parts[l]; + if (leftPart is RoutePatternLiteralPart leftLiteral && + rightPart is RoutePatternLiteralPart rightLiteral && + !string.Equals(leftLiteral.Content, rightLiteral.Content, StringComparison.OrdinalIgnoreCase)) + { + return false; + } + } + } + + return true; + } + + public int GetHashCode(InboundRouteEntry obj) + { + var hashCode = new HashCode(); + hashCode.Add(obj.Precedence); + + for (var i = 0; i < obj.RoutePattern.PathSegments.Count; i++) + { + var segment = obj.RoutePattern.PathSegments[i]; + for (var j = 0; j < segment.Parts.Count; j++) + { + var part = segment.Parts[j]; + if (part is RoutePatternLiteralPart literal) + { + hashCode.Add(literal.Content, StringComparer.OrdinalIgnoreCase); + } + } + } + + return hashCode.ToHashCode(); + } + } } diff --git a/src/Components/Components/test/Routing/RouteTableFactoryTests.cs b/src/Components/Components/test/Routing/RouteTableFactoryTests.cs index 6968bf2a59ba..2e955ab78c40 100644 --- a/src/Components/Components/test/Routing/RouteTableFactoryTests.cs +++ b/src/Components/Components/test/Routing/RouteTableFactoryTests.cs @@ -1029,8 +1029,10 @@ public void DoesNotThrowIfStableSortComparesRouteWithItself() [Theory] [InlineData("/literal", "/Literal/")] [InlineData("/{parameter}", "/{parameter}/")] + [InlineData("/{parameter}part", "/part{parameter}")] [InlineData("/literal/{parameter}", "/Literal/{something}")] [InlineData("/{parameter}/literal/{something}", "{param}/Literal/{else}")] + [InlineData("/{parameter}part/literal/part{something}", "{param}Part/Literal/part{else}")] public void DetectsAmbiguousRoutes(string left, string right) { // Arrange @@ -1046,6 +1048,22 @@ public void DetectsAmbiguousRoutes(string left, string right) Assert.Equal(expectedMessage, exception.Message); } + [Theory] + [InlineData("/literal/{parameter}", "/Literal/")] + [InlineData("/literal/literal2/{parameter}", "/literal/literal3/{parameter}")] + [InlineData("/literal/part{parameter}part", "/literal/part{parameter}")] + [InlineData("/{parameter}", "/{{parameter}}")] + public void DetectsAmbiguousRoutesNoFalsePositives(string left, string right) + { + // Act + + new TestRouteTableBuilder() + .AddRoute(left) + .AddRoute(right).Build(); + + // Assertion is that it doesn't throw + } + [Fact] public void SuppliesNullForUnusedHandlerParameters() { From 06533a6b6d2142fd083279e6e4c74d811a467476 Mon Sep 17 00:00:00 2001 From: yepeekai Date: Fri, 5 Jul 2024 11:14:25 -0400 Subject: [PATCH 127/257] [Runtime compilation] ChecksumValidator: Support checksum SHA256 even when the metadata uses Sha256 (#54446) * ChecksumValidator: Support checksum SHA256 even when the metadata indicate Sha256 --- .../src/ChecksumValidator.cs | 21 +++++++++---------- .../test/ChecksumValidatorTest.cs | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/ChecksumValidator.cs b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/ChecksumValidator.cs index c196a93f69a5..794f2694e63e 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/ChecksumValidator.cs +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/ChecksumValidator.cs @@ -56,7 +56,7 @@ public static bool IsItemValid(RazorProjectFileSystem fileSystem, RazorCompiledI } var sourceDocumentChecksum = ComputeChecksum(projectItem, primaryChecksum.ChecksumAlgorithm); - if (!string.Equals(sourceDocumentChecksum.algorithm, primaryChecksum.ChecksumAlgorithm) || + if (!string.Equals(sourceDocumentChecksum.algorithm, primaryChecksum.ChecksumAlgorithm, StringComparison.OrdinalIgnoreCase) || !ChecksumsEqual(primaryChecksum.Checksum, sourceDocumentChecksum.checksum)) { // Main file exists, but checksums not equal. @@ -80,7 +80,7 @@ public static bool IsItemValid(RazorProjectFileSystem fileSystem, RazorCompiledI } sourceDocumentChecksum = ComputeChecksum(importItem, checksum.ChecksumAlgorithm); - if (!string.Equals(sourceDocumentChecksum.algorithm, checksum.ChecksumAlgorithm) || + if (!string.Equals(sourceDocumentChecksum.algorithm, checksum.ChecksumAlgorithm, StringComparison.OrdinalIgnoreCase) || !ChecksumsEqual(checksum.Checksum, sourceDocumentChecksum.checksum)) { // Import file exists, but checksums not equal. @@ -99,16 +99,15 @@ private static (byte[] checksum, string algorithm) ComputeChecksum(RazorProjectI string algorithmName; //only SHA1 and SHA256 are supported. Default to SHA1 - switch (checksumAlgorithm) + if (nameof(SHA256).Equals(checksumAlgorithm, StringComparison.OrdinalIgnoreCase)) { - case nameof(SHA256): - hashData = SHA256.HashData; - algorithmName = nameof(SHA256); - break; - default: - hashData = SHA1.HashData; - algorithmName = nameof(SHA1); - break; + hashData = SHA256.HashData; + algorithmName = nameof(SHA256); + } + else + { + hashData = SHA1.HashData; + algorithmName = nameof(SHA1); } using (var stream = projectItem.Read()) diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/test/ChecksumValidatorTest.cs b/src/Mvc/Mvc.Razor.RuntimeCompilation/test/ChecksumValidatorTest.cs index 409847ad0c9f..d631f220d885 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/test/ChecksumValidatorTest.cs +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/test/ChecksumValidatorTest.cs @@ -194,7 +194,7 @@ public void IsItemValid_AllFilesMatch_UsingSHA256_ReturnsTrue() { new RazorSourceChecksumAttribute("SHA256", GetChecksumSHA256("some other import"), "/Views/_ViewImports.cstml"), new RazorSourceChecksumAttribute("SHA1", GetChecksum("some import"), "/Views/Home/_ViewImports.cstml"), - new RazorSourceChecksumAttribute("SHA256", GetChecksumSHA256("some content"), "/Views/Home/Index.cstml"), + new RazorSourceChecksumAttribute("Sha256", GetChecksumSHA256("some content"), "/Views/Home/Index.cstml"), }); ProjectFileSystem.Add(new TestRazorProjectItem("/Views/Home/Index.cstml", "some content")); From b2964edef167068d67a9890a3a9383177a40587a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:22:10 +0000 Subject: [PATCH 128/257] Update dependencies from https://github.com/dotnet/runtime build 20240705.1 (#56645) [main] Update dependencies from dotnet/runtime --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 40bf4f8e1ca6..1b24b06b49a7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore ec42520f1717d410314bfca41aba9f4cd04f7ab3 - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 1d16fd14fa772621c7b09ebd00f83610207b1abf + ceac9f48c610d62857a66f5f0d63901dd43c3bcb https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 2d614674771c..8f33e87e80b3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 - 9.0.0-preview.7.24352.15 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.1 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 From ebc0c700ce8f1f568bf6a26affa5ee88e664833e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 20:27:20 +0000 Subject: [PATCH 129/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#56655) [main] Update dependencies from dotnet/efcore, dotnet/runtime - Disable SYSLIB0057 for now to unblock code flow - Disable SYSLIB0057 in trimming tests too --- eng/Version.Details.xml | 320 +++++++++--------- eng/Versions.props | 160 ++++----- eng/Workarounds.props | 5 + .../linker/SupportFiles/Directory.Build.props | 2 + 4 files changed, 247 insertions(+), 240 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1b24b06b49a7..34db7458bb32 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,325 +9,325 @@ --> - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/efcore - ec42520f1717d410314bfca41aba9f4cd04f7ab3 + 09247f41aeff1a862c39f8db640ef43eb06bb9b3 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - ceac9f48c610d62857a66f5f0d63901dd43c3bcb + a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 8f33e87e80b3..a3885aac464d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,92 +67,92 @@ --> - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 - 9.0.0-preview.7.24355.1 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24355.8 9.0.0-preview.6.24330.1 9.0.0-preview.6.24330.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 - 9.0.0-preview.7.24354.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24357.1 4.11.0-1.24218.5 4.11.0-1.24218.5 diff --git a/eng/Workarounds.props b/eng/Workarounds.props index a9561f837698..b3ff8f3b82cc 100644 --- a/eng/Workarounds.props +++ b/eng/Workarounds.props @@ -30,6 +30,11 @@ $(NoWarn);NETSDK1138;CS8969 + + + $(NoWarn);SYSLIB0057 + + false diff --git a/eng/testing/linker/SupportFiles/Directory.Build.props b/eng/testing/linker/SupportFiles/Directory.Build.props index d6d239916bed..acff56b5d77e 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.props +++ b/eng/testing/linker/SupportFiles/Directory.Build.props @@ -9,6 +9,8 @@ true true + + $(NoWarn);SYSLIB0057 win osx From 1e43214cda81f0929276d108f681137988f67a27 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:14:50 +0000 Subject: [PATCH 130/257] Update dependencies from https://github.com/dotnet/arcade build 20240702.2 (#56666) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 24 ++++++++--------- eng/Versions.props | 8 +++--- eng/common/core-templates/job/job.yml | 24 +++-------------- .../job/source-index-stage1.yml | 16 ++---------- .../steps/component-governance.yml | 2 +- eng/common/templates/job/job.yml | 26 +++++++++++++++++++ global.json | 4 +-- 7 files changed, 50 insertions(+), 54 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 34db7458bb32..50c3df882356 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -388,31 +388,31 @@ https://github.com/dotnet/winforms 2a6733dc972bbe0e4bb0489385fb7ce42163bf66 - + https://github.com/dotnet/arcade - ede13bd35571c0c8b0c01edcb057031904c5c955 + 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/arcade - ede13bd35571c0c8b0c01edcb057031904c5c955 + 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/arcade - ede13bd35571c0c8b0c01edcb057031904c5c955 + 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/arcade - ede13bd35571c0c8b0c01edcb057031904c5c955 + 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/arcade - ede13bd35571c0c8b0c01edcb057031904c5c955 + 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/arcade - ede13bd35571c0c8b0c01edcb057031904c5c955 + 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index a3885aac464d..1bbee5683b1e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -165,10 +165,10 @@ 6.2.4 6.2.4 - 9.0.0-beta.24327.1 - 9.0.0-beta.24327.1 - 9.0.0-beta.24327.1 - 9.0.0-beta.24327.1 + 9.0.0-beta.24352.2 + 9.0.0-beta.24352.2 + 9.0.0-beta.24352.2 + 9.0.0-beta.24352.2 9.0.0-alpha.1.24324.1 diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 7df58527978b..c732bee9f4a6 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -24,12 +24,11 @@ parameters: enablePublishTestResults: false enablePublishUsingPipelines: false enableBuildRetry: false - disableComponentGovernance: '' - componentGovernanceIgnoreDirectories: '' mergeTestResults: false testRunTitle: '' testResultsFormat: '' name: '' + componentGovernanceSteps: [] preSteps: [] artifactPublishSteps: [] runAsPublic: false @@ -170,17 +169,8 @@ jobs: uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} continueOnError: true - - template: /eng/common/core-templates/steps/component-governance.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - ${{ if eq(parameters.disableComponentGovernance, '') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - disableComponentGovernance: false - ${{ else }}: - disableComponentGovernance: true - ${{ else }}: - disableComponentGovernance: ${{ parameters.disableComponentGovernance }} - componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + - ${{ each step in parameters.componentGovernanceSteps }}: + - ${{ step }} - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -190,14 +180,6 @@ jobs: continueOnError: ${{ parameters.continueOnError }} env: TeamName: $(_TeamName) - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - - template: /eng/common/core-templates/steps/generate-sbom.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - PackageVersion: ${{ parameters.packageVersion}} - BuildDropPath: ${{ parameters.buildDropPath }} - IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - publishArtifacts: false # Publish test results - ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}: diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 8328e52ab100..945c1c19e824 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -69,23 +69,11 @@ jobs: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: AzureCLI@2 - displayName: Get stage 1 auth token + displayName: Log in to Azure and upload stage1 artifacts to source index inputs: azureSubscription: 'SourceDotNet Stage1 Publish' addSpnToEnvironment: true scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" - - - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" - az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) - displayName: "Login to Azure" - - - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index + $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 diff --git a/eng/common/core-templates/steps/component-governance.yml b/eng/common/core-templates/steps/component-governance.yml index b8815892a5ef..cf0649aa9565 100644 --- a/eng/common/core-templates/steps/component-governance.yml +++ b/eng/common/core-templates/steps/component-governance.yml @@ -13,4 +13,4 @@ steps: continueOnError: true displayName: ${{ parameters.displayName }} inputs: - ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} \ No newline at end of file + ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 5920952c5ba6..8da477dd69f0 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -1,5 +1,11 @@ parameters: enablePublishBuildArtifacts: false + disableComponentGovernance: '' + componentGovernanceIgnoreDirectories: '' +# Sbom related params + enableSbom: true + PackageVersion: 9.0.0 + BuildDropPath: '$(Build.SourcesDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml @@ -13,6 +19,26 @@ jobs: steps: - ${{ each step in parameters.steps }}: - ${{ step }} + + componentGovernanceSteps: + - template: /eng/common/templates/steps/component-governance.yml + parameters: + ${{ if eq(parameters.disableComponentGovernance, '') }}: + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + disableComponentGovernance: false + ${{ else }}: + disableComponentGovernance: true + ${{ else }}: + disableComponentGovernance: ${{ parameters.disableComponentGovernance }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: + - template: /eng/common/templates/steps/generate-sbom.yml + parameters: + PackageVersion: ${{ parameters.packageVersion }} + BuildDropPath: ${{ parameters.buildDropPath }} + publishArtifacts: false + artifactPublishSteps: - ${{ if ne(parameters.artifacts.publish, '') }}: diff --git a/global.json b/global.json index ded4dfedc28c..1596ce958d63 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ "jdk": "11" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24327.1", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24327.1" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24352.2", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24352.2" } } From 430ea298c5ffb5533c3262b6937a04bf02ce2ee4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:27:09 +0000 Subject: [PATCH 131/257] Update dependencies from https://github.com/dotnet/extensions build 20240706.1 (#56668) [main] Update dependencies from dotnet/extensions --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 50c3df882356..24650fba5cae 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -414,13 +414,13 @@ https://github.com/dotnet/arcade 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/extensions - 31c8654250e85ad161cf88b7cffbe31f3a406ce6 + 2c8a4c17e2661224b460ae3d4c4ffc2019a059f8 - + https://github.com/dotnet/extensions - 31c8654250e85ad161cf88b7cffbe31f3a406ce6 + 2c8a4c17e2661224b460ae3d4c4ffc2019a059f8 https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index 1bbee5683b1e..8e17da62958c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -142,8 +142,8 @@ 9.0.0-preview.7.24355.8 9.0.0-preview.7.24355.8 - 9.0.0-preview.6.24330.1 - 9.0.0-preview.6.24330.1 + 9.0.0-preview.7.24356.1 + 9.0.0-preview.7.24356.1 9.0.0-preview.7.24357.1 9.0.0-preview.7.24357.1 From fed7b428b2c34cc1850557111f945e4cbe5d1268 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:39:49 +0000 Subject: [PATCH 132/257] Update dependencies from https://github.com/dotnet/winforms build 20240707.1 (#56669) [main] Update dependencies from dotnet/winforms --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 24650fba5cae..0b5ccb498db0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -384,9 +384,9 @@ https://github.com/dotnet/runtime a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 - + https://github.com/dotnet/winforms - 2a6733dc972bbe0e4bb0489385fb7ce42163bf66 + 10f120ddca8dc60568e4b9cb93667e90746aade3 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 8e17da62958c..12c07f47fdcf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,7 +176,7 @@ 2.2.0-beta.24327.2 - 9.0.0-preview.7.24329.1 + 9.0.0-preview.7.24357.1 9.0.0-preview.24317.2 9.0.0-preview.24317.2 From c6de65938f906cd0b17bb846b555abe3b7e73d35 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:44:09 +0000 Subject: [PATCH 133/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#56665) [main] Update dependencies from dotnet/efcore, dotnet/runtime --- eng/Version.Details.xml | 320 ++++++++++++++++++++-------------------- eng/Versions.props | 160 ++++++++++---------- 2 files changed, 240 insertions(+), 240 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0b5ccb498db0..795637181bfd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,325 +9,325 @@ --> - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/efcore - 09247f41aeff1a862c39f8db640ef43eb06bb9b3 + a4aa68d9a505b22fdb2476a0e0bb87fda56d111c - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - a7efcd9ca9255dc9faa8b4a2761cdfdb62619610 + 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 12c07f47fdcf..16db19a0523f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,92 +67,92 @@ --> - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 - 9.0.0-preview.7.24355.8 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24357.2 9.0.0-preview.7.24356.1 9.0.0-preview.7.24356.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 - 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.2 4.11.0-1.24218.5 4.11.0-1.24218.5 From 7f9b45ec56e8f060a267077adf9a9ed50c4a361f Mon Sep 17 00:00:00 2001 From: joegoldman2 <147369450+joegoldman2@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:59:02 +0000 Subject: [PATCH 134/257] Add overloads for problem and validation problem results that accept `IEnumerable>` (#56368) --- .../HttpValidationProblemDetails.cs | 9 +++ .../src/PublicAPI.Unshipped.txt | 1 + .../src/PublicAPI.Unshipped.txt | 1 + .../Http.Results/src/PublicAPI.Unshipped.txt | 14 +++- src/Http/Http.Results/src/Results.cs | 55 ++++++++++++- src/Http/Http.Results/src/TypedResults.cs | 72 ++++++++++++++--- src/Http/Http.Results/test/ResultsTests.cs | 79 +++++++++++++++++++ .../Http.Results/test/TypedResultsTests.cs | 50 ++++++++++++ 8 files changed, 264 insertions(+), 17 deletions(-) diff --git a/src/Http/Http.Abstractions/src/ProblemDetails/HttpValidationProblemDetails.cs b/src/Http/Http.Abstractions/src/ProblemDetails/HttpValidationProblemDetails.cs index 99d07781b92a..430a4dc279b1 100644 --- a/src/Http/Http.Abstractions/src/ProblemDetails/HttpValidationProblemDetails.cs +++ b/src/Http/Http.Abstractions/src/ProblemDetails/HttpValidationProblemDetails.cs @@ -24,6 +24,15 @@ public HttpValidationProblemDetails() /// /// The validation errors. public HttpValidationProblemDetails(IDictionary errors) + : this((IEnumerable>)errors) + { + } + + /// + /// Initializes a new instance of using the specified . + /// + /// The validation errors. + public HttpValidationProblemDetails(IEnumerable> errors) : this(new Dictionary(errors ?? throw new ArgumentNullException(nameof(errors)), StringComparer.Ordinal)) { } diff --git a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt index 5c05a9b9562b..b08a98e0390c 100644 --- a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt @@ -3,3 +3,4 @@ Microsoft.AspNetCore.Http.HostString.HostString(string? value) -> void *REMOVED*Microsoft.AspNetCore.Http.HostString.Value.get -> string! Microsoft.AspNetCore.Http.HostString.Value.get -> string? +Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void diff --git a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..61c6112ae413 100644 --- a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt @@ -1 +1,2 @@ #nullable enable +Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) diff --git a/src/Http/Http.Results/src/PublicAPI.Unshipped.txt b/src/Http/Http.Results/src/PublicAPI.Unshipped.txt index 83875c87a8b5..c68c37c4f19c 100644 --- a/src/Http/Http.Results/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Results/src/PublicAPI.Unshipped.txt @@ -8,5 +8,17 @@ Microsoft.AspNetCore.Http.HttpResults.InternalServerError.StatusCode.get Microsoft.AspNetCore.Http.HttpResults.InternalServerError.Value.get -> TValue? static Microsoft.AspNetCore.Http.Results.InternalServerError() -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.Results.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.IResult! +*REMOVED*static Microsoft.AspNetCore.Http.Results.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.Problem(string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.IResult! +*REMOVED*static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.IResult! +static Microsoft.AspNetCore.Http.Results.ValidationProblem(System.Collections.Generic.IEnumerable>! errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.IResult! static Microsoft.AspNetCore.Http.TypedResults.InternalServerError() -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! -static Microsoft.AspNetCore.Http.TypedResults.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! \ No newline at end of file +static Microsoft.AspNetCore.Http.TypedResults.InternalServerError(TValue? error) -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError! +static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! +*REMOVED*static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! +static Microsoft.AspNetCore.Http.TypedResults.Problem(string? detail, string? instance, int? statusCode, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult! +*REMOVED*static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail = null, string? instance = null, string? title = null, string? type = null, System.Collections.Generic.IDictionary? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! +static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IDictionary! errors, string? detail, string? instance, string? title, string? type, System.Collections.Generic.IDictionary? extensions) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! +static Microsoft.AspNetCore.Http.TypedResults.ValidationProblem(System.Collections.Generic.IEnumerable>! errors, string? detail = null, string? instance = null, string? title = null, string? type = null, System.Collections.Generic.IEnumerable>? extensions = null) -> Microsoft.AspNetCore.Http.HttpResults.ValidationProblem! diff --git a/src/Http/Http.Results/src/Results.cs b/src/Http/Http.Results/src/Results.cs index a033e10d2af4..662fe0769cce 100644 --- a/src/Http/Http.Results/src/Results.cs +++ b/src/Http/Http.Results/src/Results.cs @@ -712,12 +712,33 @@ public static IResult InternalServerError(TValue? error) /// The value for . /// The created for the response. public static IResult Problem( + string? detail, + string? instance, + int? statusCode, + string? title, + string? type, + IDictionary? extensions) + => TypedResults.Problem(detail, instance, statusCode, title, type, extensions); + + /// + /// Produces a response. + /// + /// The value for . + /// The value for . + /// The value for . + /// The value for . + /// The value for . + /// The value for . + /// The created for the response. +#pragma warning disable RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads + public static IResult Problem( +#pragma warning restore RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, - IDictionary? extensions = null) + IEnumerable>? extensions = null) => TypedResults.Problem(detail, instance, statusCode, title, type, extensions); /// @@ -742,13 +763,41 @@ public static IResult Problem(ProblemDetails problemDetails) /// The created for the response. public static IResult ValidationProblem( IDictionary errors, + string? detail, + string? instance, + int? statusCode, + string? title, + string? type, + IDictionary? extensions) + { + return ValidationProblem(errors, detail, instance, statusCode, title, type, (IEnumerable>?)extensions); + } + + /// + /// Produces a response + /// with a value. + /// + /// One or more validation errors. + /// The value for . + /// The value for . + /// The status code. + /// The value for . Defaults to "One or more validation errors occurred." + /// The value for . + /// The value for . + /// The created for the response. +#pragma warning disable RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads + public static IResult ValidationProblem( +#pragma warning restore RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads + IEnumerable> errors, string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, - IDictionary? extensions = null) + IEnumerable>? extensions = null) { + ArgumentNullException.ThrowIfNull(errors); + // TypedResults.ValidationProblem() does not allow setting the statusCode so we do this manually here var problemDetails = new HttpValidationProblemDetails(errors) { @@ -765,7 +814,7 @@ public static IResult ValidationProblem( return TypedResults.Problem(problemDetails); } - private static void CopyExtensions(IDictionary? extensions, HttpValidationProblemDetails problemDetails) + private static void CopyExtensions(IEnumerable>? extensions, HttpValidationProblemDetails problemDetails) { if (extensions is not null) { diff --git a/src/Http/Http.Results/src/TypedResults.cs b/src/Http/Http.Results/src/TypedResults.cs index 95584ec96e45..8eb7c9fcd834 100644 --- a/src/Http/Http.Results/src/TypedResults.cs +++ b/src/Http/Http.Results/src/TypedResults.cs @@ -755,12 +755,35 @@ public static StatusCodeHttpResult StatusCode(int statusCode) /// The value for . /// The created for the response. public static ProblemHttpResult Problem( + string? detail, + string? instance, + int? statusCode, + string? title, + string? type, + IDictionary? extensions) + { + return Problem(detail, instance, statusCode, title, type, (IEnumerable>?)extensions); + } + + /// + /// Produces a response. + /// + /// The value for . + /// The value for . + /// The value for . + /// The value for . + /// The value for . + /// The value for . + /// The created for the response. +#pragma warning disable RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads + public static ProblemHttpResult Problem( +#pragma warning restore RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads string? detail = null, string? instance = null, int? statusCode = null, string? title = null, string? type = null, - IDictionary? extensions = null) + IEnumerable>? extensions = null) { var problemDetails = new ProblemDetails { @@ -776,17 +799,6 @@ public static ProblemHttpResult Problem( return new(problemDetails); } - private static void CopyExtensions(IDictionary? extensions, ProblemDetails problemDetails) - { - if (extensions is not null) - { - foreach (var extension in extensions) - { - problemDetails.Extensions.Add(extension); - } - } - } - /// /// Produces a response. /// @@ -811,11 +823,34 @@ public static ProblemHttpResult Problem(ProblemDetails problemDetails) /// The created for the response. public static ValidationProblem ValidationProblem( IDictionary errors, + string? detail, + string? instance, + string? title, + string? type, + IDictionary? extensions) + { + return ValidationProblem(errors, detail, instance, title, type, (IEnumerable>?)extensions); + } + + /// + /// Produces a response with an value. + /// + /// One or more validation errors. + /// The value for . + /// The value for . + /// The value for . Defaults to "One or more validation errors occurred." + /// The value for . + /// The value for . + /// The created for the response. +#pragma warning disable RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads + public static ValidationProblem ValidationProblem( +#pragma warning restore RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads + IEnumerable> errors, string? detail = null, string? instance = null, string? title = null, string? type = null, - IDictionary? extensions = null) + IEnumerable>? extensions = null) { ArgumentNullException.ThrowIfNull(errors); @@ -833,6 +868,17 @@ public static ValidationProblem ValidationProblem( return new(problemDetails); } + private static void CopyExtensions(IEnumerable>? extensions, ProblemDetails problemDetails) + { + if (extensions is not null) + { + foreach (var extension in extensions) + { + problemDetails.Extensions.Add(extension); + } + } + } + /// /// Produces a response. /// diff --git a/src/Http/Http.Results/test/ResultsTests.cs b/src/Http/Http.Results/test/ResultsTests.cs index 88513185c063..3e7220e717d0 100644 --- a/src/Http/Http.Results/test/ResultsTests.cs +++ b/src/Http/Http.Results/test/ResultsTests.cs @@ -1268,6 +1268,54 @@ public void Problem_WithArgs_ResultHasCorrectValues() Assert.Equal(extensions, result.ProblemDetails.Extensions); } + [Fact] + public void Problem_ResultHasCorrectValues() + { + // Arrange + var detail = "test detail"; + var instance = "test instance"; + var statusCode = StatusCodes.Status409Conflict; + var title = "test title"; + var type = "test type"; + var extensions = new List> { new("test", "value") }; + + // Act + var result = Results.Problem(detail, instance, statusCode, title, type, extensions) as ProblemHttpResult; + + // Assert + Assert.Equal(detail, result.ProblemDetails.Detail); + Assert.Equal(instance, result.ProblemDetails.Instance); + Assert.Equal("application/problem+json", result.ContentType); + Assert.Equal(statusCode, result.StatusCode); + Assert.Equal(title, result.ProblemDetails.Title); + Assert.Equal(type, result.ProblemDetails.Type); + Assert.Equal(extensions, result.ProblemDetails.Extensions); + } + + [Fact] + public void Problem_WithReadOnlyDictionary_ResultHasCorrectValues() + { + // Arrange + var detail = "test detail"; + var instance = "test instance"; + var statusCode = StatusCodes.Status409Conflict; + var title = "test title"; + var type = "test type"; + var extensions = (IReadOnlyDictionary)new Dictionary { ["test"] = "value" }; + + // Act + var result = Results.Problem(detail, instance, statusCode, title, type, extensions) as ProblemHttpResult; + + // Assert + Assert.Equal(detail, result.ProblemDetails.Detail); + Assert.Equal(instance, result.ProblemDetails.Instance); + Assert.Equal("application/problem+json", result.ContentType); + Assert.Equal(statusCode, result.StatusCode); + Assert.Equal(title, result.ProblemDetails.Title); + Assert.Equal(type, result.ProblemDetails.Type); + Assert.Equal(extensions, result.ProblemDetails.Extensions); + } + [Theory] [InlineData(StatusCodes.Status400BadRequest, "Bad Request", "https://tools.ietf.org/html/rfc9110#section-15.5.1")] [InlineData(StatusCodes.Status418ImATeapot, "I'm a teapot", null)] @@ -1375,6 +1423,37 @@ public void ValidationProblem_WithValidationProblemArg_ResultHasCorrectValues() Assert.Equal(extensions, result.ProblemDetails.Extensions); } + [Fact] + public void ValidationProblem_ResultHasCorrectValues() + { + // Arrange + var errors = new List> { new("testField", new[] { "test error" }) }; + var detail = "test detail"; + var instance = "test instance"; + var statusCode = StatusCodes.Status412PreconditionFailed; // obscure for the test on purpose + var title = "test title"; + var type = "test type"; + var extensions = new List> { new("testField", "test value") }; + + // Act + // Note: Results.ValidationProblem returns ProblemHttpResult instead of ValidationProblem by design as + // as ValidationProblem doesn't allow setting a custom status code so that it can accurately report + // a single status code in endpoint metadata via its implementation of IEndpointMetadataProvider + var result = Results.ValidationProblem(errors, detail, instance, statusCode, title, type, extensions) as ProblemHttpResult; + + // Assert + Assert.IsType(result.ProblemDetails); + Assert.Equal(errors, ((HttpValidationProblemDetails)result.ProblemDetails).Errors); + Assert.Equal(detail, result.ProblemDetails.Detail); + Assert.Equal(instance, result.ProblemDetails.Instance); + Assert.Equal(statusCode, result.ProblemDetails.Status); + Assert.Equal(statusCode, result.StatusCode); + Assert.Equal(title, result.ProblemDetails.Title); + Assert.Equal(type, result.ProblemDetails.Type); + Assert.Equal("application/problem+json", result.ContentType); + Assert.Equal(extensions, result.ProblemDetails.Extensions); + } + [Fact] public void Redirect_WithNullStringUrl_ThrowsArgException() { diff --git a/src/Http/Http.Results/test/TypedResultsTests.cs b/src/Http/Http.Results/test/TypedResultsTests.cs index 8e9a5c48d47a..acee20c4d15c 100644 --- a/src/Http/Http.Results/test/TypedResultsTests.cs +++ b/src/Http/Http.Results/test/TypedResultsTests.cs @@ -1084,6 +1084,30 @@ public void Problem_WithArgs_ResultHasCorrectValues() Assert.Equal(extensions, result.ProblemDetails.Extensions); } + [Fact] + public void Problem_ResultHasCorrectValues() + { + // Arrange + var detail = "test detail"; + var instance = "test instance"; + var statusCode = StatusCodes.Status409Conflict; + var title = "test title"; + var type = "test type"; + var extensions = new List> { new("test", "value") }; + + // Act + var result = TypedResults.Problem(detail, instance, statusCode, title, type, extensions); + + // Assert + Assert.Equal(detail, result.ProblemDetails.Detail); + Assert.Equal(instance, result.ProblemDetails.Instance); + Assert.Equal("application/problem+json", result.ContentType); + Assert.Equal(statusCode, result.StatusCode); + Assert.Equal(title, result.ProblemDetails.Title); + Assert.Equal(type, result.ProblemDetails.Type); + Assert.Equal(extensions, result.ProblemDetails.Extensions); + } + [Theory] [InlineData(StatusCodes.Status400BadRequest, "Bad Request", "https://tools.ietf.org/html/rfc9110#section-15.5.1")] [InlineData(StatusCodes.Status418ImATeapot, "I'm a teapot", null)] @@ -1186,6 +1210,32 @@ public void ValidationProblem_WithValidationProblemArg_ResultHasCorrectValues() Assert.Equal(extensions, result.ProblemDetails.Extensions); } + [Fact] + public void ValidationProblem_ResultHasCorrectValues() + { + // Arrange + var errors = new List> { new("testField", new[] { "test error" }) }; + var detail = "test detail"; + var instance = "test instance"; + var title = "test title"; + var type = "test type"; + var extensions = new List> { new("testField", "test value") }; + + // Act + var result = TypedResults.ValidationProblem(errors, detail, instance, title, type, extensions); + + // Assert + Assert.Equal(errors, result.ProblemDetails.Errors); + Assert.Equal(detail, result.ProblemDetails.Detail); + Assert.Equal(instance, result.ProblemDetails.Instance); + Assert.Equal(StatusCodes.Status400BadRequest, result.ProblemDetails.Status); + Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode); + Assert.Equal(title, result.ProblemDetails.Title); + Assert.Equal(type, result.ProblemDetails.Type); + Assert.Equal("application/problem+json", result.ContentType); + Assert.Equal(extensions, result.ProblemDetails.Extensions); + } + [Fact] public void Redirect_WithNullStringUrl_ThrowsArgException() { From afc520c49d9857c68d2faae5ae89821ae671bb1b Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Mon, 8 Jul 2024 15:00:54 -0500 Subject: [PATCH 135/257] Support IAsyncEnumerable and ChannelReader with ValueTypes in SignalR native AOT (#56583) * Support IAsyncEnumerable and ChannelReader with ValueTypes in SignalR native AOT Support streaming ValueTypes from a SignalR Hub method in both the client and the server in native AOT. In order to make this work, we need to use pure reflection to read from the streaming object. Support passing in an IAsyncEnumerable/ChannelReader of ValueType to a parameter in SignalR.Client. This works because the user code creates the concrete object, and the SignalR.Client library just needs to read from it using reflection. The only scenario that can't be supported is on the SignalR server we can't support receiving an IAsyncEnumerable/ChannelReader of ValueType. This is because there is no way for the SignalR library code to construct a concrete instance to pass into the user-defined method on native AOT. Fix #56179 --- .../csharp/Client.Core/src/HubConnection.cs | 74 ++++++++-- .../common/Shared/AsyncEnumerableAdapters.cs | 122 +++++++++++++++- src/SignalR/common/Shared/ReflectionHelper.cs | 23 +++ .../Core/src/Internal/HubMethodDescriptor.cs | 64 +++++---- .../NativeAotTests.cs | 133 ++++++++++++++++-- 5 files changed, 362 insertions(+), 54 deletions(-) diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index 93d4c3492b9b..e6d343cd7465 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -857,26 +857,68 @@ private void LaunchStreams(ConnectionState connectionState, Dictionary + /// Uses reflection to read items from an IAsyncEnumerable{T} or ChannelReader{T} and send them to the server. + /// + /// Used when the runtime does not support dynamic code generation (ex. native AOT) and the generic type is a value type. In this scenario, + /// we cannot use MakeGenericMethod to call the appropriate SendStreamItems method because the generic type is a value type. + /// + private Task ReflectionSendStreamItems(MethodInfo methodInfo, ConnectionState connectionState, string streamId, object reader, CancellationTokenSource tokenSource) + { + async Task ReadAsyncEnumeratorStream(IAsyncEnumerator enumerator) + { + try + { + while (await enumerator.MoveNextAsync().ConfigureAwait(false)) + { + await SendStreamItemAsync(connectionState, streamId, enumerator.Current, tokenSource).ConfigureAwait(false); + } + } + finally + { + await enumerator.DisposeAsync().ConfigureAwait(false); + } + } + + Func createAndConsumeStream; + if (methodInfo == _sendStreamItemsMethod) + { + // reader is a ChannelReader + createAndConsumeStream = () => ReadAsyncEnumeratorStream(AsyncEnumerableAdapters.MakeReflectionAsyncEnumeratorFromChannel(reader, tokenSource.Token)); + } + else + { + // reader is an IAsyncEnumerable + Debug.Assert(methodInfo == _sendIAsyncStreamItemsMethod); + + createAndConsumeStream = () => ReadAsyncEnumeratorStream(AsyncEnumerableAdapters.MakeReflectionAsyncEnumerator(reader, tokenSource.Token)); + } - _ = methodInfo - .MakeGenericMethod(genericTypes) - .Invoke(this, [connectionState, streamId, reader, tokenSource]); + return CommonStreaming(connectionState, streamId, createAndConsumeStream, tokenSource); } +#endif - // this is called via reflection using the `_sendStreamItems` field + // this is called via reflection using the `_sendStreamItemsMethod` field private Task SendStreamItems(ConnectionState connectionState, string streamId, ChannelReader reader, CancellationTokenSource tokenSource) { async Task ReadChannelStream() @@ -885,8 +927,7 @@ async Task ReadChannelStream() { while (!tokenSource.Token.IsCancellationRequested && reader.TryRead(out var item)) { - await SendWithLock(connectionState, new StreamItemMessage(streamId, item), tokenSource.Token).ConfigureAwait(false); - Log.SendingStreamItem(_logger, streamId); + await SendStreamItemAsync(connectionState, streamId, item, tokenSource).ConfigureAwait(false); } } } @@ -901,14 +942,19 @@ async Task ReadAsyncEnumerableStream() { await foreach (var streamValue in stream.WithCancellation(tokenSource.Token).ConfigureAwait(false)) { - await SendWithLock(connectionState, new StreamItemMessage(streamId, streamValue), tokenSource.Token).ConfigureAwait(false); - Log.SendingStreamItem(_logger, streamId); + await SendStreamItemAsync(connectionState, streamId, streamValue, tokenSource).ConfigureAwait(false); } } return CommonStreaming(connectionState, streamId, ReadAsyncEnumerableStream, tokenSource); } + private async Task SendStreamItemAsync(ConnectionState connectionState, string streamId, object? item, CancellationTokenSource tokenSource) + { + await SendWithLock(connectionState, new StreamItemMessage(streamId, item), tokenSource.Token).ConfigureAwait(false); + Log.SendingStreamItem(_logger, streamId); + } + private async Task CommonStreaming(ConnectionState connectionState, string streamId, Func createAndConsumeStream, CancellationTokenSource cts) { // make sure we dispose the CTS created by StreamAsyncCore once streaming completes diff --git a/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs b/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs index 9df94d279128..6d42b25194c9 100644 --- a/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs +++ b/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs @@ -1,7 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using System.Collections.Generic; +using System.Reflection; using System.Threading; using System.Threading.Channels; using System.Threading.Tasks; @@ -11,7 +13,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal; // True-internal because this is a weird and tricky class to use :) internal static class AsyncEnumerableAdapters { - public static IAsyncEnumerator MakeCancelableAsyncEnumerator(IAsyncEnumerable asyncEnumerable, CancellationToken cancellationToken = default) + public static IAsyncEnumerator MakeAsyncEnumerator(IAsyncEnumerable asyncEnumerable, CancellationToken cancellationToken = default) { var enumerator = asyncEnumerable.GetAsyncEnumerator(cancellationToken); return enumerator as IAsyncEnumerator ?? new BoxedAsyncEnumerator(enumerator); @@ -47,15 +49,18 @@ public ValueTask MoveNextAsync() return new ValueTask(true); } - return new ValueTask(MoveNextAsyncAwaited()); + return MoveNextAsyncAwaited(); } - private async Task MoveNextAsyncAwaited() + private async ValueTask MoveNextAsyncAwaited() { - if (await _channel.WaitToReadAsync(_cancellationToken).ConfigureAwait(false) && _channel.TryRead(out var item)) + while (await _channel.WaitToReadAsync(_cancellationToken).ConfigureAwait(false)) { - Current = item; - return true; + if (_channel.TryRead(out var item)) + { + Current = item; + return true; + } } return false; } @@ -137,4 +142,109 @@ public ValueTask DisposeAsync() return _asyncEnumerator.DisposeAsync(); } } + +#if NET6_0_OR_GREATER + + private static readonly MethodInfo _asyncEnumerableGetAsyncEnumeratorMethodInfo = typeof(IAsyncEnumerable<>).GetMethod("GetAsyncEnumerator")!; + + /// + /// Creates an IAsyncEnumerator{object} from an IAsyncEnumerable{T} using reflection. + /// + /// Used when the runtime does not support dynamic code generation (ex. native AOT) and the generic type is a value type. In this scenario, + /// we cannot use MakeGenericMethod to call a generic method because the generic type is a value type. + /// + public static IAsyncEnumerator MakeReflectionAsyncEnumerator(object asyncEnumerable, CancellationToken cancellationToken) + { + var constructedIAsyncEnumerableInterface = ReflectionHelper.GetIAsyncEnumerableInterface(asyncEnumerable.GetType())!; + var enumerator = ((MethodInfo)constructedIAsyncEnumerableInterface.GetMemberWithSameMetadataDefinitionAs(_asyncEnumerableGetAsyncEnumeratorMethodInfo)).Invoke(asyncEnumerable, [cancellationToken])!; + return new ReflectionAsyncEnumerator(enumerator); + } + + /// + /// Creates an IAsyncEnumerator{object} from a ChannelReader{T} using reflection. + /// + /// Used when the runtime does not support dynamic code generation (ex. native AOT) and the generic type is a value type. In this scenario, + /// we cannot use MakeGenericMethod to call a generic method because the generic type is a value type. + /// + public static IAsyncEnumerator MakeReflectionAsyncEnumeratorFromChannel(object channelReader, CancellationToken cancellationToken) + { + return new ReflectionChannelAsyncEnumerator(channelReader, cancellationToken); + } + + private sealed class ReflectionAsyncEnumerator : IAsyncEnumerator + { + private static readonly MethodInfo _asyncEnumeratorMoveNextAsyncMethodInfo = typeof(IAsyncEnumerator<>).GetMethod("MoveNextAsync")!; + private static readonly MethodInfo _asyncEnumeratorGetCurrentMethodInfo = typeof(IAsyncEnumerator<>).GetMethod("get_Current")!; + + private readonly object _enumerator; + private readonly MethodInfo _moveNextAsyncMethodInfo; + private readonly MethodInfo _getCurrentMethodInfo; + + public ReflectionAsyncEnumerator(object enumerator) + { + _enumerator = enumerator; + + var type = ReflectionHelper.GetIAsyncEnumeratorInterface(enumerator.GetType()); + _moveNextAsyncMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_asyncEnumeratorMoveNextAsyncMethodInfo)!; + _getCurrentMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_asyncEnumeratorGetCurrentMethodInfo)!; + } + + public object? Current => _getCurrentMethodInfo.Invoke(_enumerator, []); + + public ValueTask MoveNextAsync() => (ValueTask)_moveNextAsyncMethodInfo.Invoke(_enumerator, [])!; + + public ValueTask DisposeAsync() => ((IAsyncDisposable)_enumerator).DisposeAsync(); + } + + private sealed class ReflectionChannelAsyncEnumerator : IAsyncEnumerator + { + private static readonly MethodInfo _channelReaderTryReadMethodInfo = typeof(ChannelReader<>).GetMethod("TryRead")!; + private static readonly MethodInfo _channelReaderWaitToReadAsyncMethodInfo = typeof(ChannelReader<>).GetMethod("WaitToReadAsync")!; + + private readonly object _channelReader; + private readonly object?[] _tryReadResult = [null]; + private readonly object[] _waitToReadArgs; + private readonly MethodInfo _tryReadMethodInfo; + private readonly MethodInfo _waitToReadAsyncMethodInfo; + + public ReflectionChannelAsyncEnumerator(object channelReader, CancellationToken cancellationToken) + { + _channelReader = channelReader; + _waitToReadArgs = [cancellationToken]; + + var type = channelReader.GetType(); + _tryReadMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_channelReaderTryReadMethodInfo)!; + _waitToReadAsyncMethodInfo = (MethodInfo)type.GetMemberWithSameMetadataDefinitionAs(_channelReaderWaitToReadAsyncMethodInfo)!; + } + + public object? Current { get; private set; } + + public ValueTask MoveNextAsync() + { + if ((bool)_tryReadMethodInfo.Invoke(_channelReader, _tryReadResult)!) + { + Current = _tryReadResult[0]; + return new ValueTask(true); + } + + return MoveNextAsyncAwaited(); + } + + private async ValueTask MoveNextAsyncAwaited() + { + while (await ((ValueTask)_waitToReadAsyncMethodInfo.Invoke(_channelReader, _waitToReadArgs)!).ConfigureAwait(false)) + { + if ((bool)_tryReadMethodInfo.Invoke(_channelReader, _tryReadResult)!) + { + Current = _tryReadResult[0]; + return true; + } + } + return false; + } + + public ValueTask DisposeAsync() => default; + } + +#endif } diff --git a/src/SignalR/common/Shared/ReflectionHelper.cs b/src/SignalR/common/Shared/ReflectionHelper.cs index 1713ffa06da7..5cdf12c4b49b 100644 --- a/src/SignalR/common/Shared/ReflectionHelper.cs +++ b/src/SignalR/common/Shared/ReflectionHelper.cs @@ -69,4 +69,27 @@ public static bool TryGetStreamType(Type streamType, [NotNullWhen(true)] out Typ return null; } + + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", + Justification = "The 'IAsyncEnumerator<>' Type must exist and so trimmer kept it. In which case " + + "It also kept it on any type which implements it. The below call to GetInterfaces " + + "may return fewer results when trimmed but it will return 'IAsyncEnumerator<>' " + + "if the type implemented it, even after trimming.")] + public static Type GetIAsyncEnumeratorInterface(Type type) + { + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerator<>)) + { + return type; + } + + foreach (Type typeToCheck in type.GetInterfaces()) + { + if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerator<>)) + { + return typeToCheck; + } + } + + throw new InvalidOperationException($"Type '{type}' does not implement IAsyncEnumerator<>"); + } } diff --git a/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs b/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs index 01ec440004eb..d2d064c10378 100644 --- a/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs +++ b/src/SignalR/server/Core/src/Internal/HubMethodDescriptor.cs @@ -17,16 +17,16 @@ namespace Microsoft.AspNetCore.SignalR.Internal; internal sealed class HubMethodDescriptor { - private static readonly MethodInfo MakeCancelableAsyncEnumeratorMethod = typeof(AsyncEnumerableAdapters) + private static readonly MethodInfo MakeAsyncEnumeratorMethod = typeof(AsyncEnumerableAdapters) .GetRuntimeMethods() - .Single(m => m.Name.Equals(nameof(AsyncEnumerableAdapters.MakeCancelableAsyncEnumerator)) && m.IsGenericMethod); + .Single(m => m.Name.Equals(nameof(AsyncEnumerableAdapters.MakeAsyncEnumerator)) && m.IsGenericMethod); private static readonly MethodInfo MakeAsyncEnumeratorFromChannelMethod = typeof(AsyncEnumerableAdapters) .GetRuntimeMethods() .Single(m => m.Name.Equals(nameof(AsyncEnumerableAdapters.MakeAsyncEnumeratorFromChannel)) && m.IsGenericMethod); private readonly MethodInfo? _makeCancelableEnumeratorMethodInfo; - private Func>? _makeCancelableEnumerator; + private Func>? _makeCancelableEnumerator; // bitset to store which parameters come from DI up to 64 arguments private ulong _isServiceArgument; @@ -41,8 +41,8 @@ public HubMethodDescriptor(ObjectMethodExecutor methodExecutor, IServiceProvider var asyncEnumerableType = ReflectionHelper.GetIAsyncEnumerableInterface(NonAsyncReturnType); if (asyncEnumerableType is not null) { - StreamReturnType = ValidateStreamType(asyncEnumerableType.GetGenericArguments()[0]); - _makeCancelableEnumeratorMethodInfo = MakeCancelableAsyncEnumeratorMethod; + StreamReturnType = asyncEnumerableType.GetGenericArguments()[0]; + _makeCancelableEnumeratorMethodInfo = MakeAsyncEnumeratorMethod; } else { @@ -50,7 +50,7 @@ public HubMethodDescriptor(ObjectMethodExecutor methodExecutor, IServiceProvider { if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(ChannelReader<>)) { - StreamReturnType = ValidateStreamType(returnType.GetGenericArguments()[0]); + StreamReturnType = returnType.GetGenericArguments()[0]; _makeCancelableEnumeratorMethodInfo = MakeAsyncEnumeratorFromChannelMethod; break; } @@ -73,7 +73,7 @@ public HubMethodDescriptor(ObjectMethodExecutor methodExecutor, IServiceProvider StreamingParameters = new List(); } - StreamingParameters.Add(ValidateStreamType(p.ParameterType.GetGenericArguments()[0])); + StreamingParameters.Add(ValidateParameterStreamType(p.ParameterType.GetGenericArguments()[0], p.ParameterType)); HasSyntheticArguments = true; return false; } @@ -201,7 +201,7 @@ public object GetService(IServiceProvider serviceProvider, int index, Type param return serviceProvider.GetRequiredService(parameterType); } - public IAsyncEnumerator FromReturnedStream(object stream, CancellationToken cancellationToken) + public IAsyncEnumerator FromReturnedStream(object stream, CancellationToken cancellationToken) { // there is the potential for _makeCancelableEnumerator to be set multiple times but this has no harmful effect other than startup perf if (_makeCancelableEnumerator == null) @@ -220,12 +220,12 @@ public IAsyncEnumerator FromReturnedStream(object stream, CancellationTo } [UnconditionalSuppressMessage("Trimming", "IL2060:MakeGenericMethod", - Justification = "The adapter methods passed into here (MakeCancelableAsyncEnumerator and MakeAsyncEnumeratorFromChannel) don't have trimming annotations.")] + Justification = "The adapter methods passed into here (MakeAsyncEnumerator and MakeAsyncEnumeratorFromChannel) don't have trimming annotations.")] [RequiresDynamicCode("Calls MakeGenericMethod with types that may be ValueTypes")] - private static Func> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) + private static Func> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) { // This will call one of two adapter methods to wrap the passed in streamable value into an IAsyncEnumerable: - // - AsyncEnumerableAdapters.MakeCancelableAsyncEnumerator(asyncEnumerable, cancellationToken); + // - AsyncEnumerableAdapters.MakeAsyncEnumerator(asyncEnumerable, cancellationToken); // - AsyncEnumerableAdapters.MakeCancelableAsyncEnumeratorFromChannel(channelReader, cancellationToken); var parameters = new[] @@ -243,23 +243,39 @@ private static Func> Compile }; var methodCall = Expression.Call(null, genericMethodInfo, methodArguments); - var lambda = Expression.Lambda>>(methodCall, parameters); + var lambda = Expression.Lambda>>(methodCall, parameters); return lambda.Compile(); } [UnconditionalSuppressMessage("Trimming", "IL2060:MakeGenericMethod", - Justification = "The adapter methods passed into here (MakeCancelableAsyncEnumerator and MakeAsyncEnumeratorFromChannel) don't have trimming annotations.")] + Justification = "The adapter methods passed into here (MakeAsyncEnumerator and MakeAsyncEnumeratorFromChannel) don't have trimming annotations.")] [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", - Justification = "There is a runtime check for ValueType streaming item type when PublishAot=true. Developers will get an exception in this situation before publishing.")] - private static Func> ConvertToEnumeratorWithReflection(MethodInfo adapterMethodInfo, Type streamReturnType) + Justification = "ValueTypes are handled without using MakeGenericMethod.")] + private static Func> ConvertToEnumeratorWithReflection(MethodInfo adapterMethodInfo, Type streamReturnType) { - Debug.Assert(!streamReturnType.IsValueType, "ValidateStreamType will throw during the ctor if the streamReturnType is a ValueType when PublishAot=true."); + if (streamReturnType.IsValueType) + { + if (adapterMethodInfo == MakeAsyncEnumeratorMethod) + { + // return type is an IAsyncEnumerable + return AsyncEnumerableAdapters.MakeReflectionAsyncEnumerator; + } + else + { + // must be a ChannelReader + Debug.Assert(adapterMethodInfo == MakeAsyncEnumeratorFromChannelMethod); - var genericAdapterMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); - return (stream, cancellationToken) => + return AsyncEnumerableAdapters.MakeReflectionAsyncEnumeratorFromChannel; + } + } + else { - return (IAsyncEnumerator)genericAdapterMethodInfo.Invoke(null, [stream, cancellationToken])!; - }; + var genericAdapterMethodInfo = adapterMethodInfo.MakeGenericMethod(streamReturnType); + return (stream, cancellationToken) => + { + return (IAsyncEnumerator)genericAdapterMethodInfo.Invoke(null, [stream, cancellationToken])!; + }; + } } private static Type GetServiceType(Type type) @@ -276,14 +292,14 @@ private static Type GetServiceType(Type type) return type; } - private Type ValidateStreamType(Type streamType) + private Type ValidateParameterStreamType(Type streamType, Type parameterType) { if (!RuntimeFeature.IsDynamicCodeSupported && streamType.IsValueType) { - // NativeAOT apps are not able to stream IAsyncEnumerable and ChannelReader of ValueTypes - // since we cannot create AsyncEnumerableAdapters.MakeCancelableAsyncEnumerator and AsyncEnumerableAdapters.MakeAsyncEnumeratorFromChannel methods with a generic ValueType. + // NativeAOT apps are not able to stream IAsyncEnumerable and ChannelReader of ValueTypes as parameters + // since we cannot create a concrete IAsyncEnumerable and ChannelReader of ValueType to pass into the Hub method. var methodInfo = MethodExecutor.MethodInfo; - throw new InvalidOperationException($"Unable to stream an item with type '{streamType}' on method '{methodInfo.DeclaringType}.{methodInfo.Name}' because it is a ValueType. Native code to support streaming this ValueType will not be available with native AOT."); + throw new InvalidOperationException($"Method '{methodInfo.DeclaringType}.{methodInfo.Name}' is not supported with native AOT because it has a parameter of type '{parameterType}'. A ValueType streaming parameter is not supported because the native code to support the ValueType will not be available with native AOT."); } return streamType; diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs index 94f37318eff7..4b8b97baa72d 100644 --- a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/NativeAotTests.cs @@ -3,6 +3,7 @@ using System.Globalization; using System.Text; +using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Channels; using Microsoft.AspNetCore.Builder; @@ -87,6 +88,35 @@ public void CanCallAsyncMethods() echoResults.Add(item); } Assert.Equal(["echo:some data", "echo:some more data", "echo:even more data"], echoResults); + + var streamValueTypeResults = new List(); + await foreach (var item in connection.StreamAsync(nameof(AsyncMethodHub.ReturnEnumerableValueType))) + { + streamValueTypeResults.Add(item); + } + Assert.Equal([1, 2], streamValueTypeResults); + + var returnChannelValueTypeResults = new List(); + var returnChannelValueTypeReader = await connection.StreamAsChannelAsync(nameof(AsyncMethodHub.ReturnChannelValueType), "Hello"); + await foreach (var item in returnChannelValueTypeReader.ReadAllAsync()) + { + returnChannelValueTypeResults.Add(item); + } + Assert.Equal(['H', 'e', 'l', 'l', 'o'], returnChannelValueTypeResults); + + // Even though SignalR server doesn't support Hub methods with streaming value types in native AOT (https://github.com/dotnet/aspnetcore/issues/56179), + // still test that the client can send them. + var stringResult = await connection.InvokeAsync(nameof(AsyncMethodHub.EnumerableIntParameter), StreamInts()); + Assert.Equal("1, 2, 3", stringResult); + + var channelShorts = Channel.CreateBounded(10); + await channelShorts.Writer.WriteAsync(9); + await channelShorts.Writer.WriteAsync(8); + await channelShorts.Writer.WriteAsync(7); + channelShorts.Writer.Complete(); + + stringResult = await connection.InvokeAsync(nameof(AsyncMethodHub.ChannelShortParameter), channelShorts.Reader); + Assert.Equal("9, 8, 7", stringResult); } }); } @@ -99,20 +129,30 @@ private static async IAsyncEnumerable StreamMessages() yield return "message two"; } + private static async IAsyncEnumerable StreamInts() + { + await Task.Yield(); + yield return 1; + await Task.Yield(); + yield return 2; + await Task.Yield(); + yield return 3; + } + [ConditionalFact] [RemoteExecutionSupported] public void UsingValueTypesInStreamingThrows() { RunNativeAotTest(static async () => { - var e = await Assert.ThrowsAsync(() => InProcessTestServer>.StartServer(NullLoggerFactory.Instance)); - Assert.Contains("Unable to stream an item with type 'System.Int32' on method 'Microsoft.AspNetCore.SignalR.Tests.NativeAotTests+AsyncEnumerableIntMethodHub.StreamValueType' because it is a ValueType.", e.Message); + var e = await Assert.ThrowsAsync(() => InProcessTestServer>.StartServer(NullLoggerFactory.Instance)); + Assert.Contains("Method 'Microsoft.AspNetCore.SignalR.Tests.NativeAotTests+ChannelValueTypeMethodHub.StreamValueType' is not supported with native AOT because it has a parameter of type 'System.Threading.Channels.ChannelReader`1[System.Double]'.", e.Message); }); RunNativeAotTest(static async () => { - var e = await Assert.ThrowsAsync(() => InProcessTestServer>.StartServer(NullLoggerFactory.Instance)); - Assert.Contains("Unable to stream an item with type 'System.Double' on method 'Microsoft.AspNetCore.SignalR.Tests.NativeAotTests+ChannelDoubleMethodHub.StreamValueType' because it is a ValueType.", e.Message); + var e = await Assert.ThrowsAsync(() => InProcessTestServer>.StartServer(NullLoggerFactory.Instance)); + Assert.Contains("Method 'Microsoft.AspNetCore.SignalR.Tests.NativeAotTests+EnumerableValueTypeMethodHub.StreamValueType' is not supported with native AOT because it has a parameter of type 'System.Collections.Generic.IAsyncEnumerable`1[System.Single]'.", e.Message); }); } @@ -228,22 +268,81 @@ public async IAsyncEnumerable StreamEchoAsyncEnumerable(IAsyncEnumerable yield return "echo:" + item; } } - } - public class AsyncEnumerableIntMethodHub : TestHub - { - public async IAsyncEnumerable StreamValueType() + public async IAsyncEnumerable ReturnEnumerableValueType() { await Task.Yield(); yield return 1; await Task.Yield(); yield return 2; } + + public ChannelReader ReturnChannelValueType(string source) + { + Channel output = Channel.CreateUnbounded(); + + _ = Task.Run(async () => + { + foreach (var item in source) + { + await Task.Yield(); + await output.Writer.WriteAsync(item); + } + + output.Writer.TryComplete(); + }); + + return output.Reader; + } + + // using 'object' as the streaming parameter type because streaming ValueTypes is not supported on the server + public async Task EnumerableIntParameter(IAsyncEnumerable source) + { + var result = new StringBuilder(); + var first = true; + // These get deserialized as JsonElement since the streaming parameter is 'object' + await foreach (JsonElement item in source) + { + if (first) + { + first = false; + } + else + { + result.Append(", "); + } + + result.Append(item.GetInt32()); + } + return result.ToString(); + } + + // using 'object' as the streaming parameter type because streaming ValueTypes is not supported on the server + public async Task ChannelShortParameter(ChannelReader source) + { + var result = new StringBuilder(); + var first = true; + // These get deserialized as JsonElement since the streaming parameter is 'object' + await foreach (JsonElement item in source.ReadAllAsync()) + { + if (first) + { + first = false; + } + else + { + result.Append(", "); + } + + result.Append(item.GetInt16()); + } + return result.ToString(); + } } - public class ChannelDoubleMethodHub : TestHub + public class ChannelValueTypeMethodHub : TestHub { - public async Task StreamValueType(ILogger logger, ChannelReader source) + public async Task StreamValueType(ILogger logger, ChannelReader source) { await foreach (var item in source.ReadAllAsync()) { @@ -252,6 +351,17 @@ public async Task StreamValueType(ILogger logger, Channe } } + public class EnumerableValueTypeMethodHub : TestHub + { + public async Task StreamValueType(ILogger logger, IAsyncEnumerable source) + { + await foreach (var item in source) + { + logger.LogInformation("Received: {item}", item); + } + } + } + public class TaskDerivedType : Task { public TaskDerivedType() @@ -325,8 +435,11 @@ public void Dispose() } } + [JsonSerializable(typeof(object))] [JsonSerializable(typeof(string))] [JsonSerializable(typeof(int))] + [JsonSerializable(typeof(short))] + [JsonSerializable(typeof(char))] internal partial class AppJsonSerializerContext : JsonSerializerContext { public static void AddToJsonHubProtocol(IServiceCollection services) From 296871688f069431794b19a3772d8e3be5b9576e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:26:51 +0000 Subject: [PATCH 136/257] [main] (deps): Bump src/submodules/googletest (#56646) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `1d17ea1` to `34ad51b`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2...34ad51b3dc4f922d8ab622491dd44fc2c39afee9) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 1d17ea141d2c..34ad51b3dc4f 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2 +Subproject commit 34ad51b3dc4f922d8ab622491dd44fc2c39afee9 From ea1257e11255cdefe8cff9118b2964a0f4d04ca1 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Mon, 8 Jul 2024 23:45:04 +0100 Subject: [PATCH 137/257] Use Convert.ToHexStringLower() (#56235) Use `Convert.ToHexStringLower()` instead of looping through the buffer to format with a `StringBuilder`. --- src/Antiforgery/src/Internal/BinaryBlob.cs | 15 +-------------- .../Facebook/src/FacebookHandler.cs | 8 +------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/Antiforgery/src/Internal/BinaryBlob.cs b/src/Antiforgery/src/Internal/BinaryBlob.cs index 67e700af10de..1196ffd0bdfe 100644 --- a/src/Antiforgery/src/Internal/BinaryBlob.cs +++ b/src/Antiforgery/src/Internal/BinaryBlob.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Globalization; using System.Runtime.CompilerServices; using System.Security.Cryptography; -using System.Text; namespace Microsoft.AspNetCore.Antiforgery; @@ -45,18 +43,7 @@ public int BitLength } } - private string DebuggerString - { - get - { - var sb = new StringBuilder("0x", 2 + (_data.Length * 2)); - for (var i = 0; i < _data.Length; i++) - { - sb.AppendFormat(CultureInfo.InvariantCulture, "{0:x2}", _data[i]); - } - return sb.ToString(); - } - } + private string DebuggerString => $"0x{Convert.ToHexStringLower(_data)}"; public override bool Equals(object? obj) { diff --git a/src/Security/Authentication/Facebook/src/FacebookHandler.cs b/src/Security/Authentication/Facebook/src/FacebookHandler.cs index 6e1e2cb17e95..d2dffb7c423e 100644 --- a/src/Security/Authentication/Facebook/src/FacebookHandler.cs +++ b/src/Security/Authentication/Facebook/src/FacebookHandler.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Net.Http; using System.Security.Claims; using System.Security.Cryptography; @@ -70,12 +69,7 @@ private string GenerateAppSecretProof(string accessToken) var key = Encoding.ASCII.GetBytes(Options.AppSecret); var tokenBytes = Encoding.ASCII.GetBytes(accessToken); var hash = HMACSHA256.HashData(key, tokenBytes); - var builder = new StringBuilder(); - for (int i = 0; i < hash.Length; i++) - { - builder.Append(CultureInfo.InvariantCulture, $"{hash[i]:x2}"); - } - return builder.ToString(); + return Convert.ToHexStringLower(hash); } /// From 1313a4d82bab56a48bfb9d1acc8f01f8fd24797b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:08:51 -0700 Subject: [PATCH 138/257] Update .NET SDK to 9.0.100-preview.7.24358.2 (#56667) * Update .NET SDK Update .NET SDK to version 9.0.100-preview.7.24358.2. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: github-actions[bot] * Update SDK version to one containing the latest SWA SDK fixes --------- Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Javier Calvarro Nelson --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 1596ce958d63..9c8d1a9eb62e 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.6.24316.4" + "version": "9.0.100-preview.7.24358.6" }, "tools": { - "dotnet": "9.0.100-preview.6.24316.4", + "dotnet": "9.0.100-preview.7.24358.6", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 1dd354922ff5d36f495706d4505964167fbc101b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 02:25:52 +0000 Subject: [PATCH 139/257] Update dependencies from https://github.com/dotnet/efcore build 20240708.3 (#56679) [main] Update dependencies from dotnet/efcore --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 795637181bfd..10c4804fef47 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,38 +9,38 @@ --> - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc - + https://github.com/dotnet/efcore - a4aa68d9a505b22fdb2476a0e0bb87fda56d111c + 5f0887dc5d7af6d728d71875c071e5468e094acc https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 16db19a0523f..43bf27730db6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,14 +145,14 @@ 9.0.0-preview.7.24356.1 9.0.0-preview.7.24356.1 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 - 9.0.0-preview.7.24358.2 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24358.3 4.11.0-1.24218.5 4.11.0-1.24218.5 From 3105342d8c346ea0e69f3fc1290d51a6d5dce2db Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 9 Jul 2024 10:27:01 +0800 Subject: [PATCH 140/257] Add CreateNamedPipeServerStream to named pipes options (#56567) --- .../src/CreateNamedPipeServerStreamContext.cs | 26 ++++ .../Internal/NamedPipeConnectionListener.cs | 30 +--- .../src/NamedPipeTransportOptions.cs | 58 +++++++- .../src/PublicAPI.Unshipped.txt | 11 ++ .../Transport.NamedPipes/test/WebHostTests.cs | 129 +++++++++++++++++- 5 files changed, 228 insertions(+), 26 deletions(-) create mode 100644 src/Servers/Kestrel/Transport.NamedPipes/src/CreateNamedPipeServerStreamContext.cs diff --git a/src/Servers/Kestrel/Transport.NamedPipes/src/CreateNamedPipeServerStreamContext.cs b/src/Servers/Kestrel/Transport.NamedPipes/src/CreateNamedPipeServerStreamContext.cs new file mode 100644 index 000000000000..76f228df9808 --- /dev/null +++ b/src/Servers/Kestrel/Transport.NamedPipes/src/CreateNamedPipeServerStreamContext.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO.Pipes; +using Microsoft.AspNetCore.Connections; + +namespace Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes; + +/// +/// Provides information about an endpoint when creating a . +/// +public sealed class CreateNamedPipeServerStreamContext +{ + /// + /// Gets the endpoint. + /// + public required NamedPipeEndPoint NamedPipeEndPoint { get; init; } + /// + /// Gets the pipe options. + /// + public required PipeOptions PipeOptions { get; init; } + /// + /// Gets the default access control and audit security. + /// + public PipeSecurity? PipeSecurity { get; init; } +} diff --git a/src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs b/src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs index cb3f09432d85..ab172bc28476 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs +++ b/src/Servers/Kestrel/Transport.NamedPipes/src/Internal/NamedPipeConnectionListener.cs @@ -194,7 +194,6 @@ public NamedPipeServerStreamPoolPolicy(NamedPipeEndPoint endpoint, NamedPipeTran public NamedPipeServerStream Create() { - NamedPipeServerStream stream; var pipeOptions = NamedPipeOptions.Asynchronous | NamedPipeOptions.WriteThrough; if (!_hasFirstPipeStarted) { @@ -209,30 +208,13 @@ public NamedPipeServerStream Create() pipeOptions |= NamedPipeOptions.CurrentUserOnly; } - if (_options.PipeSecurity != null) + var context = new CreateNamedPipeServerStreamContext { - stream = NamedPipeServerStreamAcl.Create( - _endpoint.PipeName, - PipeDirection.InOut, - NamedPipeServerStream.MaxAllowedServerInstances, - PipeTransmissionMode.Byte, - pipeOptions, - inBufferSize: 0, // Buffer in System.IO.Pipelines - outBufferSize: 0, // Buffer in System.IO.Pipelines - _options.PipeSecurity); - } - else - { - stream = new NamedPipeServerStream( - _endpoint.PipeName, - PipeDirection.InOut, - NamedPipeServerStream.MaxAllowedServerInstances, - PipeTransmissionMode.Byte, - pipeOptions, - inBufferSize: 0, - outBufferSize: 0); - } - return stream; + NamedPipeEndPoint = _endpoint, + PipeOptions = pipeOptions, + PipeSecurity = _options.PipeSecurity + }; + return _options.CreateNamedPipeServerStream(context); } public bool Return(NamedPipeServerStream obj) => !obj.IsConnected; diff --git a/src/Servers/Kestrel/Transport.NamedPipes/src/NamedPipeTransportOptions.cs b/src/Servers/Kestrel/Transport.NamedPipes/src/NamedPipeTransportOptions.cs index 612ef6256b68..a1d7d47f4854 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/src/NamedPipeTransportOptions.cs +++ b/src/Servers/Kestrel/Transport.NamedPipes/src/NamedPipeTransportOptions.cs @@ -56,9 +56,65 @@ public sealed class NamedPipeTransportOptions public bool CurrentUserOnly { get; set; } = true; /// - /// Gets or sets the security information that determines the access control and audit security for pipes. + /// Gets or sets the security information that determines the default access control and audit security for pipes. /// + /// + /// + /// Defaults to null, which is no pipe security. + /// + /// + /// Configuring sets the default access control and audit security for pipes. + /// If per-endpoint security is needed then can be configured + /// to create streams with different security settings. + /// public PipeSecurity? PipeSecurity { get; set; } + /// + /// A function used to create a new to listen with. If + /// not set, is used. + /// + /// + /// Defaults to . + /// + public Func CreateNamedPipeServerStream { get; set; } = CreateDefaultNamedPipeServerStream; + + /// + /// Creates a default instance of for the given + /// that can be used by a connection listener + /// to listen for inbound requests. + /// + /// A . + /// + /// A instance. + /// + public static NamedPipeServerStream CreateDefaultNamedPipeServerStream(CreateNamedPipeServerStreamContext context) + { + ArgumentNullException.ThrowIfNull(context); + + if (context.PipeSecurity != null) + { + return NamedPipeServerStreamAcl.Create( + context.NamedPipeEndPoint.PipeName, + PipeDirection.InOut, + NamedPipeServerStream.MaxAllowedServerInstances, + PipeTransmissionMode.Byte, + context.PipeOptions, + inBufferSize: 0, // Buffer in System.IO.Pipelines + outBufferSize: 0, // Buffer in System.IO.Pipelines + context.PipeSecurity); + } + else + { + return new NamedPipeServerStream( + context.NamedPipeEndPoint.PipeName, + PipeDirection.InOut, + NamedPipeServerStream.MaxAllowedServerInstances, + PipeTransmissionMode.Byte, + context.PipeOptions, + inBufferSize: 0, + outBufferSize: 0); + } + } + internal Func> MemoryPoolFactory { get; set; } = PinnedBlockMemoryPoolFactory.Create; } diff --git a/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt b/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..e5e7753bb42a 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt +++ b/src/Servers/Kestrel/Transport.NamedPipes/src/PublicAPI.Unshipped.txt @@ -1 +1,12 @@ #nullable enable +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.CreateNamedPipeServerStreamContext() -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.NamedPipeEndPoint.get -> Microsoft.AspNetCore.Connections.NamedPipeEndPoint! +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.NamedPipeEndPoint.init -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeOptions.get -> System.IO.Pipes.PipeOptions +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeOptions.init -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeSecurity.get -> System.IO.Pipes.PipeSecurity? +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext.PipeSecurity.init -> void +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateNamedPipeServerStream.get -> System.Func! +Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateNamedPipeServerStream.set -> void +static Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.NamedPipeTransportOptions.CreateDefaultNamedPipeServerStream(Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.CreateNamedPipeServerStreamContext! context) -> System.IO.Pipes.NamedPipeServerStream! diff --git a/src/Servers/Kestrel/Transport.NamedPipes/test/WebHostTests.cs b/src/Servers/Kestrel/Transport.NamedPipes/test/WebHostTests.cs index 591ea9cf7324..effc95f1ef5e 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/test/WebHostTests.cs +++ b/src/Servers/Kestrel/Transport.NamedPipes/test/WebHostTests.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Globalization; using System.IO.Pipes; using System.Net; using System.Net.Http; @@ -14,8 +15,8 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Internal; -using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.InternalTesting; +using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -268,6 +269,132 @@ public async Task ListenNamedPipeEndpoint_Impersonation_ClientSuccess() } } + [ConditionalFact] + [NamedPipesSupported] + public async Task ListenNamedPipeEndpoint_Security_PerEndpointSecuritySettings() + { + AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); + + // Arrange + using var httpEventSource = new HttpEventSourceListener(LoggerFactory); + var defaultSecurityPipeName = NamedPipeTestHelpers.GetUniquePipeName(); + var customSecurityPipeName = NamedPipeTestHelpers.GetUniquePipeName(); + + var builder = new HostBuilder() + .ConfigureWebHost(webHostBuilder => + { + webHostBuilder + .UseKestrel(o => + { + o.ListenNamedPipe(defaultSecurityPipeName, listenOptions => + { + listenOptions.Protocols = HttpProtocols.Http1; + }); + o.ListenNamedPipe(customSecurityPipeName, listenOptions => + { + listenOptions.Protocols = HttpProtocols.Http1; + }); + }) + .UseNamedPipes(options => + { + var defaultSecurity = new PipeSecurity(); + defaultSecurity.AddAccessRule(new PipeAccessRule("Users", PipeAccessRights.ReadWrite | PipeAccessRights.CreateNewInstance, AccessControlType.Allow)); + + options.PipeSecurity = defaultSecurity; + options.CurrentUserOnly = false; + options.CreateNamedPipeServerStream = (context) => + { + if (context.NamedPipeEndPoint.PipeName == defaultSecurityPipeName) + { + return NamedPipeTransportOptions.CreateDefaultNamedPipeServerStream(context); + } + + var allowSecurity = new PipeSecurity(); + allowSecurity.AddAccessRule(new PipeAccessRule("Users", PipeAccessRights.FullControl, AccessControlType.Allow)); + + return NamedPipeServerStreamAcl.Create( + context.NamedPipeEndPoint.PipeName, + PipeDirection.InOut, + NamedPipeServerStream.MaxAllowedServerInstances, + PipeTransmissionMode.Byte, + context.PipeOptions, + inBufferSize: 0, // Buffer in System.IO.Pipelines + outBufferSize: 0, // Buffer in System.IO.Pipelines + allowSecurity); + }; + }) + .Configure(app => + { + app.Run(async context => + { + var serverName = Thread.CurrentPrincipal.Identity.Name; + + var namedPipeStream = context.Features.Get().NamedPipe; + + var security = namedPipeStream.GetAccessControl(); + var rules = security.GetAccessRules(includeExplicit: true, includeInherited: false, typeof(SecurityIdentifier)); + + context.Response.Headers.Add("X-PipeAccessRights", ((int)rules.OfType().Single().PipeAccessRights).ToString(CultureInfo.InvariantCulture)); + + await context.Response.WriteAsync("hello, world"); + }); + }); + }) + .ConfigureServices(AddTestLogging); + + using (var host = builder.Build()) + { + await host.StartAsync().DefaultTimeout(); + + using (var client = CreateClient(defaultSecurityPipeName)) + { + var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1/") + { + Version = HttpVersion.Version11, + VersionPolicy = HttpVersionPolicy.RequestVersionExact + }; + + // Act + var response = await client.SendAsync(request).DefaultTimeout(); + + // Assert + response.EnsureSuccessStatusCode(); + Assert.Equal(HttpVersion.Version11, response.Version); + var responseText = await response.Content.ReadAsStringAsync().DefaultTimeout(); + Assert.Equal("hello, world", responseText); + + var pipeAccessRights = (PipeAccessRights)Convert.ToInt32(string.Join(",", response.Headers.GetValues("X-PipeAccessRights")), CultureInfo.InvariantCulture); + + Assert.Equal(PipeAccessRights.ReadWrite, pipeAccessRights & PipeAccessRights.ReadWrite); + Assert.Equal(PipeAccessRights.CreateNewInstance, pipeAccessRights & PipeAccessRights.CreateNewInstance); + } + + using (var client = CreateClient(customSecurityPipeName)) + { + var request = new HttpRequestMessage(HttpMethod.Get, $"http://127.0.0.1/") + { + Version = HttpVersion.Version11, + VersionPolicy = HttpVersionPolicy.RequestVersionExact + }; + + // Act + var response = await client.SendAsync(request).DefaultTimeout(); + + // Assert + response.EnsureSuccessStatusCode(); + Assert.Equal(HttpVersion.Version11, response.Version); + var responseText = await response.Content.ReadAsStringAsync().DefaultTimeout(); + Assert.Equal("hello, world", responseText); + + var pipeAccessRights = (PipeAccessRights)Convert.ToInt32(string.Join(",", response.Headers.GetValues("X-PipeAccessRights")), CultureInfo.InvariantCulture); + + Assert.Equal(PipeAccessRights.FullControl, pipeAccessRights & PipeAccessRights.FullControl); + } + + await host.StopAsync().DefaultTimeout(); + } + } + [ConditionalTheory] [NamedPipesSupported] [InlineData(HttpProtocols.Http1)] From 8ae09e848f048b8ceada23195de83c9db9d7901e Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Tue, 9 Jul 2024 09:05:27 -0700 Subject: [PATCH 141/257] [Blazor] Update Blazor Playwright template tests (#54606) --- eng/Npm.Workspace.nodeproj | 5 +- .../GenerateFiles/Directory.Build.targets.in | 5 +- src/ProjectTemplates/Shared/Project.cs | 36 +- .../Directory.Build.props.in | 14 + .../TestInfrastructure/PrepareForTest.targets | 25 +- .../BlazorTemplateTest.cs | 168 +++++++- .../BlazorWasmTemplateTest.cs | 358 +++--------------- .../BlazorWebTemplateTest.cs | 95 +++++ .../Templates.Blazor.Tests.csproj | 6 +- .../BlazorWasmTemplateAuthTest.cs | 23 +- .../ItemTemplateTests/BlazorServerTests.cs | 2 +- .../CommandLineUtils/Utilities/DotNetMuxer.cs | 43 ++- .../test/Shared.Tests/DotNetMuxerTests.cs | 19 +- 13 files changed, 431 insertions(+), 368 deletions(-) create mode 100644 src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs diff --git a/eng/Npm.Workspace.nodeproj b/eng/Npm.Workspace.nodeproj index 04e2ae3da87d..81c004313ac1 100644 --- a/eng/Npm.Workspace.nodeproj +++ b/eng/Npm.Workspace.nodeproj @@ -44,7 +44,6 @@ @@ -65,7 +64,9 @@ - + <_NpmGeneratedPackages Include="$(PackageOutputPath)/*.tgz" /> diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index a3e5d4742794..a056fb9edcfa 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -122,8 +122,9 @@ - false - false + + false + false false diff --git a/src/ProjectTemplates/Shared/Project.cs b/src/ProjectTemplates/Shared/Project.cs index 3b1c0588c96a..ed00a32f7f8e 100644 --- a/src/ProjectTemplates/Shared/Project.cs +++ b/src/ProjectTemplates/Shared/Project.cs @@ -66,13 +66,19 @@ internal async Task RunDotNetNewAsync( bool useLocalDB = false, bool noHttps = false, bool errorOnRestoreError = true, + bool isItemTemplate = false, string[] args = null, // Used to set special options in MSBuild IDictionary environmentVariables = null) { - var hiveArg = $" --debug:disable-sdk-templates --debug:custom-hive \"{TemplatePackageInstaller.CustomHivePath}\""; + var hiveArg = $"--debug:disable-sdk-templates --debug:custom-hive \"{TemplatePackageInstaller.CustomHivePath}\""; var argString = $"new {templateName} {hiveArg}"; environmentVariables ??= new Dictionary(); + if (!isItemTemplate) + { + argString += " --no-restore"; + } + if (!string.IsNullOrEmpty(auth)) { argString += $" --auth {auth}"; @@ -113,18 +119,30 @@ internal async Task RunDotNetNewAsync( Directory.Delete(TemplateOutputDir, recursive: true); } - using var execution = ProcessEx.Run(Output, AppContext.BaseDirectory, DotNetMuxer.MuxerPathOrDefault(), argString, environmentVariables); - await execution.Exited; + using var createExecution = ProcessEx.Run(Output, AppContext.BaseDirectory, DotNetMuxer.MuxerPathOrDefault(), argString, environmentVariables); + await createExecution.Exited; - var result = new ProcessResult(execution); + var createResult = new ProcessResult(createExecution); + Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", this, createResult)); - // Because dotnet new automatically restores but silently ignores restore errors, need to handle restore errors explicitly - if (errorOnRestoreError && (execution.Output.Contains("Restore failed.") || execution.Error.Contains("Restore failed."))) + if (!isItemTemplate) { - result.ExitCode = -1; - } + argString = "restore /bl"; + using var restoreExecution = ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), argString, environmentVariables); + await restoreExecution.Exited; - Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", this, result)); + var restoreResult = new ProcessResult(restoreExecution); + + // Because dotnet new automatically restores but silently ignores restore errors, need to handle restore errors explicitly + if (errorOnRestoreError && (restoreExecution.Output.Contains("Restore failed.") || restoreExecution.Error.Contains("Restore failed."))) + { + restoreResult.ExitCode = -1; + } + + CaptureBinLogOnFailure(restoreExecution); + + Assert.True(0 == restoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("restore", this, restoreResult)); + } } internal async Task RunDotNetPublishAsync(IDictionary packageOptions = null, string additionalArgs = null, bool noRestore = true) diff --git a/src/ProjectTemplates/TestInfrastructure/Directory.Build.props.in b/src/ProjectTemplates/TestInfrastructure/Directory.Build.props.in index 88c7d6173021..31b2ee9d6124 100644 --- a/src/ProjectTemplates/TestInfrastructure/Directory.Build.props.in +++ b/src/ProjectTemplates/TestInfrastructure/Directory.Build.props.in @@ -3,6 +3,20 @@ ${RepoRoot} ${ArtifactsBinDir} + + + ${TargetingPackLayoutRoot} + ${SharedFrameworkLayoutRoot} + + + true + true diff --git a/src/ProjectTemplates/TestInfrastructure/PrepareForTest.targets b/src/ProjectTemplates/TestInfrastructure/PrepareForTest.targets index 156b26ffb9cb..4e1a98035f07 100644 --- a/src/ProjectTemplates/TestInfrastructure/PrepareForTest.targets +++ b/src/ProjectTemplates/TestInfrastructure/PrepareForTest.targets @@ -26,6 +26,9 @@ $([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)')) $(TestTemplateCreationFolder)\Hives\$([System.Guid]::NewGuid())\.templateengine + $(TestTemplateCreationFolder)dotnet\ + <_DotNetHostFileName>dotnet + <_DotNetHostFileName Condition="$([MSBuild]::IsOSPlatform(`Windows`))">dotnet.exe @@ -48,10 +51,16 @@ <_Parameter1>TestTemplateCreationFolder <_Parameter2>$(TestTemplateCreationFolder) + <_Parameter1>CustomTemplateHivePath <_Parameter2>$(CustomTemplateHivePath) + + + <_Parameter1>DotNetHostOverride + <_Parameter2>$(TemplateTestDotNetRoot)$(_DotNetHostFileName) + @@ -72,6 +81,20 @@ + + <_FilesToCopy Include="$(LocalDotNetRoot)$(_DotNetHostFileName)" /> + <_FilesToCopy Include="$(LocalDotNetRoot)host\**\*" DestinationRelativeFolder="host\" /> + <_FilesToCopy Include="$(LocalDotNetRoot)shared\**\*" DestinationRelativeFolder="shared\" /> + <_FilesToCopy Include="$(LocalDotNetRoot)sdk\**\*" DestinationRelativeFolder="sdk\" /> + <_FilesToCopy Include="$(SharedFrameworkLayoutRoot)\**\*" /> + + <_DestinationFiles Include="@(_FilesToCopy->'$(TemplateTestDotNetRoot)%(DestinationRelativeFolder)%(RecursiveDir)%(Filename)%(Extension)')" /> + + + + @@ -84,7 +107,7 @@ diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs b/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs index cfded6021e29..f9bc0a14f181 100644 --- a/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs @@ -1,13 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.IO; using System.Runtime.InteropServices; -using System.Threading.Tasks; using Microsoft.AspNetCore.BrowserTesting; +using Microsoft.Playwright; using Templates.Test.Helpers; -using Xunit; namespace BlazorTemplates.Tests; @@ -18,14 +15,19 @@ public abstract class BlazorTemplateTest : BrowserTestBase public BlazorTemplateTest(ProjectFactoryFixture projectFactory) { ProjectFactory = projectFactory; - Microsoft.Playwright.Program.Main(new[] { "install" }); + Microsoft.Playwright.Program.Main(["install"]); } public ProjectFactoryFixture ProjectFactory { get; set; } public abstract string ProjectType { get; } - protected async Task CreateBuildPublishAsync(string auth = null, string[] args = null, string targetFramework = null, bool serverProject = false, bool onlyCreate = false) + protected async Task CreateBuildPublishAsync( + string auth = null, + string[] args = null, + string targetFramework = null, + Func getTargetProject = null, + bool onlyCreate = false) { // Additional arguments are needed. See: https://github.com/dotnet/aspnetcore/issues/24278 Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true"); @@ -38,21 +40,17 @@ protected async Task CreateBuildPublishAsync(string auth = null, string await project.RunDotNetNewAsync(ProjectType, auth: auth, args: args); + project = getTargetProject?.Invoke(project) ?? project; + if (!onlyCreate) { - var targetProject = project; - if (serverProject) - { - targetProject = GetSubProject(project, "Server", $"{project.ProjectName}.Server"); - } - - await targetProject.RunDotNetPublishAsync(noRestore: false); + await project.RunDotNetPublishAsync(noRestore: false); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. - await targetProject.RunDotNetBuildAsync(); + await project.RunDotNetBuildAsync(); } return project; @@ -83,6 +81,138 @@ public static bool TryValidateBrowserRequired(BrowserKind browserKind, bool isRe return isRequired; } + protected async Task TestBasicInteractionInNewPageAsync( + BrowserKind browserKind, + string listeningUri, + string appName, + BlazorTemplatePages pagesToExclude = BlazorTemplatePages.None, + bool usesAuth = false) + { + if (!BrowserManager.IsAvailable(browserKind)) + { + EnsureBrowserAvailable(browserKind); + return; + } + + await using var browser = await BrowserManager.GetBrowserInstance(browserKind, BrowserContextInfo); + var page = await browser.NewPageAsync(); + + Output.WriteLine($"Opening browser at {listeningUri}..."); + await page.GotoAsync(listeningUri, new() { WaitUntil = WaitUntilState.NetworkIdle }); + + await TestBasicInteractionAsync(page, appName, pagesToExclude, usesAuth); + + await page.CloseAsync(); + } + + protected async Task TestBasicInteractionAsync( + IPage page, + string appName, + BlazorTemplatePages pagesToExclude = BlazorTemplatePages.None, + bool usesAuth = false) + { + await page.WaitForSelectorAsync("nav"); + + if (!pagesToExclude.HasFlag(BlazorTemplatePages.Home)) + { + // Initially displays the home page + await page.WaitForSelectorAsync("h1 >> text=Hello, world!"); + + Assert.Equal("Home", (await page.TitleAsync()).Trim()); + } + + if (!pagesToExclude.HasFlag(BlazorTemplatePages.Counter)) + { + // Can navigate to the counter page + await Task.WhenAll( + page.WaitForNavigationAsync(new() { UrlString = "**/counter" }), + page.WaitForSelectorAsync("h1 >> text=Counter"), + page.WaitForSelectorAsync("p >> text=Current count: 0"), + page.ClickAsync("a[href=counter]")); + + // Clicking the counter button works + await IncrementCounterAsync(page); + } + + if (usesAuth) + { + await Task.WhenAll( + page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/Login**", WaitUntil = WaitUntilState.NetworkIdle }), + page.ClickAsync("text=Log in")); + + await Task.WhenAll( + page.WaitForSelectorAsync("[name=\"Input.Email\"]"), + page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/Register**", WaitUntil = WaitUntilState.NetworkIdle }), + page.ClickAsync("text=Register as a new user")); + + var userName = $"{Guid.NewGuid()}@example.com"; + var password = "[PLACEHOLDER]-1a"; + + await page.TypeAsync("[name=\"Input.Email\"]", userName); + await page.TypeAsync("[name=\"Input.Password\"]", password); + await page.TypeAsync("[name=\"Input.ConfirmPassword\"]", password); + + // We will be redirected to the RegisterConfirmation + await Task.WhenAll( + page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/RegisterConfirmation**", WaitUntil = WaitUntilState.NetworkIdle }), + page.ClickAsync("#registerSubmit")); + + // We will be redirected to the ConfirmEmail + await Task.WhenAll( + page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/ConfirmEmail**", WaitUntil = WaitUntilState.NetworkIdle }), + page.ClickAsync("text=Click here to confirm your account")); + + // Now we can login + await page.ClickAsync("text=Login"); + await page.WaitForSelectorAsync("[name=\"Input.Email\"]"); + await page.TypeAsync("[name=\"Input.Email\"]", userName); + await page.TypeAsync("[name=\"Input.Password\"]", password); + await page.ClickAsync("#login-submit"); + + // Need to navigate to fetch page + await page.GotoAsync(new Uri(page.Url).GetLeftPart(UriPartial.Authority)); + Assert.Equal(appName.Trim(), (await page.TitleAsync()).Trim()); + } + + if (!pagesToExclude.HasFlag(BlazorTemplatePages.Weather)) + { + await page.ClickAsync("a[href=weather]"); + await page.WaitForSelectorAsync("h1 >> text=Weather"); + + // Asynchronously loads and displays the table of weather forecasts + await page.WaitForSelectorAsync("table>tbody>tr"); + Assert.Equal(5, await page.Locator("p+table>tbody>tr").CountAsync()); + } + + static async Task IncrementCounterAsync(IPage page) + { + // Allow multiple click attempts because some interactive render modes + // won't be immediately available + const int MaxIncrementAttempts = 5; + const float IncrementTimeoutMilliseconds = 3000f; + for (var i = 0; i < MaxIncrementAttempts; i++) + { + await page.ClickAsync("p+button >> text=Click me"); + try + { + await page.WaitForSelectorAsync("p >> text=Current count: 1", new() + { + Timeout = IncrementTimeoutMilliseconds, + }); + + // The counter successfully incremented, so we're done + return; + } + catch (TimeoutException) + { + // The counter did not increment; try again + } + } + + Assert.Fail($"The counter did not increment after {MaxIncrementAttempts} attempts"); + } + } + protected void EnsureBrowserAvailable(BrowserKind browserKind) { Assert.False( @@ -92,4 +222,14 @@ protected void EnsureBrowserAvailable(BrowserKind browserKind) out var errorMessage), errorMessage); } + + [Flags] + protected enum BlazorTemplatePages + { + None = 0, + Home = 1, + Counter = 2, + Weather = 4, + All = ~0, + } } diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs index aadcabbea21b..1329beb45531 100644 --- a/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWasmTemplateTest.cs @@ -2,130 +2,81 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; using System.Text.Json; using System.Text.RegularExpressions; using Microsoft.AspNetCore.BrowserTesting; using Microsoft.AspNetCore.Internal; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.CommandLineUtils; using Microsoft.Playwright; using Templates.Test.Helpers; namespace BlazorTemplates.Tests; -public class BlazorWasmTemplateTest : BlazorTemplateTest +public class BlazorWasmTemplateTest(ProjectFactoryFixture projectFactory) : BlazorTemplateTest(projectFactory) { - public BlazorWasmTemplateTest(ProjectFactoryFixture projectFactory) - : base(projectFactory) { } - public override string ProjectType { get; } = "blazorwasm"; [Theory] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/47225")] [InlineData(BrowserKind.Chromium)] public async Task BlazorWasmStandaloneTemplate_Works(BrowserKind browserKind) { var project = await CreateBuildPublishAsync(); + var appName = project.ProjectName; // The service worker assets manifest isn't generated for non-PWA projects var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot"); Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js"); - await BuildAndRunTest(project.ProjectName, project, browserKind); + // Test the built project + using (var aspNetProcess = project.StartBuiltProjectAsync()) + { + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process)); + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + await TestBasicInteractionInNewPageAsync(browserKind, aspNetProcess.ListeningUri.AbsoluteUri, appName); + } + + // Test the published project var (serveProcess, listeningUri) = RunPublishedStandaloneBlazorProject(project); using (serveProcess) { - Output.WriteLine($"Opening browser at {listeningUri}..."); - if (BrowserManager.IsAvailable(browserKind)) - { - await using var browser = await BrowserManager.GetBrowserInstance(browserKind, BrowserContextInfo); - var page = await NavigateToPage(browser, listeningUri); - await TestBasicNavigation(project.ProjectName, page); - } - else - { - EnsureBrowserAvailable(browserKind); - } + await TestBasicInteractionInNewPageAsync(browserKind, listeningUri, appName); } } - private static async Task NavigateToPage(IBrowserContext browser, string listeningUri) - { - var page = await browser.NewPageAsync(); - await page.GotoAsync(listeningUri, new() { WaitUntil = WaitUntilState.NetworkIdle }); - return page; - } - - [Theory(Skip="https://github.com/dotnet/aspnetcore/issues/46430")] + [Theory] [InlineData(BrowserKind.Chromium)] - public async Task BlazorWasmHostedTemplate_Works(BrowserKind browserKind) + public async Task BlazorWasmStandalonePwaTemplate_Works(BrowserKind browserKind) { - var project = await CreateBuildPublishAsync(args: new[] { "--hosted" }, serverProject: true); - - var serverProject = GetSubProject(project, "Server", $"{project.ProjectName}.Server"); - - await BuildAndRunTest(project.ProjectName, serverProject, browserKind); - - using var aspNetProcess = serverProject.StartPublishedProjectAsync(); - - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", serverProject, aspNetProcess.Process)); + var project = await CreateBuildPublishAsync(args: ["--pwa"]); + var appName = project.ProjectName; - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - await AssertCompressionFormat(aspNetProcess, "br"); - - if (BrowserManager.IsAvailable(browserKind)) - { - await using var browser = await BrowserManager.GetBrowserInstance(browserKind, BrowserContextInfo); - var page = await browser.NewPageAsync(); - await aspNetProcess.VisitInBrowserAsync(page); - await TestBasicNavigation(project.ProjectName, page); - } - else - { - EnsureBrowserAvailable(browserKind); - } - } - - private static async Task AssertCompressionFormat(AspNetProcess aspNetProcess, string expectedEncoding) - { - var response = await aspNetProcess.SendRequest(() => + // Test the built project + using (var aspNetProcess = project.StartBuiltProjectAsync()) { - var request = new HttpRequestMessage(HttpMethod.Get, new Uri(aspNetProcess.ListeningUri, "/_framework/blazor.boot.json")); - // These are the same as chrome - request.Headers.AcceptEncoding.Clear(); - request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("gzip")); - request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("deflate")); - request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("br")); - - return request; - }); - Assert.Equal(expectedEncoding, response.Content.Headers.ContentEncoding.Single()); - } - - [Theory(Skip = "https://github.com/dotnet/aspnetcore/issues/45736")] - [InlineData(BrowserKind.Chromium)] - public async Task BlazorWasmStandalonePwaTemplate_Works(BrowserKind browserKind) - { - var project = await CreateBuildPublishAsync(args: new[] { "--pwa" }); + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process)); - await BuildAndRunTest(project.ProjectName, project, browserKind); + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + await TestBasicInteractionInNewPageAsync(browserKind, aspNetProcess.ListeningUri.AbsoluteUri, appName); + } ValidatePublishedServiceWorker(project); + // Test the published project if (BrowserManager.IsAvailable(browserKind)) { var (serveProcess, listeningUri) = RunPublishedStandaloneBlazorProject(project); await using var browser = await BrowserManager.GetBrowserInstance(browserKind, BrowserContextInfo); Output.WriteLine($"Opening browser at {listeningUri}..."); - var page = await NavigateToPage(browser, listeningUri); + var page = await browser.NewPageAsync(); + await page.GotoAsync(listeningUri, new() { WaitUntil = WaitUntilState.NetworkIdle }); using (serveProcess) { - await TestBasicNavigation(project.ProjectName, page); + await TestBasicInteractionAsync(page, project.ProjectName); } // The PWA template supports offline use. By now, the browser should have cached everything it needs, @@ -133,7 +84,7 @@ public async Task BlazorWasmStandalonePwaTemplate_Works(BrowserKind browserKind) await page.GotoAsync("about:blank"); await browser.SetOfflineAsync(true); await page.GotoAsync(listeningUri); - await TestBasicNavigation(project.ProjectName, page, skipFetchData: true); + await TestBasicInteractionAsync(page, project.ProjectName, pagesToExclude: BlazorTemplatePages.Weather); await page.CloseAsync(); } else @@ -142,52 +93,10 @@ public async Task BlazorWasmStandalonePwaTemplate_Works(BrowserKind browserKind) } } - [Theory(Skip = "https://github.com/dotnet/aspnetcore/issues/45736")] - [InlineData(BrowserKind.Chromium)] - public async Task BlazorWasmHostedPwaTemplate_Works(BrowserKind browserKind) - { - var project = await CreateBuildPublishAsync(args: new[] { "--hosted", "--pwa" }, serverProject: true); - - var serverProject = GetSubProject(project, "Server", $"{project.ProjectName}.Server"); - - await BuildAndRunTest(project.ProjectName, serverProject, browserKind); - - ValidatePublishedServiceWorker(serverProject); - - string listeningUri = null; - if (BrowserManager.IsAvailable(browserKind)) - { - await using var browser = await BrowserManager.GetBrowserInstance(browserKind, BrowserContextInfo); - IPage page = null; - using (var aspNetProcess = serverProject.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", serverProject, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - page = await browser.NewPageAsync(); - await aspNetProcess.VisitInBrowserAsync(page); - await TestBasicNavigation(project.ProjectName, page); - - // Note: we don't want to use aspNetProcess.ListeningUri because that isn't necessarily the HTTPS URI - listeningUri = new Uri(page.Url).GetLeftPart(UriPartial.Authority); - } - - // The PWA template supports offline use. By now, the browser should have cached everything it needs, - // so we can continue working even without the server. - // Since this is the hosted project, backend APIs won't work offline, so we need to skip "fetchdata" - await page.GotoAsync("about:blank"); - await browser.SetOfflineAsync(true); - await page.GotoAsync(listeningUri); - await TestBasicNavigation(project.ProjectName, page, skipFetchData: true); - await page.CloseAsync(); - } - else - { - EnsureBrowserAvailable(browserKind); - } - } + [Theory] + [MemberData(nameof(TemplateData))] + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_Works(TemplateInstance instance) + => CreateBuildPublishAsync(args: instance.Arguments, targetFramework: "netstandard2.1"); private static void ValidatePublishedServiceWorker(Project project) { @@ -210,50 +119,19 @@ private static void ValidatePublishedServiceWorker(Project project) var serviceWorkerAssetsManifestVersionJson = serviceWorkerAssetsManifestVersionMatch.Groups[1].Captures[0].Value; var serviceWorkerAssetsManifestVersion = JsonSerializer.Deserialize(serviceWorkerAssetsManifestVersionJson); Assert.True(serviceWorkerContents.Contains($"/* Manifest version: {serviceWorkerAssetsManifestVersion} */", StringComparison.Ordinal)); + + static string ReadFile(string basePath, string path) + { + var fullPath = Path.Combine(basePath, path); + var doesExist = File.Exists(fullPath); + + Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}"); + return File.ReadAllText(Path.Combine(basePath, path)); + } } public static TheoryData TemplateData => new TheoryData { - new TemplateInstance( - "blazorwasmhostedaadb2c", "-ho", - "-au", "IndividualB2C", - "--aad-b2c-instance", "example.b2clogin.com", - "-ssp", "b2c_1_siupin", - "--client-id", "clientId", - "--domain", "my-domain", - "--default-scope", "full", - "--app-id-uri", "ApiUri", - "--api-client-id", "1234123413241324"), - new TemplateInstance( - "blazorwasmhostedaad", "-ho", - "-au", "SingleOrg", - "--domain", "my-domain", - "--tenant-id", "tenantId", - "--client-id", "clientId", - "--default-scope", "full", - "--app-id-uri", "ApiUri", - "--api-client-id", "1234123413241324"), - new TemplateInstance( - "blazorwasmhostedaadgraph", "-ho", - "-au", "SingleOrg", - "--calls-graph", - "--domain", "my-domain", - "--tenant-id", "tenantId", - "--client-id", "clientId", - "--default-scope", "full", - "--app-id-uri", "ApiUri", - "--api-client-id", "1234123413241324"), - new TemplateInstance( - "blazorwasmhostedaadapi", "-ho", - "-au", "SingleOrg", - "--called-api-url", "\"https://graph.microsoft.com\"", - "--called-api-scopes", "user.readwrite", - "--domain", "my-domain", - "--tenant-id", "tenantId", - "--client-id", "clientId", - "--default-scope", "full", - "--app-id-uri", "ApiUri", - "--api-client-id", "1234123413241324"), new TemplateInstance( "blazorwasmstandaloneaadb2c", "-au", "IndividualB2C", @@ -281,160 +159,50 @@ public TemplateInstance(string name, params string[] arguments) public string[] Arguments { get; } } - [Theory(Skip = "https://github.com/dotnet/aspnetcore/issues/37782")] - [MemberData(nameof(TemplateData))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_Works(TemplateInstance instance) - => CreateBuildPublishAsync(args: instance.Arguments, targetFramework: "netstandard2.1"); - - protected async Task BuildAndRunTest(string appName, Project project, BrowserKind browserKind, bool usesAuth = false) - { - using var aspNetProcess = project.StartBuiltProjectAsync(); - - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - if (BrowserManager.IsAvailable(browserKind)) - { - await using var browser = await BrowserManager.GetBrowserInstance(browserKind, BrowserContextInfo); - var page = await browser.NewPageAsync(); - await aspNetProcess.VisitInBrowserAsync(page); - await TestBasicNavigation(appName, page, usesAuth); - await page.CloseAsync(); - } - else - { - EnsureBrowserAvailable(browserKind); - } - } - - private static async Task TestBasicNavigation(string appName, IPage page, bool usesAuth = false, bool skipFetchData = false) - { - await page.WaitForSelectorAsync("nav"); - - // Initially displays the home page - await page.WaitForSelectorAsync("h1 >> text=Hello, world!"); - - Assert.Equal("Home", (await page.TitleAsync()).Trim()); - - // Can navigate to the counter page - await Task.WhenAll( - page.WaitForNavigationAsync(new() { UrlString = "**/counter" }), - page.WaitForSelectorAsync("h1 >> text=Counter"), - page.WaitForSelectorAsync("p >> text=Current count: 0"), - page.ClickAsync("a[href=counter]")); - - // Clicking the counter button works - await Task.WhenAll( - page.WaitForSelectorAsync("p >> text=Current count: 1"), - page.ClickAsync("p+button >> text=Click me")); - - if (usesAuth) - { - await Task.WhenAll( - page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/Login**", WaitUntil = WaitUntilState.NetworkIdle }), - page.ClickAsync("text=Log in")); - - await Task.WhenAll( - page.WaitForSelectorAsync("[name=\"Input.Email\"]"), - page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/Register**", WaitUntil = WaitUntilState.NetworkIdle }), - page.ClickAsync("text=Register as a new user")); - - var userName = $"{Guid.NewGuid()}@example.com"; - var password = "[PLACEHOLDER]-1a"; - - await page.TypeAsync("[name=\"Input.Email\"]", userName); - await page.TypeAsync("[name=\"Input.Password\"]", password); - await page.TypeAsync("[name=\"Input.ConfirmPassword\"]", password); - - // We will be redirected to the RegisterConfirmation - await Task.WhenAll( - page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/RegisterConfirmation**", WaitUntil = WaitUntilState.NetworkIdle }), - page.ClickAsync("#registerSubmit")); - - // We will be redirected to the ConfirmEmail - await Task.WhenAll( - page.WaitForNavigationAsync(new() { UrlString = "**/Identity/Account/ConfirmEmail**", WaitUntil = WaitUntilState.NetworkIdle }), - page.ClickAsync("text=Click here to confirm your account")); - - // Now we can login - await page.ClickAsync("text=Login"); - await page.WaitForSelectorAsync("[name=\"Input.Email\"]"); - await page.TypeAsync("[name=\"Input.Email\"]", userName); - await page.TypeAsync("[name=\"Input.Password\"]", password); - await page.ClickAsync("#login-submit"); - - // Need to navigate to fetch page - await page.GotoAsync(new Uri(page.Url).GetLeftPart(UriPartial.Authority)); - Assert.Equal(appName.Trim(), (await page.TitleAsync()).Trim()); - } - - if (!skipFetchData) - { - await page.ClickAsync("a[href=weather]"); - await page.WaitForSelectorAsync("h1 >> text=Weather"); - - // Asynchronously loads and displays the table of weather forecasts - await page.WaitForSelectorAsync("table>tbody>tr"); - Assert.Equal(5, await page.Locator("p+table>tbody>tr").CountAsync()); - } - } - - private static string ReadFile(string basePath, string path) - { - var fullPath = Path.Combine(basePath, path); - var doesExist = File.Exists(fullPath); - - Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}"); - return File.ReadAllText(Path.Combine(basePath, path)); - } - private (ProcessEx, string url) RunPublishedStandaloneBlazorProject(Project project) { var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot"); Output.WriteLine("Running dotnet serve on published output..."); - var developmentCertificate = DevelopmentCertificate.Create(project.TemplateOutputDir); - var args = $"-S --pfx \"{developmentCertificate.CertificatePath}\" --pfx-pwd \"{developmentCertificate.CertificatePassword}\" --port 0"; var command = DotNetMuxer.MuxerPathOrDefault(); + string args; if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) { - args = $"serve " + args; + args = $"serve "; } else { command = "dotnet-serve"; - args = "--roll-forward LatestMajor " + args; // dotnet-serve targets net5.0 by default + args = "--roll-forward LatestMajor"; // dotnet-serve targets net5.0 by default } var serveProcess = ProcessEx.Run(TestOutputHelper, publishDir, command, args); var listeningUri = ResolveListeningUrl(serveProcess); return (serveProcess, listeningUri); - } - private static string ResolveListeningUrl(ProcessEx process) - { - var buffer = new List(); - try + static string ResolveListeningUrl(ProcessEx process) { - foreach (var line in process.OutputLinesAsEnumerable) + var buffer = new List(); + try { - if (line != null) + foreach (var line in process.OutputLinesAsEnumerable) { - buffer.Add(line); - if (line.Trim().Contains("https://", StringComparison.Ordinal) || line.Trim().Contains("http://", StringComparison.Ordinal)) + if (line != null) { - return line.Trim(); + buffer.Add(line); + if (line.Trim().Contains("https://", StringComparison.Ordinal) || line.Trim().Contains("http://", StringComparison.Ordinal)) + { + return line.Trim(); + } } } } - } - catch (OperationCanceledException) - { - } + catch (OperationCanceledException) + { + } - throw new InvalidOperationException(@$"Couldn't find listening url: -{string.Join(Environment.NewLine, buffer.Append(process.Error))}"); + throw new InvalidOperationException( + $"Couldn't find listening url:\n{string.Join(Environment.NewLine, buffer.Append(process.Error))}"); + } } } diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs b/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs new file mode 100644 index 000000000000..dc2cf5b63982 --- /dev/null +++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs @@ -0,0 +1,95 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using Microsoft.AspNetCore.BrowserTesting; +using Microsoft.AspNetCore.InternalTesting; +using Templates.Test.Helpers; + +namespace BlazorTemplates.Tests; + +public class BlazorWebTemplateTest(ProjectFactoryFixture projectFactory) : BlazorTemplateTest(projectFactory) +{ + public override string ProjectType => "blazor"; + + [ConditionalTheory] + [SkipNonHelix] + [InlineData(BrowserKind.Chromium, "None")] + [InlineData(BrowserKind.Chromium, "Server")] + [InlineData(BrowserKind.Chromium, "WebAssembly")] + [InlineData(BrowserKind.Chromium, "Auto")] + public async Task BlazorWebTemplate_Works(BrowserKind browserKind, string interactivityOption) + { + var project = await CreateBuildPublishAsync( + args: ["-int", interactivityOption], + getTargetProject: GetTargetProject); + + // There won't be a counter page when the 'None' interactivity option is used + var pagesToExclude = interactivityOption is "None" + ? BlazorTemplatePages.Counter + : BlazorTemplatePages.None; + + var appName = project.ProjectName; + + // Test the built project + using (var aspNetProcess = project.StartBuiltProjectAsync()) + { + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process)); + + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + await TestBasicInteractionInNewPageAsync(browserKind, aspNetProcess.ListeningUri.AbsoluteUri, appName, pagesToExclude); + } + + // Test the published project + using (var aspNetProcess = project.StartPublishedProjectAsync()) + { + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", project, aspNetProcess.Process)); + + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + + if (HasClientProject()) + { + await AssertWebAssemblyCompressionFormatAsync(aspNetProcess, "br"); + } + + await TestBasicInteractionInNewPageAsync(browserKind, aspNetProcess.ListeningUri.AbsoluteUri, appName, pagesToExclude); + } + + bool HasClientProject() + => interactivityOption is "WebAssembly" or "Auto"; + + Project GetTargetProject(Project rootProject) + { + if (HasClientProject()) + { + // Multiple projects were created, so we need to specifically select the server + // project to be used + return GetSubProject(rootProject, rootProject.ProjectName, rootProject.ProjectName); + } + + // In other cases, just use the root project + return rootProject; + } + } + + private static async Task AssertWebAssemblyCompressionFormatAsync(AspNetProcess aspNetProcess, string expectedEncoding) + { + var response = await aspNetProcess.SendRequest(() => + { + var request = new HttpRequestMessage(HttpMethod.Get, new Uri(aspNetProcess.ListeningUri, "/_framework/blazor.boot.json")); + // These are the same as chrome + request.Headers.AcceptEncoding.Clear(); + request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("gzip")); + request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("deflate")); + request.Headers.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("br")); + return request; + }); + Assert.Equal(expectedEncoding, response.Content.Headers.ContentEncoding.Single()); + } +} diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj b/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj index 1db85d5286fe..933f42dd9423 100644 --- a/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj +++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj @@ -54,8 +54,10 @@ - - + diff --git a/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/BlazorWasmTemplateAuthTest.cs b/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/BlazorWasmTemplateAuthTest.cs index 8e00c09a1e14..540c22178863 100644 --- a/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/BlazorWasmTemplateAuthTest.cs +++ b/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/BlazorWasmTemplateAuthTest.cs @@ -1,19 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.Json; -using System.Text.RegularExpressions; -using System.Threading.Tasks; using Microsoft.AspNetCore.InternalTesting; -using Newtonsoft.Json.Linq; using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; -using Xunit.Sdk; namespace Templates.Blazor.Test; @@ -95,31 +84,31 @@ public TemplateInstance(string name, string auth, params string[] arguments) [ConditionalTheory] [MemberData(nameof(TemplateDataIndividualB2C))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_IndividualB2C_Works(TemplateInstance instance) + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_IndividualB2C_Works(TemplateInstance instance) => CreateBuildPublishAsync(auth: instance.Auth, args: instance.Arguments, targetFramework: "netstandard2.1"); [ConditionalTheory] [MemberData(nameof(TemplateDataIndividualB2C))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_IndividualB2C_NoHttps_Works(TemplateInstance instance) + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_IndividualB2C_NoHttps_Works(TemplateInstance instance) => CreateBuildPublishAsync(auth: instance.Auth, args: instance.Arguments.Union(new[] { ArgConstants.NoHttps }).ToArray(), targetFramework: "netstandard2.1"); [ConditionalTheory] [MemberData(nameof(TemplateDataSingleOrg))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_SingleOrg_Works(TemplateInstance instance) + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_SingleOrg_Works(TemplateInstance instance) => CreateBuildPublishAsync(auth: instance.Auth, args: instance.Arguments, targetFramework: "netstandard2.1"); [ConditionalTheory] [MemberData(nameof(TemplateDataSingleOrg))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_SingleOrg_NoHttps_Works(TemplateInstance instance) + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_SingleOrg_NoHttps_Works(TemplateInstance instance) => CreateBuildPublishAsync(auth: instance.Auth, args: instance.Arguments.Union(new[] { ArgConstants.NoHttps }).ToArray(), targetFramework: "netstandard2.1"); [ConditionalTheory] [MemberData(nameof(TemplateDataSingleOrgProgramMain))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_SingleOrg_ProgramMain_Works(TemplateInstance instance) + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_SingleOrg_ProgramMain_Works(TemplateInstance instance) => CreateBuildPublishAsync(auth: instance.Auth, args: instance.Arguments, targetFramework: "netstandard2.1"); [ConditionalTheory] [MemberData(nameof(TemplateDataSingleOrgProgramMain))] - public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_SingleOrg_NoHttps_ProgramMain_Works(TemplateInstance instance) + public Task BlazorWasmStandaloneTemplate_AzureActiveDirectoryTemplate_SingleOrg_NoHttps_ProgramMain_Works(TemplateInstance instance) => CreateBuildPublishAsync(auth: instance.Auth, args: instance.Arguments.Union(new[] { ArgConstants.NoHttps }).ToArray(), targetFramework: "netstandard2.1"); } diff --git a/src/ProjectTemplates/test/Templates.Tests/ItemTemplateTests/BlazorServerTests.cs b/src/ProjectTemplates/test/Templates.Tests/ItemTemplateTests/BlazorServerTests.cs index f520e6cb600a..3035cd16d5d6 100644 --- a/src/ProjectTemplates/test/Templates.Tests/ItemTemplateTests/BlazorServerTests.cs +++ b/src/ProjectTemplates/test/Templates.Tests/ItemTemplateTests/BlazorServerTests.cs @@ -27,7 +27,7 @@ public async Task BlazorServerItemTemplate() { Project = await ProjectFactory.CreateProject(Output); - await Project.RunDotNetNewAsync("razorcomponent --name Different"); + await Project.RunDotNetNewAsync("razorcomponent --name Different", isItemTemplate: true); Project.AssertFileExists("Different.razor", shouldExist: true); Assert.Contains("

Different

", Project.ReadFile("Different.razor")); diff --git a/src/Shared/CommandLineUtils/Utilities/DotNetMuxer.cs b/src/Shared/CommandLineUtils/Utilities/DotNetMuxer.cs index d9f6b8c1f665..b65817648e96 100644 --- a/src/Shared/CommandLineUtils/Utilities/DotNetMuxer.cs +++ b/src/Shared/CommandLineUtils/Utilities/DotNetMuxer.cs @@ -9,6 +9,8 @@ using System; using System.Diagnostics; using System.IO; +using System.Linq; +using System.Reflection; using System.Runtime.InteropServices; namespace Microsoft.Extensions.CommandLineUtils; @@ -22,7 +24,7 @@ internal static class DotNetMuxer static DotNetMuxer() { - MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName); + MuxerPath = TryFindMuxerPath(); } /// @@ -38,18 +40,45 @@ static DotNetMuxer() public static string MuxerPathOrDefault() => MuxerPath ?? MuxerName; - internal static string? TryFindMuxerPath(string? mainModule) + private static string? TryFindMuxerPath() { - var fileName = MuxerName; + // If not running on Helix, use a custom .NET host, if specified. + // This allows test projects to use a .NET host with the custom-built + // ASP.NET Core shared framework. + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) + { + var dotNetHostOverride = typeof(DotNetMuxer).Assembly.GetCustomAttributes() + .SingleOrDefault(a => a.Key == "DotNetHostOverride")?.Value; + if (dotNetHostOverride is not null) + { + return dotNetHostOverride; + } + } + + var expectedFileName = MuxerName; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - fileName += ".exe"; + expectedFileName += ".exe"; + } + + // If the currently running process is dotnet(.exe), return that path + var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName; + var mainModuleFileName = Path.GetFileName(mainModuleFullPath); + if (string.Equals(expectedFileName, mainModuleFileName, StringComparison.OrdinalIgnoreCase)) + { + return mainModuleFullPath; } - if (!string.IsNullOrEmpty(mainModule) - && string.Equals(Path.GetFileName(mainModule!), fileName, StringComparison.OrdinalIgnoreCase)) + // The currently running process may not be dotnet(.exe). For example, + // it might be "testhost(.exe)" when running tests. + // In this case, we can get the location where the CLR is installed, + // and find dotnet(.exe) relative to that path. + var runtimeDirectory = RuntimeEnvironment.GetRuntimeDirectory(); + var candidateDotNetExePath = Path.Combine(runtimeDirectory, "..", "..", "..", expectedFileName); + if (File.Exists(candidateDotNetExePath)) { - return mainModule; + var normalizedPath = Path.GetFullPath(candidateDotNetExePath); + return normalizedPath; } return null; diff --git a/src/Shared/test/Shared.Tests/DotNetMuxerTests.cs b/src/Shared/test/Shared.Tests/DotNetMuxerTests.cs index 193f9582ac12..27b223f6e46f 100644 --- a/src/Shared/test/Shared.Tests/DotNetMuxerTests.cs +++ b/src/Shared/test/Shared.Tests/DotNetMuxerTests.cs @@ -14,28 +14,11 @@ public class DotNetMuxerTests [Fact] public void FindsTheMuxer() { - - var muxerPath = DotNetMuxer.TryFindMuxerPath(GetDotnetPath()); + var muxerPath = DotNetMuxer.MuxerPath; Assert.NotNull(muxerPath); Assert.True(File.Exists(muxerPath), "The file did not exist"); Assert.True(Path.IsPathRooted(muxerPath), "The path should be rooted"); Assert.Equal("dotnet", Path.GetFileNameWithoutExtension(muxerPath), ignoreCase: true); - - static string GetDotnetPath() - { - // Process.MainModule is app[.exe] and not `dotnet`. We can instead calculate the dotnet SDK path - // by looking at the shared fx directory instead. - // depsFile = /dotnet/shared/Microsoft.NETCore.App/6.0-preview2/Microsoft.NETCore.App.deps.json - var depsFile = (string)AppContext.GetData("FX_DEPS_FILE"); - return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(depsFile), "..", "..", "..", "dotnet" + (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : ""))); - } - } - - [Fact] - public void ReturnsNullIfMainModuleIsNotDotNet() - { - var muxerPath = DotNetMuxer.TryFindMuxerPath(@"d:\some-path\testhost.exe"); - Assert.Null(muxerPath); } } #endif From 53f01dcc13ef16ad1a3e39e42e09a99f8aa6a40b Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Tue, 9 Jul 2024 11:58:42 -0700 Subject: [PATCH 142/257] Scrub extension properties in OpenAPI document during serialization (#56688) --- .../src/Comparers/OpenApiAnyComparer.cs | 2 + .../OpenApiEndpointRouteBuilderExtensions.cs | 3 +- .../src/Schemas/OpenApiJsonSchema.Helpers.cs | 2 +- .../src/Services/OpenApiDocumentProvider.cs | 3 +- .../src/Services/OpenApiDocumentService.cs | 6 +- .../Services/Schemas/OpenApiSchemaStore.cs | 5 +- .../DelegateOpenApiDocumentTransformer.cs | 3 +- .../ScrubExtensionsTransformer.cs | 124 ------------------ src/OpenApi/src/Writers/ScrubbedOpenApiAny.cs | 30 +++++ .../src/Writers/ScrubbingOpenApiJsonWriter.cs | 30 +++++ .../test/Comparers/OpenApiAnyComparerTests.cs | 5 +- .../OpenApiDocumentIntegrationTests.cs | 2 +- .../OpenApiSchemaReferenceTransformerTests.cs | 54 ++++++++ 13 files changed, 128 insertions(+), 141 deletions(-) delete mode 100644 src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs create mode 100644 src/OpenApi/src/Writers/ScrubbedOpenApiAny.cs create mode 100644 src/OpenApi/src/Writers/ScrubbingOpenApiJsonWriter.cs diff --git a/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs b/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs index 7990446ab26e..d6c7d3362110 100644 --- a/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs +++ b/src/OpenApi/src/Comparers/OpenApiAnyComparer.cs @@ -42,6 +42,7 @@ public bool Equals(IOpenApiAny? x, IOpenApiAny? y) OpenApiByte byteX => y is OpenApiByte byteY && byteX.Value.SequenceEqual(byteY.Value), OpenApiDate dateX => y is OpenApiDate dateY && dateX.Value == dateY.Value, OpenApiDateTime dateTimeX => y is OpenApiDateTime dateTimeY && dateTimeX.Value == dateTimeY.Value, + ScrubbedOpenApiAny scrubbedX => y is ScrubbedOpenApiAny scrubbedY && scrubbedX.Value == scrubbedY.Value, _ => x.Equals(y) }); } @@ -73,6 +74,7 @@ public int GetHashCode(IOpenApiAny obj) OpenApiPassword password => password.Value, OpenApiDate date => date.Value, OpenApiDateTime dateTime => dateTime.Value, + ScrubbedOpenApiAny scrubbed => scrubbed.Value, _ => null }); diff --git a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs index ee105edddf6b..a5b7626ef6b5 100644 --- a/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs @@ -9,7 +9,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Writers; namespace Microsoft.AspNetCore.Builder; @@ -49,7 +48,7 @@ public static IEndpointConventionBuilder MapOpenApi(this IEndpointRouteBuilder e using var writer = Utf8BufferTextWriter.Get(output); try { - document.Serialize(new OpenApiJsonWriter(writer), documentOptions.OpenApiVersion); + document.Serialize(new ScrubbingOpenApiJsonWriter(writer), documentOptions.OpenApiVersion); context.Response.ContentType = "application/json;charset=utf-8"; await context.Response.BodyWriter.WriteAsync(output.ToArray(), context.RequestAborted); await context.Response.BodyWriter.FlushAsync(context.RequestAborted); diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index d069ce9836c4..bf683f5afac1 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -304,7 +304,7 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, break; case OpenApiConstants.SchemaId: reader.Read(); - schema.Extensions.Add(OpenApiConstants.SchemaId, new OpenApiString(reader.GetString())); + schema.Extensions.Add(OpenApiConstants.SchemaId, new ScrubbedOpenApiAny(reader.GetString())); break; // OpenAPI does not support the `const` keyword in its schema implementation, so // we map it to its closest approximation, an enum with a single value, here. diff --git a/src/OpenApi/src/Services/OpenApiDocumentProvider.cs b/src/OpenApi/src/Services/OpenApiDocumentProvider.cs index 88640d624319..a083441a2b3b 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentProvider.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentProvider.cs @@ -6,7 +6,6 @@ using Microsoft.Extensions.Options; using Microsoft.OpenApi; using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Writers; using System.Linq; namespace Microsoft.Extensions.ApiDescriptions; @@ -41,7 +40,7 @@ public async Task GenerateAsync(string documentName, TextWriter writer, OpenApiS // more info. var targetDocumentService = serviceProvider.GetRequiredKeyedService(documentName); var document = await targetDocumentService.GetOpenApiDocumentAsync(); - var jsonWriter = new OpenApiJsonWriter(writer); + var jsonWriter = new ScrubbingOpenApiJsonWriter(writer); document.Serialize(jsonWriter, openApiSpecVersion); } diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index a6b9db95a407..d3adb7f03c95 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -20,7 +20,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; namespace Microsoft.AspNetCore.OpenApi; @@ -34,7 +33,6 @@ internal sealed class OpenApiDocumentService( { private readonly OpenApiOptions _options = optionsMonitor.Get(documentName); private readonly OpenApiSchemaService _componentService = serviceProvider.GetRequiredKeyedService(documentName); - private readonly IOpenApiDocumentTransformer _scrubExtensionsTransformer = new ScrubExtensionsTransformer(); private readonly IOpenApiDocumentTransformer _schemaReferenceTransformer = new OpenApiSchemaReferenceTransformer(); private static readonly OpenApiEncoding _defaultFormEncoding = new OpenApiEncoding { Style = ParameterStyle.Form, Explode = true }; @@ -82,8 +80,6 @@ private async Task ApplyTransformersAsync(OpenApiDocument document, Cancellation } // Move duplicated JSON schemas to the global components.schemas object and map references after all transformers have run. await _schemaReferenceTransformer.TransformAsync(document, documentTransformerContext, cancellationToken); - // Remove `x-aspnetcore-id` and `x-schema-id` extensions from operations after all transformers have run. - await _scrubExtensionsTransformer.TransformAsync(document, documentTransformerContext, cancellationToken); } // Note: Internal for testing. @@ -126,7 +122,7 @@ private async Task> GetOperationsAsy foreach (var description in descriptions) { var operation = await GetOperationAsync(description, capturedTags, cancellationToken); - operation.Extensions.Add(OpenApiConstants.DescriptionId, new OpenApiString(description.ActionDescriptor.Id)); + operation.Extensions.Add(OpenApiConstants.DescriptionId, new ScrubbedOpenApiAny(description.ActionDescriptor.Id)); _operationTransformerContextCache.TryAdd(description.ActionDescriptor.Id, new OpenApiOperationTransformerContext { DocumentName = documentName, diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs index 2937a37ba5c1..c206176f8194 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaStore.cs @@ -4,7 +4,6 @@ using System.IO.Pipelines; using System.Text.Json.Nodes; using Microsoft.AspNetCore.Http; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; namespace Microsoft.AspNetCore.OpenApi; @@ -106,7 +105,7 @@ public void PopulateSchemaIntoReferenceCache(OpenApiSchema schema, bool captureS // ID to support disambiguating between a derived type on its own and a derived type // as part of a polymorphic schema. var baseTypeSchemaId = schema.Extensions.TryGetValue(OpenApiConstants.SchemaId, out var schemaId) - ? ((OpenApiString)schemaId).Value + ? ((ScrubbedOpenApiAny)schemaId).Value : null; foreach (var anyOfSchema in schema.AnyOf) { @@ -178,7 +177,7 @@ private void AddOrUpdateSchemaByReference(OpenApiSchema schema, string? baseType private static string? GetSchemaReferenceId(OpenApiSchema schema) { if (schema.Extensions.TryGetValue(OpenApiConstants.SchemaId, out var referenceIdAny) - && referenceIdAny is OpenApiString { Value: string referenceId }) + && referenceIdAny is ScrubbedOpenApiAny { Value: string referenceId }) { return referenceId; } diff --git a/src/OpenApi/src/Transformers/DelegateOpenApiDocumentTransformer.cs b/src/OpenApi/src/Transformers/DelegateOpenApiDocumentTransformer.cs index 7c7052ae8e76..56af755acf3d 100644 --- a/src/OpenApi/src/Transformers/DelegateOpenApiDocumentTransformer.cs +++ b/src/OpenApi/src/Transformers/DelegateOpenApiDocumentTransformer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Extensions.DependencyInjection; -using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; namespace Microsoft.AspNetCore.OpenApi; @@ -43,7 +42,7 @@ public async Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransf } if (operation.Extensions.TryGetValue(OpenApiConstants.DescriptionId, out var descriptionIdExtension) && - descriptionIdExtension is OpenApiString { Value: var descriptionId } && + descriptionIdExtension is ScrubbedOpenApiAny { Value: string descriptionId } && documentService.TryGetCachedOperationTransformerContext(descriptionId, out var operationContext)) { await _operationTransformer(operation, operationContext, cancellationToken); diff --git a/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs b/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs deleted file mode 100644 index d47f8242bc2b..000000000000 --- a/src/OpenApi/src/Transformers/Implementations/ScrubExtensionsTransformer.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.OpenApi.Models; - -namespace Microsoft.AspNetCore.OpenApi; - -/// -/// A transformer class that removes implementation-specific extension properties -/// from the OpenAPI document. -/// -internal sealed class ScrubExtensionsTransformer : IOpenApiDocumentTransformer -{ - public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken) - { - foreach (var pathItem in document.Paths.Values) - { - for (var i = 0; i < OpenApiConstants.OperationTypes.Length; i++) - { - var operationType = OpenApiConstants.OperationTypes[i]; - if (!pathItem.Operations.TryGetValue(operationType, out var operation)) - { - continue; - } - - operation.Extensions.Remove(OpenApiConstants.DescriptionId); - - if (operation.Parameters is not null) - { - foreach (var parameter in operation.Parameters) - { - ScrubSchemaIdExtension(parameter.Schema); - } - } - - if (operation.RequestBody is not null) - { - foreach (var content in operation.RequestBody.Content) - { - ScrubSchemaIdExtension(content.Value.Schema); - } - } - - if (operation.Responses is not null) - { - foreach (var response in operation.Responses.Values) - { - if (response.Content is not null) - { - foreach (var content in response.Content) - { - ScrubSchemaIdExtension(content.Value.Schema); - } - } - } - } - } - } - - foreach (var schema in document.Components.Schemas.Values) - { - ScrubSchemaIdExtension(schema); - } - - return Task.CompletedTask; - } - - internal static void ScrubSchemaIdExtension(OpenApiSchema? schema) - { - if (schema is null) - { - return; - } - - if (schema.AllOf is not null) - { - for (var i = 0; i < schema.AllOf.Count; i++) - { - ScrubSchemaIdExtension(schema.AllOf[i]); - } - } - - if (schema.OneOf is not null) - { - for (var i = 0; i < schema.OneOf.Count; i++) - { - ScrubSchemaIdExtension(schema.OneOf[i]); - } - } - - if (schema.AnyOf is not null) - { - for (var i = 0; i < schema.AnyOf.Count; i++) - { - ScrubSchemaIdExtension(schema.AnyOf[i]); - } - } - - if (schema.AdditionalProperties is not null) - { - ScrubSchemaIdExtension(schema.AdditionalProperties); - } - - if (schema.Items is not null) - { - ScrubSchemaIdExtension(schema.Items); - } - - if (schema.Properties is not null) - { - foreach (var property in schema.Properties) - { - ScrubSchemaIdExtension(schema.Properties[property.Key]); - } - } - - if (schema.Not is not null) - { - ScrubSchemaIdExtension(schema.Not); - } - - schema.Extensions.Remove(OpenApiConstants.SchemaId); - } -} diff --git a/src/OpenApi/src/Writers/ScrubbedOpenApiAny.cs b/src/OpenApi/src/Writers/ScrubbedOpenApiAny.cs new file mode 100644 index 000000000000..939ca06496c5 --- /dev/null +++ b/src/OpenApi/src/Writers/ScrubbedOpenApiAny.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.OpenApi; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Writers; + +namespace Microsoft.AspNetCore.OpenApi; + +/// +/// Represents an instance that does not serialize itself to +/// the outgoing document. +/// +/// The no-op implementation of the method +/// prevents the value of these properties from being written to disk. When used in conjunction with +/// the logic to exempt these properties from serialization in , +/// we achieve the desired result of not serializing these properties to the output document but retaining +/// them in the in-memory document. +/// +internal sealed class ScrubbedOpenApiAny(string? value) : IOpenApiAny +{ + public AnyType AnyType { get; } = AnyType.Primitive; + + public string? Value { get; } = value; + + public void Write(IOpenApiWriter writer, OpenApiSpecVersion specVersion) + { + return; + } +} diff --git a/src/OpenApi/src/Writers/ScrubbingOpenApiJsonWriter.cs b/src/OpenApi/src/Writers/ScrubbingOpenApiJsonWriter.cs new file mode 100644 index 000000000000..fdf9a00210d9 --- /dev/null +++ b/src/OpenApi/src/Writers/ScrubbingOpenApiJsonWriter.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.OpenApi.Writers; + +namespace Microsoft.AspNetCore.OpenApi; + +/// +/// Represents a JSON writer that scrubs certain properties from the output, +/// specifically the schema ID and description ID that are used for schema resolution +/// and action descriptor resolution in the in-memory OpenAPI document. +/// +/// In conjunction with this allows us to work around +/// the lack of an in-memory property bag on the OpenAPI object model and allows us to +/// avoid having to scrub the properties in the OpenAPI document prior to serialization. +/// +/// For more information, see https://github.com/microsoft/OpenAPI.NET/issues/1719. +/// +internal sealed class ScrubbingOpenApiJsonWriter(TextWriter textWriter) : OpenApiJsonWriter(textWriter) +{ + public override void WritePropertyName(string name) + { + if (name == OpenApiConstants.SchemaId || name == OpenApiConstants.DescriptionId) + { + return; + } + + base.WritePropertyName(name); + } +} diff --git a/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs b/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs index da0ea895fafe..7ef5afdfe2bb 100644 --- a/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs +++ b/src/OpenApi/test/Comparers/OpenApiAnyComparerTests.cs @@ -39,7 +39,10 @@ public class OpenApiAnyComparerTests [new OpenApiArray { new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value") }, true], [new OpenApiArray { new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value2") }, false], [new OpenApiArray { new OpenApiString("value2"), new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value"), new OpenApiString("value2") }, false], - [new OpenApiArray { new OpenApiString("value"), new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value"), new OpenApiString("value") }, true] + [new OpenApiArray { new OpenApiString("value"), new OpenApiString("value") }, new OpenApiArray { new OpenApiString("value"), new OpenApiString("value") }, true], + [new ScrubbedOpenApiAny("value"), new ScrubbedOpenApiAny("value"), true], + [new ScrubbedOpenApiAny("value"), new ScrubbedOpenApiAny("value2"), false], + [new ScrubbedOpenApiAny(null), new ScrubbedOpenApiAny(null), true] ]; [Theory] diff --git a/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs b/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs index def8474834f9..9655c4d09c53 100644 --- a/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs +++ b/src/OpenApi/test/Integration/OpenApiDocumentIntegrationTests.cs @@ -32,7 +32,7 @@ await Verifier.Verify(GetOpenApiJson(document)) private static string GetOpenApiJson(OpenApiDocument document) { using var textWriter = new StringWriter(CultureInfo.InvariantCulture); - var jsonWriter = new OpenApiJsonWriter(textWriter); + var jsonWriter = new ScrubbingOpenApiJsonWriter(textWriter); document.SerializeAsV3(jsonWriter); return textWriter.ToString(); } diff --git a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs index de63d9ed42dd..c746e3e97608 100644 --- a/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs +++ b/src/OpenApi/test/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs @@ -289,4 +289,58 @@ await VerifyOpenApiDocument(builder, options, document => Assert.False(responseSchema.GetEffective(document).Extensions.TryGetValue("x-my-extension", out var _)); }); } + + [Fact] + public static async Task ProducesStableSchemaRefsForListOf() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (List todo) => { }); + builder.MapPost("/api-2", (List todo) => { }); + + // Assert -- call twice to ensure the schema reference is stable + await VerifyOpenApiDocument(builder, VerifyDocument); + await VerifyOpenApiDocument(builder, VerifyDocument); + + static void VerifyDocument(OpenApiDocument document) + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody.Content["application/json"]; + var requestBodySchema = requestBody.Schema; + + var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; + var requestBody2 = operation2.RequestBody.Content["application/json"]; + var requestBodySchema2 = requestBody2.Schema; + + // { + // "$ref": "#/components/schemas/TodoList" + // } + // { + // "$ref": "#/components/schemas/TodoList" + // } + // { + // "components": { + // "schemas": { + // "ArrayOfTodo": { + // "type": "array", + // "items": { + // "$ref": "#/components/schemas/Todo" + // } + // } + // } + // } + // } + + // Both list types should point to the same reference ID + Assert.Equal("ArrayOfTodo", requestBodySchema.Reference.Id); + Assert.Equal(requestBodySchema.Reference.Id, requestBodySchema2.Reference.Id); + // The referenced schema has an array type + Assert.Equal("array", requestBodySchema.GetEffective(document).Type); + var itemsSchema = requestBodySchema.GetEffective(document).Items; + Assert.Equal("Todo", itemsSchema.Reference.Id); + Assert.Equal(4, itemsSchema.GetEffective(document).Properties.Count); + } + } } From 96f53b4cd0d39c378adf18d908d493ac3a7f522e Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Tue, 9 Jul 2024 20:19:36 +0100 Subject: [PATCH 143/257] Fix typos (#56530) "Correnct" => "Correct" "Lenght" => "Length" --- .../test/ResponseCompressionMiddlewareTest.cs | 2 +- .../IIS/AspNetCoreModuleV2/CommonLibTests/utility_tests.cpp | 2 +- src/Shared/test/Shared.Tests/UrlDecoderTests.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs b/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs index 15e49559ab1c..85d8fdc08b7a 100644 --- a/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs +++ b/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs @@ -126,7 +126,7 @@ public async Task RequestHead_AcceptGzipDeflate_CompressedGzip() { var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip", "deflate" }, responseType: TextPlain, httpMethod: HttpMethods.Head); - // Per RFC 7231, section 4.3.2, the Content-Lenght header can be omitted on HEAD requests. + // Per RFC 7231, section 4.3.2, the Content-Length header can be omitted on HEAD requests. CheckResponseCompressed(response, expectedBodyLength: null, expectedEncoding: "gzip"); AssertCompressedWithLog(logMessages, "gzip"); } diff --git a/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/utility_tests.cpp b/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/utility_tests.cpp index 9dbe7700990a..25c78565ca1f 100644 --- a/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/utility_tests.cpp +++ b/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/utility_tests.cpp @@ -43,7 +43,7 @@ TEST(PassUnexpandedEnvString, LongStringExpandsResults) } -TEST(GetEnvironmentVariableValue, ReturnsCorrectLenght) +TEST(GetEnvironmentVariableValue, ReturnsCorrectLength) { SetEnvironmentVariable(L"RANDOM_ENV_VAR_1", L"test"); diff --git a/src/Shared/test/Shared.Tests/UrlDecoderTests.cs b/src/Shared/test/Shared.Tests/UrlDecoderTests.cs index 6579624300b6..3d10ecd6f633 100644 --- a/src/Shared/test/Shared.Tests/UrlDecoderTests.cs +++ b/src/Shared/test/Shared.Tests/UrlDecoderTests.cs @@ -65,7 +65,7 @@ public void ByteDestinationShorterThanSourceDecodeRequestLineThrows() } [Fact] - public void StringDestinationLargerThanSourceDecodeRequestLineReturnsCorrenctLenght() + public void StringDestinationLargerThanSourceDecodeRequestLineReturnsCorrectLength() { var source = "/a%20b".ToCharArray(); var length = UrlDecoder.DecodeRequestLine(source.AsSpan(), new char[source.Length + 10]); @@ -73,7 +73,7 @@ public void StringDestinationLargerThanSourceDecodeRequestLineReturnsCorrenctLen } [Fact] - public void ByteDestinationLargerThanSourceDecodeRequestLineReturnsCorrenctLenght() + public void ByteDestinationLargerThanSourceDecodeRequestLineReturnsCorrectLength() { var source = Encoding.UTF8.GetBytes("/a%20b".ToCharArray()); var length = UrlDecoder.DecodeRequestLine(source.AsSpan(), new byte[source.Length + 10], false); From c52c28458e86029555bf1a88e94b64e7f37ef6d3 Mon Sep 17 00:00:00 2001 From: ladeak Date: Tue, 9 Jul 2024 23:10:05 +0200 Subject: [PATCH 144/257] Removing unsafe parts of Decode method in QueryStringEnumerable (#56630) * Using TryUnescapeDataString to avoid extra string allocation --------- Co-authored-by: ladeak --- .../QueryCollectionBenchmarks.cs | 17 ++++------------ src/Shared/QueryStringEnumerable.cs | 20 +++++++++---------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/Http/Http/perf/Microbenchmarks/QueryCollectionBenchmarks.cs b/src/Http/Http/perf/Microbenchmarks/QueryCollectionBenchmarks.cs index 6d5c8a93f63f..8804ba2ca495 100644 --- a/src/Http/Http/perf/Microbenchmarks/QueryCollectionBenchmarks.cs +++ b/src/Http/Http/perf/Microbenchmarks/QueryCollectionBenchmarks.cs @@ -13,19 +13,10 @@ namespace Microsoft.AspNetCore.Http; [CategoriesColumn] public class QueryCollectionBenchmarks { - private string _queryString; - private string _singleValue; - private string _singleValueWithPlus; - private string _encoded; - - [IterationSetup] - public void Setup() - { - _queryString = "?key1=value1&key2=value2&key3=value3&key4=&key5="; - _singleValue = "?key1=value1"; - _singleValueWithPlus = "?key1=value1+value2+value3"; - _encoded = "?key1=value%231"; - } + private const string _queryString = "?key1=value1&key2=value2&key3=value3&key4=&key5="; + private const string _singleValue = "?key1=value1"; + private const string _singleValueWithPlus = "?key1=value1+value2+value3"; + private const string _encoded = "?key1=value%231"; [Benchmark(Description = "ParseNew")] [BenchmarkCategory("QueryString")] diff --git a/src/Shared/QueryStringEnumerable.cs b/src/Shared/QueryStringEnumerable.cs index b857af1ac88c..65b74994934a 100644 --- a/src/Shared/QueryStringEnumerable.cs +++ b/src/Shared/QueryStringEnumerable.cs @@ -3,6 +3,7 @@ using System; using System.Buffers; +using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; @@ -88,21 +89,18 @@ public ReadOnlyMemory DecodeName() public ReadOnlyMemory DecodeValue() => Decode(EncodedValue); - private static unsafe ReadOnlyMemory Decode(ReadOnlyMemory chars) + private static ReadOnlyMemory Decode(ReadOnlyMemory chars) { - // If the value is short, it's cheap to check up front if it really needs decoding. If it doesn't, - // then we can save some allocations. - if (chars.Length < 16 && chars.Span.IndexOfAny('%', '+') < 0) + ReadOnlySpan source = chars.Span; + if (!source.ContainsAny('%', '+')) { return chars; } - -#pragma warning disable CS8500 // This takes the address of, gets the size of, or declares a pointer to a managed type - ReadOnlySpan span = chars.Span; - return Uri.UnescapeDataString( - string.Create(span.Length, - (IntPtr)(&span), static (dest, ptr) => ((ReadOnlySpan*)ptr)->Replace(dest, '+', ' '))).AsMemory(); -#pragma warning restore CS8500 + var buffer = new char[source.Length]; + source.Replace(buffer, '+', ' '); + var success = Uri.TryUnescapeDataString(buffer, buffer, out var unescapedLength); + Debug.Assert(success); + return buffer.AsMemory(0, unescapedLength); } } From a78ef02aeadf84869a0c35f915a2e46a762b00cd Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Wed, 10 Jul 2024 07:18:17 +0100 Subject: [PATCH 145/257] Use pattern matching (#56532) Use pattern matching to avoid casts. --- src/Http/Http.Abstractions/src/FragmentString.cs | 2 +- src/Http/Http.Abstractions/src/HostString.cs | 2 +- src/Http/Http.Abstractions/src/Internal/HeaderSegment.cs | 2 +- .../Http.Abstractions/src/Internal/HeaderSegmentCollection.cs | 2 +- src/Http/Http.Abstractions/src/QueryString.cs | 2 +- src/Shared/RazorViews/BaseView.cs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Http/Http.Abstractions/src/FragmentString.cs b/src/Http/Http.Abstractions/src/FragmentString.cs index 8849bee9021f..f2920b5f50da 100644 --- a/src/Http/Http.Abstractions/src/FragmentString.cs +++ b/src/Http/Http.Abstractions/src/FragmentString.cs @@ -128,7 +128,7 @@ public override bool Equals(object? obj) { return !HasValue; } - return obj is FragmentString && Equals((FragmentString)obj); + return obj is FragmentString value && Equals(value); } /// diff --git a/src/Http/Http.Abstractions/src/HostString.cs b/src/Http/Http.Abstractions/src/HostString.cs index 596c102782e8..39347033114f 100644 --- a/src/Http/Http.Abstractions/src/HostString.cs +++ b/src/Http/Http.Abstractions/src/HostString.cs @@ -298,7 +298,7 @@ public override bool Equals(object? obj) { return !HasValue; } - return obj is HostString && Equals((HostString)obj); + return obj is HostString value && Equals(value); } /// diff --git a/src/Http/Http.Abstractions/src/Internal/HeaderSegment.cs b/src/Http/Http.Abstractions/src/Internal/HeaderSegment.cs index e856434cdf11..c1d6dc7d8201 100644 --- a/src/Http/Http.Abstractions/src/Internal/HeaderSegment.cs +++ b/src/Http/Http.Abstractions/src/Internal/HeaderSegment.cs @@ -41,7 +41,7 @@ public override bool Equals(object? obj) return false; } - return obj is HeaderSegment && Equals((HeaderSegment)obj); + return obj is HeaderSegment value && Equals(value); } public override int GetHashCode() diff --git a/src/Http/Http.Abstractions/src/Internal/HeaderSegmentCollection.cs b/src/Http/Http.Abstractions/src/Internal/HeaderSegmentCollection.cs index eebd401dbe31..d65cd7585b9d 100644 --- a/src/Http/Http.Abstractions/src/Internal/HeaderSegmentCollection.cs +++ b/src/Http/Http.Abstractions/src/Internal/HeaderSegmentCollection.cs @@ -27,7 +27,7 @@ public override bool Equals(object? obj) return false; } - return obj is HeaderSegmentCollection && Equals((HeaderSegmentCollection)obj); + return obj is HeaderSegmentCollection collection && Equals(collection); } public override int GetHashCode() diff --git a/src/Http/Http.Abstractions/src/QueryString.cs b/src/Http/Http.Abstractions/src/QueryString.cs index 726f614c26bf..f2486af5f128 100644 --- a/src/Http/Http.Abstractions/src/QueryString.cs +++ b/src/Http/Http.Abstractions/src/QueryString.cs @@ -231,7 +231,7 @@ public override bool Equals(object? obj) { return !HasValue; } - return obj is QueryString && Equals((QueryString)obj); + return obj is QueryString query && Equals(query); } /// diff --git a/src/Shared/RazorViews/BaseView.cs b/src/Shared/RazorViews/BaseView.cs index d2fca2e22c00..52a63d8621f1 100644 --- a/src/Shared/RazorViews/BaseView.cs +++ b/src/Shared/RazorViews/BaseView.cs @@ -193,9 +193,9 @@ protected void WriteAttribute( // instead of the string 'true'. If the value is the bool 'false' we don't want to write anything. // Otherwise the value is another object (perhaps an HtmlString) and we'll ask it to format itself. string? stringValue; - if (value.Value is bool) + if (value.Value is bool flag) { - if ((bool)value.Value) + if (flag) { stringValue = name; } From f22f7ba927cb344245f9522f854547ad169c1105 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Thu, 11 Jul 2024 01:39:52 +1000 Subject: [PATCH 146/257] Renable GracefulTurnsAbortiveIfRequestsDoNotFinish (#56720) --- src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs index 0bc6dfe31a03..7b2469a1b217 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs @@ -161,7 +161,6 @@ public async Task GracefulShutdownWaitsForRequestsToFinish() } [ConditionalFact] - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/39986")] public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish() { var requestStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); From 21a7d25b9a1986217bf8b042b75351e6d4a5cb0a Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 10 Jul 2024 09:54:49 -0700 Subject: [PATCH 147/257] Add requirements comment to update-npm-dependencies (#56670) * Add requirements comment to update-npm-dependencies Unfortunately, it can't be run in a CodeSpace since `vsts-npm-auth` only works on Windows. * Add note about GH CLI --- eng/scripts/update-npm-dependencies.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/scripts/update-npm-dependencies.ps1 b/eng/scripts/update-npm-dependencies.ps1 index c3aac4b4c0ec..47a04484366a 100644 --- a/eng/scripts/update-npm-dependencies.ps1 +++ b/eng/scripts/update-npm-dependencies.ps1 @@ -1,3 +1,6 @@ +# This script needs to be run on PowerShell 7+ (for ConvertFrom-Json) on Windows (for vsts-npm-auth). +# The GitHub CLI (gh) is required unless `-SkipPullRequestCreation` is passed. + param ( [switch]$WhatIf, [switch]$SkipPullRequestCreation From 7473506d964bbf2e6f99dbbc34e90a563dcd8c9b Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Wed, 10 Jul 2024 19:00:01 +0100 Subject: [PATCH 148/257] fix #56581 (#56719) - RemoveKeyAsync incorrectly calling RemoveByTagAsync - add Remove tests - drive-by fix async void tests (probably auto-IDE) --- src/Caching/Hybrid/src/Runtime/HybridCache.cs | 2 +- src/Caching/Hybrid/test/FunctionalTests.cs | 82 +++++++++++++++++++ src/Caching/Hybrid/test/SampleUsage.cs | 13 +-- 3 files changed, 87 insertions(+), 10 deletions(-) create mode 100644 src/Caching/Hybrid/test/FunctionalTests.cs diff --git a/src/Caching/Hybrid/src/Runtime/HybridCache.cs b/src/Caching/Hybrid/src/Runtime/HybridCache.cs index 090da99bf867..8c239c82106d 100644 --- a/src/Caching/Hybrid/src/Runtime/HybridCache.cs +++ b/src/Caching/Hybrid/src/Runtime/HybridCache.cs @@ -81,7 +81,7 @@ public virtual ValueTask RemoveAsync(IEnumerable keys, CancellationToken { // for consistency with GetOrCreate/Set: interpret null as "none" null or ICollection { Count: 0 } => default, - ICollection { Count: 1 } => RemoveByTagAsync(keys.Single(), token), + ICollection { Count: 1 } => RemoveAsync(keys.Single(), token), _ => ForEachAsync(this, keys, token), }; diff --git a/src/Caching/Hybrid/test/FunctionalTests.cs b/src/Caching/Hybrid/test/FunctionalTests.cs new file mode 100644 index 000000000000..65993939aa1e --- /dev/null +++ b/src/Caching/Hybrid/test/FunctionalTests.cs @@ -0,0 +1,82 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using Microsoft.Extensions.Caching.Hybrid.Internal; +using Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.Extensions.Caching.Hybrid.Tests; +public class FunctionalTests +{ + static ServiceProvider GetDefaultCache(out DefaultHybridCache cache, Action? config = null) + { + var services = new ServiceCollection(); + config?.Invoke(services); + services.AddHybridCache(); + var provider = services.BuildServiceProvider(); + cache = Assert.IsType(provider.GetRequiredService()); + return provider; + } + + [Fact] + public async Task RemoveSingleKey() + { + using var provider = GetDefaultCache(out var cache); + var key = Me(); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(42))); + + // now slightly different func to show delta; should use cached value initially + await cache.RemoveAsync("unrelated"); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + + // now remove and repeat - should get updated value + await cache.RemoveAsync(key); + Assert.Equal(96, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + } + + [Fact] + public async Task RemoveNoKeyViaArray() + { + using var provider = GetDefaultCache(out var cache); + var key = Me(); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(42))); + + // now slightly different func to show delta; should use same cached value + await cache.RemoveAsync([]); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + } + + [Fact] + public async Task RemoveSingleKeyViaArray() + { + using var provider = GetDefaultCache(out var cache); + var key = Me(); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(42))); + + // now slightly different func to show delta; should use cached value initially + await cache.RemoveAsync(["unrelated"]); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + + // now remove and repeat - should get updated value + await cache.RemoveAsync([key]); + Assert.Equal(96, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + } + + [Fact] + public async Task RemoveMultipleKeysViaArray() + { + using var provider = GetDefaultCache(out var cache); + var key = Me(); + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(42))); + + // now slightly different func to show delta; should use cached value initially + Assert.Equal(42, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + + // now remove and repeat - should get updated value + await cache.RemoveAsync([key, "unrelated"]); + Assert.Equal(96, await cache.GetOrCreateAsync(key, _ => new ValueTask(96))); + } + + private static string Me([CallerMemberName] string caller = "") => caller; + +} diff --git a/src/Caching/Hybrid/test/SampleUsage.cs b/src/Caching/Hybrid/test/SampleUsage.cs index f2bcc19de6cd..8d65d5aeff9f 100644 --- a/src/Caching/Hybrid/test/SampleUsage.cs +++ b/src/Caching/Hybrid/test/SampleUsage.cs @@ -1,13 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; using System.Text.Json; -using System.Threading.Tasks; using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.DependencyInjection; @@ -16,7 +11,7 @@ namespace Microsoft.Extensions.Caching.Hybrid.Tests; public class SampleUsage { [Fact] - public async void DistributedCacheWorks() + public async Task DistributedCacheWorks() { var services = new ServiceCollection(); services.AddDistributedMemoryCache(); @@ -36,7 +31,7 @@ public async void DistributedCacheWorks() } [Fact] - public async void HybridCacheWorks() + public async Task HybridCacheWorks() { var services = new ServiceCollection(); services.AddHybridCache(); @@ -56,7 +51,7 @@ public async void HybridCacheWorks() } [Fact] - public async void HybridCacheNoCaptureWorks() + public async Task HybridCacheNoCaptureWorks() { var services = new ServiceCollection(); services.AddHybridCache(); @@ -76,7 +71,7 @@ public async void HybridCacheNoCaptureWorks() } [Fact] - public async void HybridCacheNoCaptureObjReuseWorks() + public async Task HybridCacheNoCaptureObjReuseWorks() { var services = new ServiceCollection(); services.AddHybridCache(); From 1abdad04a85dc48815104964ef5d3fecacbdc23a Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Wed, 10 Jul 2024 11:33:30 -0700 Subject: [PATCH 149/257] Lock around Http3Stream data frame processing (#56705) Follows the same pattern as Http2Stream: https://github.com/dotnet/aspnetcore/blob/main/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs#L463 and https://github.com/dotnet/aspnetcore/blob/38fe7dd594bde10cc9c9c3c710947af14d3117b3/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs#L490 Co-authored-by: Brennan Conroy --- .../Core/src/Internal/Http3/Http3Stream.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs index 3ce5cdcad632..2fc0767afc3f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs @@ -63,6 +63,7 @@ internal abstract partial class Http3Stream : HttpProtocol, IHttp3Stream, IHttpS public bool EndStreamReceived => (_completionState & StreamCompletionFlags.EndStreamReceived) == StreamCompletionFlags.EndStreamReceived; public bool IsAborted => (_completionState & StreamCompletionFlags.Aborted) == StreamCompletionFlags.Aborted; + private bool IsAbortedRead => (_completionState & StreamCompletionFlags.AbortedRead) == StreamCompletionFlags.AbortedRead; public bool IsCompleted => (_completionState & StreamCompletionFlags.Completed) == StreamCompletionFlags.Completed; public Pipe RequestBodyPipe { get; private set; } = default!; @@ -899,12 +900,20 @@ private Task ProcessDataFrameAsync(in ReadOnlySequence payload) InputRemaining -= payload.Length; } - foreach (var segment in payload) + lock (_completionLock) { - RequestBodyPipe.Writer.Write(segment.Span); - } + if (IsAborted || IsAbortedRead) + { + return Task.CompletedTask; + } - return RequestBodyPipe.Writer.FlushAsync().GetAsTask(); + foreach (var segment in payload) + { + RequestBodyPipe.Writer.Write(segment.Span); + } + + return RequestBodyPipe.Writer.FlushAsync().GetAsTask(); + } } protected override void OnReset() From d4e43fc67f4d22cf8760787bc4485cfc51821c54 Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 10 Jul 2024 12:39:40 -0700 Subject: [PATCH 150/257] Revert "Quarantine flaky MVC functional tests (#55935)" (#56615) --- .../test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs | 1 - .../Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs | 1 - .../test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs | 1 - .../test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs | 2 -- .../Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs | 1 - src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs | 1 - src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs | 1 - .../test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs | 1 - src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureTests.cs | 2 -- 9 files changed, 11 deletions(-) diff --git a/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs index 96663a73cf1f..b944a9da0d64 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ClientValidationOptionsTests.cs @@ -24,7 +24,6 @@ public override void Dispose() public MvcTestFixture Factory { get; private set; } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55926")] [Fact] public async Task DisablingClientValidation_DisablesItForPagesAndViews() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs b/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs index 21acf9a563a7..d319827f9a33 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ComponentRenderingFunctionalTests.cs @@ -45,7 +45,6 @@ public async Task Renders_BasicComponent() AssertComponent("

Hello world!

", "Greetings", content); } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55928")] [Fact] public async Task Renders_RoutingComponent() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs b/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs index 5fb2f304f6a2..7821ed967ef4 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/ControllerEndpointFiltersTest.cs @@ -33,7 +33,6 @@ public override void Dispose() public WebApplicationFactory Factory { get; private set; } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55929")] [Fact] public async Task CanApplyEndpointFilterToController() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs index c99b02591af1..ed0c7b417490 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationWithCultureTest.cs @@ -38,7 +38,6 @@ public override void Dispose() public WebApplicationFactory Factory { get; private set; } public HttpClient Client { get; private set; } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/4907")] [Fact] public async Task CacheTagHelper_AllowsVaryingByCulture() { @@ -83,7 +82,6 @@ void ReadValuesFromDocument() } } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/4907")] [Fact] public async Task CacheTagHelper_AllowsVaryingByUICulture() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs index 127975092ed6..0a6d9e8f1a23 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingAcrossPipelineBranchesTest.cs @@ -33,7 +33,6 @@ public override void Dispose() public WebApplicationFactory Factory { get; private set; } public HttpClient Client { get; private set; } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55933")] [Fact] public async Task MatchesConventionalRoutesInTheirBranches() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs index 52b61ee7e1c3..5afd71b8b989 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingDynamicOrderTest.cs @@ -52,7 +52,6 @@ public async Task PrefersAttributeRoutesOverDynamicControllerRoutes() Assert.Equal("AttributeRouteSlug", content.RouteName); } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55934")] [Fact] public async Task DynamicRoutesAreMatchedInDefinitionOrderOverPrecedence() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs index 01176a8fa630..280ba163c8a9 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsTest.cs @@ -34,7 +34,6 @@ public override void Dispose() public WebApplicationFactory Factory { get; private set; } public HttpClient Client { get; private set; } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55931")] [Fact] public async Task MatchesControllerGroup() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs index 30788a036f4c..0e0525722bb0 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RoutingGroupsWithMetadataTest.cs @@ -31,7 +31,6 @@ public override void Dispose() public WebApplicationFactory Factory { get; private set; } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55927")] [Fact] public async Task OrderedGroupMetadataForControllers() { diff --git a/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureTests.cs b/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureTests.cs index 905c64116759..b7ceb9084746 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureTests.cs @@ -7,7 +7,6 @@ using BasicWebSite; using BasicWebSite.Controllers; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.Mvc.Testing.Handlers; using Microsoft.AspNetCore.TestHost; @@ -137,7 +136,6 @@ public async Task TestingInfrastructure_RedirectHandlerHandlesRelativeLocation() Assert.Equal(HttpStatusCode.OK, response.StatusCode); } - [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/55932")] [Fact] public async Task TestingInfrastructure_RedirectHandlerFollowsStatusCode303() { From d498542df808acd09f3370c1f17be301da772f07 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Wed, 10 Jul 2024 14:37:42 -0700 Subject: [PATCH 151/257] Set OpenApiServers object in document (#56470) * Set readOnly status for properties * Set supported servers from IServerAddressFeature * Revert "Set readOnly status for properties" This reverts commit dbe3bae2120070445464086e9b2e668b6a3f4b4d. * Address feedback * Add explicit check for Development environment * Add test for feature with multiple values --- .../src/Services/OpenApiDocumentService.cs | 16 ++- .../OpenApiDocumentServiceTests.Info.cs | 6 +- .../OpenApiDocumentServiceTests.Servers.cs | 109 ++++++++++++++++++ .../OpenApiDocumentServiceTestsBase.cs | 34 +++++- 4 files changed, 160 insertions(+), 5 deletions(-) create mode 100644 src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs diff --git a/src/OpenApi/src/Services/OpenApiDocumentService.cs b/src/OpenApi/src/Services/OpenApiDocumentService.cs index d3adb7f03c95..e92fc43bf073 100644 --- a/src/OpenApi/src/Services/OpenApiDocumentService.cs +++ b/src/OpenApi/src/Services/OpenApiDocumentService.cs @@ -9,6 +9,8 @@ using System.IO.Pipelines; using System.Linq; using System.Reflection; +using Microsoft.AspNetCore.Hosting.Server; +using Microsoft.AspNetCore.Hosting.Server.Features; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Metadata; using Microsoft.AspNetCore.Mvc; @@ -29,7 +31,8 @@ internal sealed class OpenApiDocumentService( IApiDescriptionGroupCollectionProvider apiDescriptionGroupCollectionProvider, IHostEnvironment hostEnvironment, IOptionsMonitor optionsMonitor, - IServiceProvider serviceProvider) + IServiceProvider serviceProvider, + IServer? server = null) { private readonly OpenApiOptions _options = optionsMonitor.Get(documentName); private readonly OpenApiSchemaService _componentService = serviceProvider.GetRequiredKeyedService(documentName); @@ -58,6 +61,7 @@ public async Task GetOpenApiDocumentAsync(CancellationToken can { Info = GetOpenApiInfo(), Paths = await GetOpenApiPathsAsync(capturedTags, cancellationToken), + Servers = GetOpenApiServers(), Tags = [.. capturedTags] }; await ApplyTransformersAsync(document, cancellationToken); @@ -92,6 +96,16 @@ internal OpenApiInfo GetOpenApiInfo() }; } + internal List GetOpenApiServers() + { + if (hostEnvironment.IsDevelopment() && + server?.Features.Get()?.Addresses is { Count: > 0 } addresses) + { + return addresses.Select(address => new OpenApiServer { Url = address }).ToList(); + } + return []; + } + /// /// Gets the OpenApiPaths for the document based on the ApiDescriptions. /// diff --git a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Info.cs b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Info.cs index 3f201381c0f7..6d4f289ec22e 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Info.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Info.cs @@ -23,7 +23,8 @@ public void GetOpenApiInfo_RespectsHostEnvironmentName() new Mock().Object, hostEnvironment, new Mock>().Object, - new Mock().Object); + new Mock().Object, + new OpenApiTestServer()); // Act var info = docService.GetOpenApiInfo(); @@ -45,7 +46,8 @@ public void GetOpenApiInfo_RespectsDocumentName() new Mock().Object, hostEnvironment, new Mock>().Object, - new Mock().Object); + new Mock().Object, + new OpenApiTestServer()); // Act var info = docService.GetOpenApiInfo(); diff --git a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs new file mode 100644 index 000000000000..4426e3d0c04f --- /dev/null +++ b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Servers.cs @@ -0,0 +1,109 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting.Internal; +using Microsoft.Extensions.Options; +using Moq; + +public partial class OpenApiDocumentServiceTests +{ + [Fact] + public void GetOpenApiServers_HandlesServerAddressFeatureWithValues() + { + // Arrange + var hostEnvironment = new HostingEnvironment + { + ApplicationName = "TestApplication", + EnvironmentName = "Development" + }; + var docService = new OpenApiDocumentService( + "v1", + new Mock().Object, + hostEnvironment, + new Mock>().Object, + new Mock().Object, + new OpenApiTestServer(["http://localhost:5000"])); + + // Act + var servers = docService.GetOpenApiServers(); + + // Assert + Assert.Contains("http://localhost:5000", servers.Select(s => s.Url)); + } + + [Fact] + public void GetOpenApiServers_HandlesServerAddressFeatureWithMultipleValues() + { + // Arrange + var hostEnvironment = new HostingEnvironment + { + ApplicationName = "TestApplication", + EnvironmentName = "Development" + }; + var docService = new OpenApiDocumentService( + "v1", + new Mock().Object, + hostEnvironment, + new Mock>().Object, + new Mock().Object, + new OpenApiTestServer(["http://localhost:5000", "http://localhost:5002"])); + + // Act + var servers = docService.GetOpenApiServers(); + + // Assert + Assert.Contains("http://localhost:5000", servers.Select(s => s.Url)); + Assert.Contains("http://localhost:5002", servers.Select(s => s.Url)); + } + + [Fact] + public void GetOpenApiServers_HandlesNonDevelopmentEnvironment() + { + // Arrange + var hostEnvironment = new HostingEnvironment + { + ApplicationName = "TestApplication", + EnvironmentName = "Production" + }; + var docService = new OpenApiDocumentService( + "v1", + new Mock().Object, + hostEnvironment, + new Mock>().Object, + new Mock().Object, + new OpenApiTestServer(["http://localhost:5000"])); + + // Act + var servers = docService.GetOpenApiServers(); + + // Assert + Assert.Empty(servers); + } + + [Fact] + public void GetOpenApiServers_HandlesServerAddressFeatureWithNoValues() + { + // Arrange + var hostEnvironment = new HostingEnvironment + { + ApplicationName = "TestApplication", + EnvironmentName = "Development" + }; + var docService = new OpenApiDocumentService( + "v2", + new Mock().Object, + hostEnvironment, + new Mock>().Object, + new Mock().Object, + new OpenApiTestServer()); + + // Act + var servers = docService.GetOpenApiServers(); + + // Assert + Assert.Empty(servers); + } +} diff --git a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs index 9b72ee79e8df..ebad522b54f7 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs @@ -3,6 +3,9 @@ using System.Reflection; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting.Server; +using Microsoft.AspNetCore.Hosting.Server.Features; +using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; @@ -75,7 +78,7 @@ internal static OpenApiDocumentService CreateDocumentService(ActionDescriptor ac var schemaService = new OpenApiSchemaService("Test", Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), builder.ServiceProvider, openApiOptions.Object); ((TestServiceProvider)builder.ServiceProvider).TestSchemaService = schemaService; - var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, openApiOptions.Object, builder.ServiceProvider); + var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, openApiOptions.Object, builder.ServiceProvider, new OpenApiTestServer()); ((TestServiceProvider)builder.ServiceProvider).TestDocumentService = documentService; return documentService; @@ -101,7 +104,7 @@ internal static OpenApiDocumentService CreateDocumentService(IEndpointRouteBuild var schemaService = new OpenApiSchemaService("Test", Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), builder.ServiceProvider, options.Object); ((TestServiceProvider)builder.ServiceProvider).TestSchemaService = schemaService; - var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, options.Object, builder.ServiceProvider); + var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, options.Object, builder.ServiceProvider, new OpenApiTestServer()); ((TestServiceProvider)builder.ServiceProvider).TestDocumentService = documentService; return documentService; @@ -276,4 +279,31 @@ public object GetService(Type serviceType) return _serviceProvider.GetService(serviceType); } } + + internal class OpenApiTestServer(string[] addresses = null) : IServer + { + public IFeatureCollection Features => GenerateFeatures(); + + public void Dispose() + { + return; + } + + internal virtual IFeatureCollection GenerateFeatures() + { + var features = new FeatureCollection(); + features.Set(new TestServerAddressesFeature { Addresses = addresses }); + return features; + } + + public Task StartAsync(IHttpApplication application, CancellationToken cancellationToken) where TContext : notnull => Task.CompletedTask; + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } + + private class TestServerAddressesFeature : IServerAddressesFeature + { + public ICollection Addresses { get; set; } + public bool PreferHostingUrls { get; set; } + } } From dc1a065eff3a9ce4f62d08cdd87d781efe5e24e7 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Wed, 10 Jul 2024 15:18:13 -0700 Subject: [PATCH 152/257] Don't require AttributeProvider for JsonPropertyInfo-based modifications (#56712) * Don't require AttributeProvider for JsonPropertyInfo-based modifications * Add test coverage for fix --- .../Services/Schemas/OpenApiSchemaService.cs | 5 +- .../OpenApiDocumentServiceTestsBase.cs | 3 +- ...OpenApiSchemaService.RequestBodySchemas.cs | 47 +++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 0090c39a617f..0d2998cbd180 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -91,7 +91,7 @@ internal sealed class OpenApiSchemaService( schema.ApplyPrimitiveTypesAndFormats(context); schema.ApplySchemaReferenceId(context); schema.ApplyPolymorphismOptions(context); - if (context.PropertyInfo is { AttributeProvider: { } attributeProvider } jsonPropertyInfo) + if (context.PropertyInfo is { } jsonPropertyInfo) { // Short-circuit STJ's handling of nested properties, which uses a reference to the // properties type schema with a schema that uses a document level reference. @@ -102,6 +102,9 @@ internal sealed class OpenApiSchemaService( return new JsonObject { [OpenApiSchemaKeywords.RefKeyword] = context.TypeInfo.GetSchemaReferenceId() }; } schema.ApplyNullabilityContextInfo(jsonPropertyInfo); + } + if (context.PropertyInfo is { AttributeProvider: { } attributeProvider }) + { if (attributeProvider.GetCustomAttributes(inherit: false).OfType() is { } validationAttributes) { schema.ApplyValidationAttributes(validationAttributes); diff --git a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs index ebad522b54f7..a1be87ddef62 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentServiceTestsBase.cs @@ -101,8 +101,9 @@ internal static OpenApiDocumentService CreateDocumentService(IEndpointRouteBuild provider.OnProvidersExecuted(context); var apiDescriptionGroupCollectionProvider = CreateApiDescriptionGroupCollectionProvider(context.Results); + var jsonOptions = builder.ServiceProvider.GetService>() ?? Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()); - var schemaService = new OpenApiSchemaService("Test", Options.Create(new Microsoft.AspNetCore.Http.Json.JsonOptions()), builder.ServiceProvider, options.Object); + var schemaService = new OpenApiSchemaService("Test", jsonOptions, builder.ServiceProvider, options.Object); ((TestServiceProvider)builder.ServiceProvider).TestSchemaService = schemaService; var documentService = new OpenApiDocumentService("Test", apiDescriptionGroupCollectionProvider, hostEnvironment, options.Object, builder.ServiceProvider, new OpenApiTestServer()); ((TestServiceProvider)builder.ServiceProvider).TestDocumentService = documentService; diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs index 8930d88c0410..4da4cf7b72c8 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs @@ -4,8 +4,10 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.IO.Pipelines; +using System.Text.Json.Serialization.Metadata; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; @@ -468,6 +470,51 @@ await VerifyOpenApiDocument(builder, document => }); } + [Fact] + public async Task SupportsNestedTypes_WithNoAttributeProvider() + { + // Arrange: this test ensures that we can correctly handle the scenario + // where the attribute provider is null and we need to patch the property mappings + // that are created by the underlying JsonSchemaExporter. + var serviceCollection = new ServiceCollection(); + serviceCollection.ConfigureHttpJsonOptions(options => + { + options.SerializerOptions.TypeInfoResolver = options.SerializerOptions.TypeInfoResolver?.WithAddedModifier(jsonTypeInfo => + { + foreach (var propertyInfo in jsonTypeInfo.Properties) + { + propertyInfo.AttributeProvider = null; + } + + }); + }); + var builder = CreateBuilder(serviceCollection); + + // Act + builder.MapPost("/api", (NestedType type) => { }); + + // Assert + await VerifyOpenApiDocument(builder, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var content = Assert.Single(requestBody.Content); + Assert.Equal("NestedType", content.Value.Schema.Reference.Id); + var schema = content.Value.Schema.GetEffective(document); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("name", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("nested", property.Key); + Assert.Equal("NestedType", property.Value.Reference.Id); + }); + }); + } + private class DescriptionTodo { [Description("The unique identifier for a todo item.")] From 71b5ef3f5c997fbbb9ff3dc1a16d58e8ccdeed52 Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 10 Jul 2024 17:56:52 -0700 Subject: [PATCH 153/257] AddConnections: AddRouting -> AddRoutingCore (#56703) --- .../src/ConnectionsDependencyInjectionExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignalR/common/Http.Connections/src/ConnectionsDependencyInjectionExtensions.cs b/src/SignalR/common/Http.Connections/src/ConnectionsDependencyInjectionExtensions.cs index 4ccfa7eb342d..96d6d9346c11 100644 --- a/src/SignalR/common/Http.Connections/src/ConnectionsDependencyInjectionExtensions.cs +++ b/src/SignalR/common/Http.Connections/src/ConnectionsDependencyInjectionExtensions.cs @@ -20,7 +20,7 @@ public static class ConnectionsDependencyInjectionExtensions /// The same instance of the for chaining. public static IServiceCollection AddConnections(this IServiceCollection services) { - services.AddRouting(); + services.AddRoutingCore(); services.AddAuthorization(); services.TryAddEnumerable(ServiceDescriptor.Singleton, ConnectionOptionsSetup>()); services.TryAddSingleton(); From b1765cac92e26c58963b9967694242109f482761 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:36:06 +0200 Subject: [PATCH 154/257] [main] Update dependencies from dotnet/source-build-reference-packages (#56685) * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240708.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24352.1 -> To Version 9.0.0-alpha.1.24358.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240708.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24352.1 -> To Version 9.0.0-alpha.1.24358.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240708.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24352.1 -> To Version 9.0.0-alpha.1.24358.1 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 10c4804fef47..3c9686fdea9c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -339,9 +339,9 @@ 0d51607fb791c51a14b552ed24fe3430c252148b - + https://github.com/dotnet/source-build-reference-packages - cc732c57199f725857c201da146525e3be6bc504 + 815f91338b1c4485b50bc0da9518b7b8433c75c1 diff --git a/eng/Versions.props b/eng/Versions.props index 43bf27730db6..4efeeb250224 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -172,7 +172,7 @@ 9.0.0-alpha.1.24324.1 - 9.0.0-alpha.1.24352.1 + 9.0.0-alpha.1.24358.1 2.2.0-beta.24327.2 From 3504b3e2d45f16b06e5302abfa9adee1c3a1ba0b Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Thu, 11 Jul 2024 11:51:32 -0700 Subject: [PATCH 155/257] Fix type/formats for primitive types (#56745) --- src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs | 5 +++-- .../OpenApiDocumentServiceTests.RequestBody.cs | 4 ++-- .../OpenApiSchemaService.ParameterSchemas.cs | 10 ++++++---- .../OpenApiSchemaService.ResponseSchemas.cs | 5 +++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index 237bdbeb3d74..5a8706525609 100644 --- a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -27,7 +27,8 @@ internal static class JsonNodeSchemaExtensions private static readonly Dictionary _simpleTypeToOpenApiSchema = new() { [typeof(bool)] = new() { Type = "boolean" }, - [typeof(byte)] = new() { Type = "string", Format = "byte" }, + [typeof(byte)] = new() { Type = "integer", Format = "uint8" }, + [typeof(byte[])] = new() { Type = "string", Format = "byte" }, [typeof(int)] = new() { Type = "integer", Format = "int32" }, [typeof(uint)] = new() { Type = "integer", Format = "uint32" }, [typeof(long)] = new() { Type = "integer", Format = "int64" }, @@ -40,7 +41,7 @@ internal static class JsonNodeSchemaExtensions [typeof(DateTime)] = new() { Type = "string", Format = "date-time" }, [typeof(DateTimeOffset)] = new() { Type = "string", Format = "date-time" }, [typeof(Guid)] = new() { Type = "string", Format = "uuid" }, - [typeof(char)] = new() { Type = "string" }, + [typeof(char)] = new() { Type = "string", Format = "char" }, [typeof(Uri)] = new() { Type = "string", Format = "uri" }, [typeof(string)] = new() { Type = "string" }, [typeof(TimeOnly)] = new() { Type = "string", Format = "time" }, diff --git a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs index 7ebd6039bc2e..67b9453782c3 100644 --- a/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs +++ b/src/OpenApi/test/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.RequestBody.cs @@ -808,8 +808,8 @@ private void ActionWithDateTimeForm([FromForm] DateTime model) { } [([FromForm] decimal id) => {}, "number", "double"], [([FromForm] bool id) => {}, "boolean", null], [([FromForm] string id) => {}, "string", null], - [([FromForm] char id) => {}, "string", null], - [([FromForm] byte id) => {}, "string", "byte"], + [([FromForm] char id) => {}, "string", "char"], + [([FromForm] byte id) => {}, "integer", "uint8"], [([FromForm] short id) => {}, "integer", "int16"], [([FromForm] ushort id) => {}, "integer", "uint16"], [([FromForm] uint id) => {}, "integer", "uint32"], diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs index d31829b12ea7..ff4aa3731535 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ParameterSchemas.cs @@ -21,8 +21,9 @@ public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase [(decimal id) => {}, "number", "double", false], [(bool id) => {}, "boolean", null, false], [(string id) => {}, "string", null, false], - [(char id) => {}, "string", null, false], - [(byte id) => {}, "string", "byte", false], + [(char id) => {}, "string", "char", false], + [(byte id) => {}, "integer", "uint8", false], + [(byte[] id) => {}, "string", "byte", false], [(short id) => {}, "integer", "int16", false], [(ushort id) => {}, "integer", "uint16", false], [(uint id) => {}, "integer", "uint32", false], @@ -37,8 +38,9 @@ public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase [(decimal? id) => {}, "number", "double", true], [(bool? id) => {}, "boolean", null, true], [(string? id) => {}, "string", null, true], - [(char? id) => {}, "string", null, true], - [(byte? id) => {}, "string", "byte", true], + [(char? id) => {}, "string", "char", true], + [(byte? id) => {}, "integer", "uint8", true], + [(byte[]? id) => {}, "string", "byte", true], [(short? id) => {}, "integer", "int16", true], [(ushort? id) => {}, "integer", "uint16", true], [(uint? id) => {}, "integer", "uint32", true], diff --git a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs index 2850fddb4df0..52d4020189c0 100644 --- a/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs +++ b/src/OpenApi/test/Services/OpenApiSchemaService/OpenApiSchemaService.ResponseSchemas.cs @@ -18,8 +18,9 @@ public partial class OpenApiSchemaServiceTests : OpenApiDocumentServiceTestBase [() => 12.0m, "application/json", "number", "double"], [() => false, "application/json", "boolean", null], [() => "test", "text/plain", "string", null], - [() => 't', "application/json", "string", null], - [() => byte.MaxValue, "application/json", "string", "byte"], + [() => 't', "application/json", "string", "char"], + [() => byte.MaxValue, "application/json", "integer", "uint8"], + [() => new byte[] { }, "application/json", "string", "byte"], [() => short.MaxValue, "application/json", "integer", "int16"], [() => ushort.MaxValue, "application/json", "integer", "uint16"], [() => uint.MaxValue, "application/json", "integer", "uint32"], From 6aab04c6593aa75ade4b81600e377e88cfa66b27 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 11 Jul 2024 11:57:00 -0700 Subject: [PATCH 156/257] Enable internal runtimes and disable old creds (#56428) --- .azure/pipelines/ci.yml | 1 - .azure/pipelines/jobs/default-build.yml | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index dadfd77e106f..a7d6a1b15e43 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -96,7 +96,6 @@ variables: value: /bl:artifacts/log/Release/Build.Installers.binlog - name: WindowsArm64InstallersLogArgs value: /bl:artifacts/log/Release/Build.Installers.Arm64.binlog -- group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs value: -RuntimeSourceFeed https://dotnetbuilds.blob.core.windows.net/internal -RuntimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64) diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 20b19c4c20b4..f328550c60c2 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -420,7 +420,18 @@ jobs: - ${{ parameters.beforeBuild }} # - template: /eng/common/templates-official/steps/enable-internal-sources.yml@self - # - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml@self + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml@self + + # Populate dotnetbuilds-internal-container-read-token + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: 'dotnetbuilds-internal-read' + outputVariableName: 'dotnetbuilds-internal-container-read-token' + expiryInHours: 1 + base64Encode: false + storageAccount: dotnetbuilds + container: internal + permissions: rl # Add COMPlus_* environment variables to build steps. - ${{ if ne(parameters.steps, '')}}: From f3db10e251faf5aa26df3de04d1fa184bbe6603f Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Thu, 11 Jul 2024 12:21:15 -0700 Subject: [PATCH 157/257] Port fix for #53423 to `main` (#56702) --- .../src/JwtBearerConfigureOptions.cs | 6 +- .../test/JwtBearerTests_Handler.cs | 119 +++++++++++------- 2 files changed, 77 insertions(+), 48 deletions(-) diff --git a/src/Security/Authentication/JwtBearer/src/JwtBearerConfigureOptions.cs b/src/Security/Authentication/JwtBearer/src/JwtBearerConfigureOptions.cs index 4a4fe81b5d0b..6ce4d6014bbb 100644 --- a/src/Security/Authentication/JwtBearer/src/JwtBearerConfigureOptions.cs +++ b/src/Security/Authentication/JwtBearer/src/JwtBearerConfigureOptions.cs @@ -40,8 +40,10 @@ public void Configure(string? name, JwtBearerOptions options) return; } + var validateIssuer = StringHelpers.ParseValueOrDefault(configSection[nameof(TokenValidationParameters.ValidateIssuer)], bool.Parse, options.TokenValidationParameters.ValidateIssuer); var issuer = configSection[nameof(TokenValidationParameters.ValidIssuer)]; var issuers = configSection.GetSection(nameof(TokenValidationParameters.ValidIssuers)).GetChildren().Select(iss => iss.Value).ToList(); + var validateAudience = StringHelpers.ParseValueOrDefault(configSection[nameof(TokenValidationParameters.ValidateAudience)], bool.Parse, options.TokenValidationParameters.ValidateAudience); var audience = configSection[nameof(TokenValidationParameters.ValidAudience)]; var audiences = configSection.GetSection(nameof(TokenValidationParameters.ValidAudiences)).GetChildren().Select(aud => aud.Value).ToList(); @@ -63,10 +65,10 @@ public void Configure(string? name, JwtBearerOptions options) options.SaveToken = StringHelpers.ParseValueOrDefault(configSection[nameof(options.SaveToken)], bool.Parse, options.SaveToken); options.TokenValidationParameters = new() { - ValidateIssuer = issuers.Count > 0, + ValidateIssuer = validateIssuer, ValidIssuers = issuers, ValidIssuer = issuer, - ValidateAudience = audiences.Count > 0, + ValidateAudience = validateAudience, ValidAudiences = audiences, ValidAudience = audience, ValidateIssuerSigningKey = true, diff --git a/src/Security/Authentication/test/JwtBearerTests_Handler.cs b/src/Security/Authentication/test/JwtBearerTests_Handler.cs index 844904b4da09..1c24afe93cc0 100644 --- a/src/Security/Authentication/test/JwtBearerTests_Handler.cs +++ b/src/Security/Authentication/test/JwtBearerTests_Handler.cs @@ -31,17 +31,9 @@ public class JwtBearerTests_Handler : SharedAuthenticationTests false; } protected override bool SupportsSignOut { get => false; } - protected override void RegisterAuth(AuthenticationBuilder services, Action configure) - { - services.AddJwtBearer(o => - { - ConfigureDefaults(o); - configure.Invoke(o); - }); - } - - private void ConfigureDefaults(JwtBearerOptions o) + protected override void RegisterAuth(AuthenticationBuilder services, Action configure = null) { + services.AddJwtBearer(configure); } [Fact] @@ -964,26 +956,20 @@ public async Task ExpirationAndIssuedWhenMinOrMaxValue() [Fact] public void CanReadJwtBearerOptionsFromConfig() { - var services = new ServiceCollection().AddLogging(); - var config = new ConfigurationBuilder().AddInMemoryCollection(new[] - { - new KeyValuePair("Authentication:Schemes:Bearer:ValidIssuer", "dotnet-user-jwts"), - new KeyValuePair("Authentication:Schemes:Bearer:ValidIssuers:0", "dotnet-user-jwts-2"), - new KeyValuePair("Authentication:Schemes:Bearer:ValidAudience", "http://localhost:5000"), - new KeyValuePair("Authentication:Schemes:Bearer:ValidAudiences:0", "http://localhost:5001"), - new KeyValuePair("Authentication:Schemes:Bearer:BackchannelTimeout", "00:01:00"), - new KeyValuePair("Authentication:Schemes:Bearer:RequireHttpsMetadata", "false"), - new KeyValuePair("Authentication:Schemes:Bearer:SaveToken", "True"), - }).Build(); + var services = new ServiceCollection(); + var config = new ConfigurationBuilder().AddInMemoryCollection([ + new("Authentication:Schemes:Bearer:ValidIssuer", "dotnet-user-jwts"), + new("Authentication:Schemes:Bearer:ValidIssuers:0", "dotnet-user-jwts-2"), + new("Authentication:Schemes:Bearer:ValidAudience", "http://localhost:5000"), + new("Authentication:Schemes:Bearer:ValidAudiences:0", "http://localhost:5001"), + new("Authentication:Schemes:Bearer:BackchannelTimeout", "00:01:00"), + new("Authentication:Schemes:Bearer:RequireHttpsMetadata", "false"), + new("Authentication:Schemes:Bearer:SaveToken", "True"), + ]).Build(); services.AddSingleton(config); // Act - var builder = services.AddAuthentication(o => - { - o.AddScheme("Bearer", "Bearer"); - }); - builder.AddJwtBearer("Bearer"); - RegisterAuth(builder, _ => { }); + RegisterAuth(services.AddAuthentication()); var sp = services.BuildServiceProvider(); // Assert @@ -995,7 +981,12 @@ public void CanReadJwtBearerOptionsFromConfig() Assert.Equal(TimeSpan.FromSeconds(60), jwtBearerOptions.BackchannelTimeout); Assert.False(jwtBearerOptions.RequireHttpsMetadata); Assert.True(jwtBearerOptions.SaveToken); - Assert.True(jwtBearerOptions.MapInboundClaims); // Assert default values are respected + // ValidateIssuerSigningKey should always be set to its non-default value of true if options are read from config. + Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateIssuerSigningKey); + // Assert default values for other options are respected. + Assert.True(jwtBearerOptions.MapInboundClaims); + Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateIssuer); + Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateAudience); } [Fact] @@ -1026,29 +1017,23 @@ public void CanReadMultipleAudiencesFromConfig() [Fact] public void CanReadMultipleIssuersFromConfig() { - var services = new ServiceCollection().AddLogging(); + var services = new ServiceCollection(); var firstKey = "qPG6tDtfxFYZifHW3sEueQ=="; var secondKey = "6JPzXj6aOPdojlZdeLshaA=="; - var config = new ConfigurationBuilder().AddInMemoryCollection(new[] - { - new KeyValuePair("Authentication:Schemes:Bearer:ValidIssuers:0", "dotnet-user-jwts"), - new KeyValuePair("Authentication:Schemes:Bearer:ValidIssuers:1", "dotnet-user-jwts-2"), - new KeyValuePair("Authentication:Schemes:Bearer:SigningKeys:0:Issuer", "dotnet-user-jwts"), - new KeyValuePair("Authentication:Schemes:Bearer:SigningKeys:0:Value", firstKey), - new KeyValuePair("Authentication:Schemes:Bearer:SigningKeys:0:Length", "32"), - new KeyValuePair("Authentication:Schemes:Bearer:SigningKeys:1:Issuer", "dotnet-user-jwts-2"), - new KeyValuePair("Authentication:Schemes:Bearer:SigningKeys:1:Value", secondKey), - new KeyValuePair("Authentication:Schemes:Bearer:SigningKeys:1:Length", "32"), - }).Build(); + var config = new ConfigurationBuilder().AddInMemoryCollection([ + new("Authentication:Schemes:Bearer:ValidIssuers:0", "dotnet-user-jwts"), + new("Authentication:Schemes:Bearer:ValidIssuers:1", "dotnet-user-jwts-2"), + new("Authentication:Schemes:Bearer:SigningKeys:0:Issuer", "dotnet-user-jwts"), + new("Authentication:Schemes:Bearer:SigningKeys:0:Value", firstKey), + new("Authentication:Schemes:Bearer:SigningKeys:0:Length", "32"), + new("Authentication:Schemes:Bearer:SigningKeys:1:Issuer", "dotnet-user-jwts-2"), + new("Authentication:Schemes:Bearer:SigningKeys:1:Value", secondKey), + new("Authentication:Schemes:Bearer:SigningKeys:1:Length", "32"), + ]).Build(); services.AddSingleton(config); // Act - var builder = services.AddAuthentication(o => - { - o.AddScheme("Bearer", "Bearer"); - }); - builder.AddJwtBearer("Bearer"); - RegisterAuth(builder, _ => { }); + RegisterAuth(services.AddAuthentication()); var sp = services.BuildServiceProvider(); // Assert @@ -1058,6 +1043,48 @@ public void CanReadMultipleIssuersFromConfig() Assert.Equal(secondKey, Convert.ToBase64String(jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys.OfType().LastOrDefault()?.Key)); } + [Fact] + public void IssuerAndAudienceValidationEnabledByDefaultWhenOptionsAreReadFromConfig() + { + var services = new ServiceCollection(); + var config = new ConfigurationBuilder().AddInMemoryCollection([ + new("Authentication:Schemes:Bearer:Authority", "https://localhost:5001"), + ]).Build(); + services.AddSingleton(config); + + // Act + RegisterAuth(services.AddAuthentication()); + var sp = services.BuildServiceProvider(); + + // Assert + var jwtBearerOptions = sp.GetRequiredService>().Get(JwtBearerDefaults.AuthenticationScheme); + Assert.Equal("https://localhost:5001", jwtBearerOptions.Authority); + Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateIssuer); + Assert.True(jwtBearerOptions.TokenValidationParameters.ValidateAudience); + } + + [Fact] + public void IssuerAndAudienceValidationCanBeDisabledFromConfig() + { + var services = new ServiceCollection(); + var config = new ConfigurationBuilder().AddInMemoryCollection([ + new("Authentication:Schemes:Bearer:Authority", "https://localhost:5001"), + new("Authentication:Schemes:Bearer:ValidateIssuer", "false"), + new("Authentication:Schemes:Bearer:ValidateAudience", "false"), + ]).Build(); + services.AddSingleton(config); + + // Act + RegisterAuth(services.AddAuthentication()); + var sp = services.BuildServiceProvider(); + + // Assert + var jwtBearerOptions = sp.GetRequiredService>().Get(JwtBearerDefaults.AuthenticationScheme); + Assert.Equal("https://localhost:5001", jwtBearerOptions.Authority); + Assert.False(jwtBearerOptions.TokenValidationParameters.ValidateIssuer); + Assert.False(jwtBearerOptions.TokenValidationParameters.ValidateAudience); + } + class InvalidTokenValidator : TokenHandler { public InvalidTokenValidator() From 7498cea189f5e32a11ef480729384ff6b5dc662f Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 12 Jul 2024 15:19:50 +0800 Subject: [PATCH 158/257] Improve endpoint extension method docs (#56713) --- .../src/Routing/EndpointHttpContextExtensions.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Http/Http.Abstractions/src/Routing/EndpointHttpContextExtensions.cs b/src/Http/Http.Abstractions/src/Routing/EndpointHttpContextExtensions.cs index dc309201494f..9548f79e249e 100644 --- a/src/Http/Http.Abstractions/src/Routing/EndpointHttpContextExtensions.cs +++ b/src/Http/Http.Abstractions/src/Routing/EndpointHttpContextExtensions.cs @@ -14,7 +14,11 @@ public static class EndpointHttpContextExtensions /// Extension method for getting the for the current request. ///
/// The context. - /// The . + /// The or null if the request doesn't have an endpoint. + /// + /// The endpoint for a request is typically set by routing middleware. A request might not have + /// an endpoint if routing middleware hasn't run yet, or the request didn't match a route. + /// public static Endpoint? GetEndpoint(this HttpContext context) { ArgumentNullException.ThrowIfNull(context); @@ -26,7 +30,7 @@ public static class EndpointHttpContextExtensions /// Extension method for setting the for the current request. ///
/// The context. - /// The . + /// The . A null value clears the endpoint for the current request. public static void SetEndpoint(this HttpContext context, Endpoint? endpoint) { ArgumentNullException.ThrowIfNull(context); From 639952aabd5f71870cc26283f0ffb654f24434d4 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 12 Jul 2024 17:54:32 +0800 Subject: [PATCH 159/257] Add disable HTTP metrics endpoint metadata (#56036) --- .../Internal/HostingApplicationDiagnostics.cs | 8 +- .../Hosting/src/Internal/HostingMetrics.cs | 4 +- .../src/Internal/HttpMetricsTagsFeature.cs | 2 + .../HostingApplicationDiagnosticsTests.cs | 179 +++++++++++++++++- .../Hosting/test/HostingMetricsTests.cs | 1 + .../Metadata/IDisableHttpMetricsMetadata.cs | 11 ++ .../src/PublicAPI.Unshipped.txt | 1 + .../src/DisableHttpMetricsAttribute.cs | 21 ++ .../src/EndpointDescriptionAttribute.cs | 2 +- .../src/EndpointSummaryAttribute.cs | 2 +- ...ricsEndpointConventionBuilderExtensions.cs | 26 +++ .../src/PublicAPI.Unshipped.txt | 5 + ...ndpointConventionBuilderExtensionsTests.cs | 29 +++ .../src/IHttpMetricsTagsFeature.cs | 8 +- .../Http.Features/src/PublicAPI.Unshipped.txt | 2 + src/Http/Http/src/PublicAPI.Unshipped.txt | 1 + .../DisableRequestTimeoutAttribute.cs | 8 + src/Http/Routing/src/EndpointNameAttribute.cs | 2 +- .../src/ExcludeFromDescriptionAttribute.cs | 2 +- .../CORS/src/DisableCorsAttribute.cs | 2 +- .../CORS/src/EnableCorsAttribute.cs | 2 +- .../Core/src/AllowAnonymousAttribute.cs | 2 +- .../Core/src/AuthorizeAttribute.cs | 2 +- 23 files changed, 307 insertions(+), 15 deletions(-) create mode 100644 src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs create mode 100644 src/Http/Http.Extensions/src/DisableHttpMetricsAttribute.cs create mode 100644 src/Http/Http.Extensions/src/HttpMetricsEndpointConventionBuilderExtensions.cs create mode 100644 src/Http/Http.Extensions/test/HttpMetricsEndpointConventionBuilderExtensionsTests.cs diff --git a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs index 6bd24cc8eee5..a641d23e6c4e 100644 --- a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs +++ b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs @@ -154,11 +154,12 @@ public void RequestEnd(HttpContext httpContext, Exception? exception, HostingApp if (context.MetricsEnabled) { + Debug.Assert(context.MetricsTagsFeature != null, "MetricsTagsFeature should be set if MetricsEnabled is true."); + var endpoint = HttpExtensions.GetOriginalEndpoint(httpContext); + var disableHttpRequestDurationMetric = endpoint?.Metadata.GetMetadata() != null || context.MetricsTagsFeature.MetricsDisabled; var route = endpoint?.Metadata.GetMetadata()?.Route; - Debug.Assert(context.MetricsTagsFeature != null, "MetricsTagsFeature should be set if MetricsEnabled is true."); - _metrics.RequestEnd( context.MetricsTagsFeature.Protocol!, context.MetricsTagsFeature.Scheme!, @@ -169,7 +170,8 @@ public void RequestEnd(HttpContext httpContext, Exception? exception, HostingApp exception, context.MetricsTagsFeature.TagsList, startTimestamp, - currentTimestamp); + currentTimestamp, + disableHttpRequestDurationMetric); } if (reachedPipelineEnd) diff --git a/src/Hosting/Hosting/src/Internal/HostingMetrics.cs b/src/Hosting/Hosting/src/Internal/HostingMetrics.cs index bdd83e5212be..129542fec15a 100644 --- a/src/Hosting/Hosting/src/Internal/HostingMetrics.cs +++ b/src/Hosting/Hosting/src/Internal/HostingMetrics.cs @@ -42,7 +42,7 @@ public void RequestStart(string scheme, string method) _activeRequestsCounter.Add(1, tags); } - public void RequestEnd(string protocol, string scheme, string method, string? route, int statusCode, bool unhandledRequest, Exception? exception, List>? customTags, long startTimestamp, long currentTimestamp) + public void RequestEnd(string protocol, string scheme, string method, string? route, int statusCode, bool unhandledRequest, Exception? exception, List>? customTags, long startTimestamp, long currentTimestamp, bool disableHttpRequestDurationMetric) { var tags = new TagList(); InitializeRequestTags(ref tags, scheme, method); @@ -53,7 +53,7 @@ public void RequestEnd(string protocol, string scheme, string method, string? ro _activeRequestsCounter.Add(-1, tags); } - if (_requestDuration.Enabled) + if (!disableHttpRequestDurationMetric && _requestDuration.Enabled) { if (TryGetHttpVersion(protocol, out var httpVersion)) { diff --git a/src/Hosting/Hosting/src/Internal/HttpMetricsTagsFeature.cs b/src/Hosting/Hosting/src/Internal/HttpMetricsTagsFeature.cs index e556210b9309..98e06f50ac4d 100644 --- a/src/Hosting/Hosting/src/Internal/HttpMetricsTagsFeature.cs +++ b/src/Hosting/Hosting/src/Internal/HttpMetricsTagsFeature.cs @@ -8,6 +8,7 @@ namespace Microsoft.AspNetCore.Hosting; internal sealed class HttpMetricsTagsFeature : IHttpMetricsTagsFeature { ICollection> IHttpMetricsTagsFeature.Tags => TagsList; + public bool MetricsDisabled { get; set; } public List> TagsList { get; } = new List>(); @@ -20,6 +21,7 @@ internal sealed class HttpMetricsTagsFeature : IHttpMetricsTagsFeature public void Reset() { TagsList.Clear(); + MetricsDisabled = false; Method = null; Scheme = null; diff --git a/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs b/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs index 9f38f34a6ac1..7b868081dd32 100644 --- a/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs +++ b/src/Hosting/Hosting/test/HostingApplicationDiagnosticsTests.cs @@ -5,8 +5,10 @@ using System.Diagnostics.Metrics; using System.Diagnostics.Tracing; using System.Reflection; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.Http.Metadata; using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.Diagnostics.Metrics; @@ -228,7 +230,6 @@ public void Metrics_RequestChanges_OriginalValuesUsed() var testMeterFactory = new TestMeterFactory(); using var activeRequestsCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.active_requests"); - using var requestDurationCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.request.duration"); // Act var hostingApplication = CreateApplication(out var features, eventSource: hostingEventSource, meterFactory: testMeterFactory, configure: c => @@ -279,6 +280,182 @@ public void Metrics_RequestChanges_OriginalValuesUsed() Assert.Null(context.MetricsTagsFeature.Protocol); } + [Fact] + public void Metrics_Route_RouteTagReported() + { + // Arrange + var hostingEventSource = new HostingEventSource(Guid.NewGuid().ToString()); + + var testMeterFactory = new TestMeterFactory(); + using var activeRequestsCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.active_requests"); + using var requestDurationCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.request.duration"); + + // Act + var hostingApplication = CreateApplication(out var features, eventSource: hostingEventSource, meterFactory: testMeterFactory, configure: c => + { + c.Request.Protocol = "1.1"; + c.Request.Scheme = "http"; + c.Request.Method = "POST"; + c.Request.Host = new HostString("localhost"); + c.Request.Path = "/hello"; + c.Request.ContentType = "text/plain"; + c.Request.ContentLength = 1024; + }); + var context = hostingApplication.CreateContext(features); + + Assert.Collection(activeRequestsCollector.GetMeasurementSnapshot(), + m => + { + Assert.Equal(1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }); + + context.HttpContext.SetEndpoint(new Endpoint( + c => Task.CompletedTask, + new EndpointMetadataCollection(new TestRouteDiagnosticsMetadata()), + "Test endpoint")); + + hostingApplication.DisposeContext(context, null); + + // Assert + Assert.Collection(activeRequestsCollector.GetMeasurementSnapshot(), + m => + { + Assert.Equal(1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }, + m => + { + Assert.Equal(-1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }); + Assert.Collection(requestDurationCollector.GetMeasurementSnapshot(), + m => + { + Assert.True(m.Value > 0); + Assert.Equal("hello/{name}", m.Tags["http.route"]); + }); + } + + [Fact] + public void Metrics_DisableHttpMetricsWithMetadata_NoMetrics() + { + // Arrange + var hostingEventSource = new HostingEventSource(Guid.NewGuid().ToString()); + + var testMeterFactory = new TestMeterFactory(); + using var activeRequestsCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.active_requests"); + using var requestDurationCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.request.duration"); + + // Act + var hostingApplication = CreateApplication(out var features, eventSource: hostingEventSource, meterFactory: testMeterFactory, configure: c => + { + c.Request.Protocol = "1.1"; + c.Request.Scheme = "http"; + c.Request.Method = "POST"; + c.Request.Host = new HostString("localhost"); + c.Request.Path = "/hello"; + c.Request.ContentType = "text/plain"; + c.Request.ContentLength = 1024; + }); + var context = hostingApplication.CreateContext(features); + + Assert.Collection(activeRequestsCollector.GetMeasurementSnapshot(), + m => + { + Assert.Equal(1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }); + + context.HttpContext.SetEndpoint(new Endpoint( + c => Task.CompletedTask, + new EndpointMetadataCollection(new TestRouteDiagnosticsMetadata(), new DisableHttpMetricsAttribute()), + "Test endpoint")); + + hostingApplication.DisposeContext(context, null); + + // Assert + Assert.Collection(activeRequestsCollector.GetMeasurementSnapshot(), + m => + { + Assert.Equal(1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }, + m => + { + Assert.Equal(-1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }); + Assert.Empty(requestDurationCollector.GetMeasurementSnapshot()); + } + + [Fact] + public void Metrics_DisableHttpMetricsWithFeature_NoMetrics() + { + // Arrange + var hostingEventSource = new HostingEventSource(Guid.NewGuid().ToString()); + + var testMeterFactory = new TestMeterFactory(); + using var activeRequestsCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.active_requests"); + using var requestDurationCollector = new MetricCollector(testMeterFactory, HostingMetrics.MeterName, "http.server.request.duration"); + + // Act + var hostingApplication = CreateApplication(out var features, eventSource: hostingEventSource, meterFactory: testMeterFactory, configure: c => + { + c.Request.Protocol = "1.1"; + c.Request.Scheme = "http"; + c.Request.Method = "POST"; + c.Request.Host = new HostString("localhost"); + c.Request.Path = "/hello"; + c.Request.ContentType = "text/plain"; + c.Request.ContentLength = 1024; + }); + var context = hostingApplication.CreateContext(features); + + Assert.Collection(activeRequestsCollector.GetMeasurementSnapshot(), + m => + { + Assert.Equal(1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }); + + context.HttpContext.Features.Get().MetricsDisabled = true; + + // Assert 1 + Assert.True(context.MetricsTagsFeature.MetricsDisabled); + + hostingApplication.DisposeContext(context, null); + + // Assert 2 + Assert.Collection(activeRequestsCollector.GetMeasurementSnapshot(), + m => + { + Assert.Equal(1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }, + m => + { + Assert.Equal(-1, m.Value); + Assert.Equal("http", m.Tags["url.scheme"]); + Assert.Equal("POST", m.Tags["http.request.method"]); + }); + Assert.Empty(requestDurationCollector.GetMeasurementSnapshot()); + Assert.False(context.MetricsTagsFeature.MetricsDisabled); + } + + private sealed class TestRouteDiagnosticsMetadata : IRouteDiagnosticsMetadata + { + public string Route { get; } = "hello/{name}"; + } + [Fact] public void DisposeContextDoesNotThrowWhenContextScopeIsNull() { diff --git a/src/Hosting/Hosting/test/HostingMetricsTests.cs b/src/Hosting/Hosting/test/HostingMetricsTests.cs index 3a591d20b7d4..77547bb1e462 100644 --- a/src/Hosting/Hosting/test/HostingMetricsTests.cs +++ b/src/Hosting/Hosting/test/HostingMetricsTests.cs @@ -180,6 +180,7 @@ public void IHttpMetricsTagsFeatureNotUsedFromFeatureCollection() private sealed class TestHttpMetricsTagsFeature : IHttpMetricsTagsFeature { public ICollection> Tags { get; } = new Collection>(); + public bool MetricsDisabled { get; set; } } private static HostingApplication CreateApplication(IHttpContextFactory httpContextFactory = null, bool useHttpContextAccessor = false, diff --git a/src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs b/src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs new file mode 100644 index 000000000000..7c270b66685b --- /dev/null +++ b/src/Http/Http.Abstractions/src/Metadata/IDisableHttpMetricsMetadata.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.AspNetCore.Http.Metadata; + +/// +/// A marker interface which can be used to identify metadata that disables HTTP request duration metrics. +/// +public interface IDisableHttpMetricsMetadata +{ +} diff --git a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt index b08a98e0390c..f31484140679 100644 --- a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt @@ -4,3 +4,4 @@ Microsoft.AspNetCore.Http.HostString.HostString(string? value) -> void *REMOVED*Microsoft.AspNetCore.Http.HostString.Value.get -> string! Microsoft.AspNetCore.Http.HostString.Value.get -> string? Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void +Microsoft.AspNetCore.Http.Metadata.IDisableHttpMetricsMetadata diff --git a/src/Http/Http.Extensions/src/DisableHttpMetricsAttribute.cs b/src/Http/Http.Extensions/src/DisableHttpMetricsAttribute.cs new file mode 100644 index 000000000000..5c73195f945e --- /dev/null +++ b/src/Http/Http.Extensions/src/DisableHttpMetricsAttribute.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics; +using Microsoft.AspNetCore.Http.Metadata; + +namespace Microsoft.AspNetCore.Http; + +/// +/// Specifies that HTTP request duration metrics is disabled for an endpoint. +/// +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] +[DebuggerDisplay("{ToString(),nq}")] +public sealed class DisableHttpMetricsAttribute : Attribute, IDisableHttpMetricsMetadata +{ + /// + public override string ToString() + { + return "DisableHttpMetrics"; + } +} diff --git a/src/Http/Http.Extensions/src/EndpointDescriptionAttribute.cs b/src/Http/Http.Extensions/src/EndpointDescriptionAttribute.cs index 5dfed2341af1..0157bb87f586 100644 --- a/src/Http/Http.Extensions/src/EndpointDescriptionAttribute.cs +++ b/src/Http/Http.Extensions/src/EndpointDescriptionAttribute.cs @@ -29,7 +29,7 @@ public EndpointDescriptionAttribute(string description) /// public string Description { get; } - /// > + /// public override string ToString() { return $"Description: {Description ?? "(null)"}"; diff --git a/src/Http/Http.Extensions/src/EndpointSummaryAttribute.cs b/src/Http/Http.Extensions/src/EndpointSummaryAttribute.cs index b7d63e56b284..d3b857dd9131 100644 --- a/src/Http/Http.Extensions/src/EndpointSummaryAttribute.cs +++ b/src/Http/Http.Extensions/src/EndpointSummaryAttribute.cs @@ -26,7 +26,7 @@ public EndpointSummaryAttribute(string summary) /// public string Summary { get; } - /// > + /// public override string ToString() { return DebuggerHelpers.GetDebugText(nameof(Summary), Summary); diff --git a/src/Http/Http.Extensions/src/HttpMetricsEndpointConventionBuilderExtensions.cs b/src/Http/Http.Extensions/src/HttpMetricsEndpointConventionBuilderExtensions.cs new file mode 100644 index 000000000000..58be1ba4c187 --- /dev/null +++ b/src/Http/Http.Extensions/src/HttpMetricsEndpointConventionBuilderExtensions.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Http; + +namespace Microsoft.AspNetCore.Builder; + +/// +/// HTTP metrics extension methods for . +/// +public static class HttpMetricsEndpointConventionBuilderExtensions +{ + private static readonly DisableHttpMetricsAttribute _disableHttpMetricsAttribute = new DisableHttpMetricsAttribute(); + + /// + /// Specifies that HTTP request duration metrics is disabled for an endpoint. + /// + /// The type of endpoint convention builder. + /// The endpoint convention builder. + /// The original convention builder parameter. + public static TBuilder DisableHttpMetrics(this TBuilder builder) where TBuilder : IEndpointConventionBuilder + { + builder.Add(b => b.Metadata.Add(_disableHttpMetricsAttribute)); + return builder; + } +} diff --git a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt index 61c6112ae413..8dc031273ecf 100644 --- a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt @@ -1,2 +1,7 @@ #nullable enable Microsoft.AspNetCore.Http.HttpValidationProblemDetails.HttpValidationProblemDetails(System.Collections.Generic.IEnumerable>! errors) -> void (forwarded, contained in Microsoft.AspNetCore.Http.Abstractions) +Microsoft.AspNetCore.Builder.HttpMetricsEndpointConventionBuilderExtensions +Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute +Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute.DisableHttpMetricsAttribute() -> void +override Microsoft.AspNetCore.Http.DisableHttpMetricsAttribute.ToString() -> string! +static Microsoft.AspNetCore.Builder.HttpMetricsEndpointConventionBuilderExtensions.DisableHttpMetrics(this TBuilder builder) -> TBuilder diff --git a/src/Http/Http.Extensions/test/HttpMetricsEndpointConventionBuilderExtensionsTests.cs b/src/Http/Http.Extensions/test/HttpMetricsEndpointConventionBuilderExtensionsTests.cs new file mode 100644 index 000000000000..960b3fceaed9 --- /dev/null +++ b/src/Http/Http.Extensions/test/HttpMetricsEndpointConventionBuilderExtensionsTests.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http.Metadata; + +namespace Microsoft.AspNetCore.Http.Extensions.Tests; + +public partial class HttpMetricsEndpointConventionBuilderExtensionsTests +{ + [Fact] + public void DisableHttpMetrics_AddsMetadata() + { + var builder = new TestEndointConventionBuilder(); + builder.DisableHttpMetrics(); + + Assert.IsAssignableFrom(Assert.Single(builder.Metadata)); + } + + private sealed class TestEndointConventionBuilder : EndpointBuilder, IEndpointConventionBuilder + { + public void Add(Action convention) + { + convention(this); + } + + public override Endpoint Build() => throw new NotImplementedException(); + } +} diff --git a/src/Http/Http.Features/src/IHttpMetricsTagsFeature.cs b/src/Http/Http.Features/src/IHttpMetricsTagsFeature.cs index b7c556f75f1b..c232c06fdd4e 100644 --- a/src/Http/Http.Features/src/IHttpMetricsTagsFeature.cs +++ b/src/Http/Http.Features/src/IHttpMetricsTagsFeature.cs @@ -4,7 +4,7 @@ namespace Microsoft.AspNetCore.Http.Features; /// -/// Provides access to tags added to the metrics HTTP request counter. This feature isn't set if the counter isn't enabled. +/// Provides access to tags added to HTTP request duration metrics. This feature isn't set if the counter isn't enabled. /// public interface IHttpMetricsTagsFeature { @@ -12,4 +12,10 @@ public interface IHttpMetricsTagsFeature /// Gets the tag collection. ///
ICollection> Tags { get; } + + // MetricsDisabled was added after the initial release of this interface and is intentionally a DIM property. + /// + /// Gets or sets a flag that disables recording HTTP request duration metrics for the current HTTP request. + /// + public bool MetricsDisabled { get; set; } } diff --git a/src/Http/Http.Features/src/PublicAPI.Unshipped.txt b/src/Http/Http.Features/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..556a81c6fed3 100644 --- a/src/Http/Http.Features/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Features/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.MetricsDisabled.get -> bool +Microsoft.AspNetCore.Http.Features.IHttpMetricsTagsFeature.MetricsDisabled.set -> void diff --git a/src/Http/Http/src/PublicAPI.Unshipped.txt b/src/Http/Http/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..e87986053c89 100644 --- a/src/Http/Http/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http/src/PublicAPI.Unshipped.txt @@ -1 +1,2 @@ #nullable enable +override Microsoft.AspNetCore.Http.Timeouts.DisableRequestTimeoutAttribute.ToString() -> string! diff --git a/src/Http/Http/src/Timeouts/DisableRequestTimeoutAttribute.cs b/src/Http/Http/src/Timeouts/DisableRequestTimeoutAttribute.cs index e757b939f8e0..e9e3b60439c3 100644 --- a/src/Http/Http/src/Timeouts/DisableRequestTimeoutAttribute.cs +++ b/src/Http/Http/src/Timeouts/DisableRequestTimeoutAttribute.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; + namespace Microsoft.AspNetCore.Http.Timeouts; /// @@ -10,6 +12,12 @@ namespace Microsoft.AspNetCore.Http.Timeouts; /// Completely disables the request timeouts middleware from applying to this endpoint. /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] +[DebuggerDisplay("{ToString(),nq}")] public sealed class DisableRequestTimeoutAttribute : Attribute { + /// + public override string ToString() + { + return "DisableRequestTimeout"; + } } diff --git a/src/Http/Routing/src/EndpointNameAttribute.cs b/src/Http/Routing/src/EndpointNameAttribute.cs index eda3e902c8fa..d1d691644f6d 100644 --- a/src/Http/Routing/src/EndpointNameAttribute.cs +++ b/src/Http/Routing/src/EndpointNameAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Http; diff --git a/src/Http/Routing/src/ExcludeFromDescriptionAttribute.cs b/src/Http/Routing/src/ExcludeFromDescriptionAttribute.cs index aecccc79c8fe..f143a9edf0cf 100644 --- a/src/Http/Routing/src/ExcludeFromDescriptionAttribute.cs +++ b/src/Http/Routing/src/ExcludeFromDescriptionAttribute.cs @@ -17,7 +17,7 @@ public sealed class ExcludeFromDescriptionAttribute : Attribute, IExcludeFromDes /// public bool ExcludeFromDescription => true; - /// > + /// public override string ToString() { return DebuggerHelpers.GetDebugText(nameof(ExcludeFromDescription), ExcludeFromDescription); diff --git a/src/Middleware/CORS/src/DisableCorsAttribute.cs b/src/Middleware/CORS/src/DisableCorsAttribute.cs index cb18948b83a3..d97d1b5d08c9 100644 --- a/src/Middleware/CORS/src/DisableCorsAttribute.cs +++ b/src/Middleware/CORS/src/DisableCorsAttribute.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Cors; [DebuggerDisplay("{ToString(),nq}")] public class DisableCorsAttribute : Attribute, IDisableCorsAttribute { - /// > + /// public override string ToString() { return "CORS Disable"; diff --git a/src/Middleware/CORS/src/EnableCorsAttribute.cs b/src/Middleware/CORS/src/EnableCorsAttribute.cs index 8b1febc501c4..11a9f7c73dfb 100644 --- a/src/Middleware/CORS/src/EnableCorsAttribute.cs +++ b/src/Middleware/CORS/src/EnableCorsAttribute.cs @@ -33,7 +33,7 @@ public EnableCorsAttribute(string? policyName) /// public string? PolicyName { get; set; } - /// > + /// public override string ToString() { return DebuggerHelpers.GetDebugText(nameof(PolicyName), PolicyName, prefix: "CORS"); diff --git a/src/Security/Authorization/Core/src/AllowAnonymousAttribute.cs b/src/Security/Authorization/Core/src/AllowAnonymousAttribute.cs index 658a0285c419..906db17756be 100644 --- a/src/Security/Authorization/Core/src/AllowAnonymousAttribute.cs +++ b/src/Security/Authorization/Core/src/AllowAnonymousAttribute.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Authorization; [DebuggerDisplay("{ToString(),nq}")] public class AllowAnonymousAttribute : Attribute, IAllowAnonymous { - /// > + /// public override string ToString() { return "AllowAnonymous"; diff --git a/src/Security/Authorization/Core/src/AuthorizeAttribute.cs b/src/Security/Authorization/Core/src/AuthorizeAttribute.cs index b10fc33d68a3..dcfdead868dc 100644 --- a/src/Security/Authorization/Core/src/AuthorizeAttribute.cs +++ b/src/Security/Authorization/Core/src/AuthorizeAttribute.cs @@ -43,7 +43,7 @@ public AuthorizeAttribute(string policy) /// public string? AuthenticationSchemes { get; set; } - /// > + /// public override string ToString() { return DebuggerHelpers.GetDebugText(nameof(Policy), Policy, nameof(Roles), Roles, nameof(AuthenticationSchemes), AuthenticationSchemes, includeNullValues: false, prefix: "Authorize"); From 5fd01eb9256931de6e768af561b5ba5f00e3fd25 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:49:20 +0200 Subject: [PATCH 160/257] Chain runtime .Msi's instead of .Exe's in hosting bundle (#56631) * Chain runtime .msi's instead of .exe's in Hosting Bundle * Fixup * Remove unneeded .msi codes * Remove more unneeded props * Feedback * Fix typo * Another typo --------- Co-authored-by: wtgodbe --- .../WindowsHostingBundle/DotNetCore.wxs | 96 ++++++++++-------- .../WindowsHostingBundle/Product.targets | 99 ++++++++++--------- .../WindowsHostingBundle/SharedFramework.wxs | 50 ++-------- .../WindowsHostingBundle.wixproj | 37 +------ 4 files changed, 122 insertions(+), 160 deletions(-) diff --git a/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs b/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs index dab0deb92e35..932d6bab74de 100644 --- a/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs +++ b/src/Installers/Windows/WindowsHostingBundle/DotNetCore.wxs @@ -2,62 +2,80 @@ - - - - - - - - + InstallCondition="(NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0")"> + - - + InstallCondition="VersionNT64 AND NOT (NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0")"> + - - + InstallCondition="(NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")"> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Installers/Windows/WindowsHostingBundle/Product.targets b/src/Installers/Windows/WindowsHostingBundle/Product.targets index 2fe40ebe38a6..3b1cf82c1076 100644 --- a/src/Installers/Windows/WindowsHostingBundle/Product.targets +++ b/src/Installers/Windows/WindowsHostingBundle/Product.targets @@ -7,21 +7,32 @@ - - - x64 + DotNetRedistLtsInstallerx64 - $(MicrosoftNETCoreAppRuntimeVersion) - - x86 + DotNetRedistLtsInstallerx86 - $(MicrosoftNETCoreAppRuntimeVersion) - - arm64 + DotNetRedistLtsInstallerarm64 - $(MicrosoftNETCoreAppRuntimeVersion) + + + DotNetRedistHostInstallerx64 + + + DotNetRedistHostInstallerx86 + + + DotNetRedistHostInstallerarm64 + + + DotNetRedistHostfxrInstallerx64 + + + DotNetRedistHostfxrInstallerx86 + + + DotNetRedistHostfxrInstallerarm64 @@ -32,14 +43,32 @@ - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.msi + + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.msi + + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.msi + + + dotnet-host-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.msi - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe + + dotnet-host-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.msi - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe + + dotnet-host-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.msi + + + dotnet-hostfxr-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.msi + + + dotnet-hostfxr-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.msi + + + dotnet-hostfxr-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.msi @@ -74,42 +103,16 @@ - - - - - - DotNetRedistLtsInstallerProductVersion%(Platforms.Identity) - DotNetRedistLtsInstallerProductCode%(Platforms.Identity) - DotNetRedistLtsInstallerUpgradeCode%(Platforms.Identity) - - - - - - - - - - - - - - $(DefineConstants);DotNetRedistLtsInstallerx64=$(DotNetRedistLtsInstallerx64) - $(DefineConstants);DotNetRedistLtsInstallerProductVersionx64=$(DotNetRedistLtsInstallerProductVersionx64) - $(DefineConstants);DotNetRedistLtsInstallerProductCodex64=$(DotNetRedistLtsInstallerProductCodex64) - $(DefineConstants);DotNetRedistLtsInstallerUpgradeCodex64=$(DotNetRedistLtsInstallerUpgradeCodex64) $(DefineConstants);DotNetRedistLtsInstallerx86=$(DotNetRedistLtsInstallerx86) - $(DefineConstants);DotNetRedistLtsInstallerProductVersionx86=$(DotNetRedistLtsInstallerProductVersionx86) - $(DefineConstants);DotNetRedistLtsInstallerProductCodex86=$(DotNetRedistLtsInstallerProductCodex86) - $(DefineConstants);DotNetRedistLtsInstallerUpgradeCodex86=$(DotNetRedistLtsInstallerUpgradeCodex86) $(DefineConstants);DotNetRedistLtsInstallerarm64=$(DotNetRedistLtsInstallerarm64) - $(DefineConstants);DotNetRedistLtsInstallerProductVersionarm64=$(DotNetRedistLtsInstallerProductVersionarm64) - $(DefineConstants);DotNetRedistLtsInstallerProductCodearm64=$(DotNetRedistLtsInstallerProductCodearm64) - $(DefineConstants);DotNetRedistLtsInstallerUpgradeCodearm64=$(DotNetRedistLtsInstallerUpgradeCodearm64) + $(DefineConstants);DotNetRedistHostInstallerx64=$(DotNetRedistHostInstallerx64) + $(DefineConstants);DotNetRedistHostInstallerx86=$(DotNetRedistHostInstallerx86) + $(DefineConstants);DotNetRedistHostInstallerarm64=$(DotNetRedistHostInstallerarm64) + $(DefineConstants);DotNetRedistHostfxrInstallerx64=$(DotNetRedistHostfxrInstallerx64) + $(DefineConstants);DotNetRedistHostfxrInstallerx86=$(DotNetRedistHostfxrInstallerx86) + $(DefineConstants);DotNetRedistHostfxrInstallerarm64=$(DotNetRedistHostfxrInstallerarm64) diff --git a/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs b/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs index 7cd6db76c9fb..9523cd755f45 100644 --- a/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs +++ b/src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs @@ -1,63 +1,33 @@ - - - - - - - + - - + InstallCondition="(NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")"> + - - + InstallCondition="VersionNT64 AND NOT (NativeMachine="$(var.NativeMachine_arm64)") AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")"> + - - + InstallCondition="(NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")"> + diff --git a/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj b/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj index f3b8e2fa1e6d..cfb32de2dc5d 100644 --- a/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj +++ b/src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj @@ -60,7 +60,7 @@ True true - @@ -103,17 +103,17 @@ - + x64 SharedFxRedistInstallerx64 $(SharedFxPackageVersion) - + x86 SharedFxRedistInstallerx86 $(SharedFxPackageVersion) - + arm64 SharedFxRedistInstallerarm64 $(SharedFxPackageVersion) @@ -139,39 +139,10 @@ - - - SharedFxInstallerProductVersionx64 - SharedFxInstallerProductCodex64 - - - SharedFxInstallerProductVersionx86 - SharedFxInstallerProductCodex86 - - - SharedFxInstallerProductVersionarm64 - SharedFxInstallerProductCodearm64 - - - - - - - - - - - $(DefineConstants);SharedFxRedistInstallerx64=$(SharedFxRedistInstallerx64) - $(DefineConstants);SharedFxInstallerProductVersionx64=$(SharedFxInstallerProductVersionx64) - $(DefineConstants);SharedFxInstallerProductCodex64=$(SharedFxInstallerProductCodex64) $(DefineConstants);SharedFxRedistInstallerx86=$(SharedFxRedistInstallerx86) - $(DefineConstants);SharedFxInstallerProductVersionx86=$(SharedFxInstallerProductVersionx86) - $(DefineConstants);SharedFxInstallerProductCodex86=$(SharedFxInstallerProductCodex86) $(DefineConstants);SharedFxRedistInstallerarm64=$(SharedFxRedistInstallerarm64) - $(DefineConstants);SharedFxInstallerProductVersionarm64=$(SharedFxInstallerProductVersionarm64) - $(DefineConstants);SharedFxInstallerProductCodearm64=$(SharedFxInstallerProductCodearm64) From 963a818cbc8fc928edd0b7e25b3e011b19a42be1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:51:53 +0000 Subject: [PATCH 161/257] [main] (deps): Bump src/submodules/googletest (#56760) Bumps [src/submodules/googletest](https://github.com/google/googletest) from `34ad51b` to `b4aaf97`. - [Release notes](https://github.com/google/googletest/releases) - [Commits](https://github.com/google/googletest/compare/34ad51b3dc4f922d8ab622491dd44fc2c39afee9...b4aaf97d8f7eaffab79aa15e10a91b331b941fe2) --- updated-dependencies: - dependency-name: src/submodules/googletest dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/submodules/googletest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/googletest b/src/submodules/googletest index 34ad51b3dc4f..b4aaf97d8f7e 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 34ad51b3dc4f922d8ab622491dd44fc2c39afee9 +Subproject commit b4aaf97d8f7eaffab79aa15e10a91b331b941fe2 From fe84bd02ebbb681e928536f6fa56d4cfd2dc72c3 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Fri, 12 Jul 2024 10:49:56 -0600 Subject: [PATCH 162/257] update tsaconfig (#56749) --- eng/sdl-tsa-vars.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/sdl-tsa-vars.config b/eng/sdl-tsa-vars.config index d90f3ce8e06a..31a268dfa59f 100644 --- a/eng/sdl-tsa-vars.config +++ b/eng/sdl-tsa-vars.config @@ -3,7 +3,7 @@ -TsaInstanceURL https://devdiv.visualstudio.com/ -TsaProjectName DEVDIV -TsaNotificationEmail aspnetcore-build@microsoft.com --TsaCodebaseAdmin REDMOND\kevinpi +-TsaCodebaseAdmin REDMOND\aspnetcore-build -TsaBugAreaPath "DevDiv\ASP.NET Core\Policy Violations" -TsaIterationPath DevDiv -TsaRepositoryName AspNetCore From cd24d14d0d4d4aa60cf721357abe5e7b9dddaf00 Mon Sep 17 00:00:00 2001 From: Brennan Date: Fri, 12 Jul 2024 13:26:05 -0700 Subject: [PATCH 163/257] Use new PipeWriter Json overloads (#55740) --- .../TestHost/src/ResponseBodyPipeWriter.cs | 4 + .../src/HttpResponseJsonExtensions.cs | 119 +++++++++++++----- .../test/HttpResponseJsonExtensionsTests.cs | 5 +- .../SystemTextJsonOutputFormatter.cs | 14 ++- .../SystemTextJsonResultExecutor.cs | 11 +- .../src/Internal/Http/Http1OutputProducer.cs | 12 ++ .../Core/src/Internal/Http/HttpProtocol.cs | 2 + .../Internal/Http/HttpResponsePipeWriter.cs | 3 + .../src/Internal/Http/IHttpOutputProducer.cs | 1 + .../src/Internal/Http/IHttpResponseControl.cs | 1 + .../src/Internal/Http2/Http2OutputProducer.cs | 2 + .../src/Internal/Http3/Http3OutputProducer.cs | 2 + .../PipeWriterHelpers/ConcurrentPipeWriter.cs | 9 ++ .../Kestrel/shared/CompletionPipeWriter.cs | 4 + .../Http2/Http2ConnectionTests.cs | 110 ++++++++++++++++ .../Http3/Http3ConnectionTests.cs | 111 +++++++++++++++- .../WebTransport/WebTransportTestUtilities.cs | 2 + .../InMemory.FunctionalTests/ResponseTests.cs | 106 ++++++++++++++++ 18 files changed, 474 insertions(+), 44 deletions(-) diff --git a/src/Hosting/TestHost/src/ResponseBodyPipeWriter.cs b/src/Hosting/TestHost/src/ResponseBodyPipeWriter.cs index ed23b050ed29..7ab0711d689a 100644 --- a/src/Hosting/TestHost/src/ResponseBodyPipeWriter.cs +++ b/src/Hosting/TestHost/src/ResponseBodyPipeWriter.cs @@ -95,4 +95,8 @@ public override Span GetSpan(int sizeHint = 0) CheckNotComplete(); return _pipe.Writer.GetSpan(sizeHint); } + + public override bool CanGetUnflushedBytes => _pipe.Writer.CanGetUnflushedBytes; + + public override long UnflushedBytes => _pipe.Writer.UnflushedBytes; } diff --git a/src/Http/Http.Extensions/src/HttpResponseJsonExtensions.cs b/src/Http/Http.Extensions/src/HttpResponseJsonExtensions.cs index 3f783c7b6cd2..42aa63c2bf14 100644 --- a/src/Http/Http.Extensions/src/HttpResponseJsonExtensions.cs +++ b/src/Http/Http.Extensions/src/HttpResponseJsonExtensions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; +using System.IO.Pipelines; using System.Text.Json; using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; @@ -89,13 +90,23 @@ public static Task WriteAsJsonAsync( response.ContentType = contentType ?? JsonConstants.JsonContentTypeWithCharset; + var startTask = Task.CompletedTask; + if (!response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + startTask = response.StartAsync(cancellationToken); + } + // if no user provided token, pass the RequestAborted token and ignore OperationCanceledException - if (!cancellationToken.CanBeCanceled) + if (!startTask.IsCompleted || !cancellationToken.CanBeCanceled) { - return WriteAsJsonAsyncSlow(response.Body, value, options, response.HttpContext.RequestAborted); + return WriteAsJsonAsyncSlow(startTask, response.BodyWriter, value, options, + ignoreOCE: !cancellationToken.CanBeCanceled, + cancellationToken.CanBeCanceled ? cancellationToken : response.HttpContext.RequestAborted); } - return JsonSerializer.SerializeAsync(response.Body, value, options, cancellationToken); + startTask.GetAwaiter().GetResult(); + return JsonSerializer.SerializeAsync(response.BodyWriter, value, options, cancellationToken); } /// @@ -120,21 +131,33 @@ public static Task WriteAsJsonAsync( response.ContentType = contentType ?? JsonConstants.JsonContentTypeWithCharset; + var startTask = Task.CompletedTask; + if (!response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + startTask = response.StartAsync(cancellationToken); + } + // if no user provided token, pass the RequestAborted token and ignore OperationCanceledException - if (!cancellationToken.CanBeCanceled) + if (!startTask.IsCompleted || !cancellationToken.CanBeCanceled) { - return WriteAsJsonAsyncSlow(response, value, jsonTypeInfo); + return WriteAsJsonAsyncSlow(startTask, response, value, jsonTypeInfo, + ignoreOCE: !cancellationToken.CanBeCanceled, + cancellationToken.CanBeCanceled ? cancellationToken : response.HttpContext.RequestAborted); } - return JsonSerializer.SerializeAsync(response.Body, value, jsonTypeInfo, cancellationToken); + startTask.GetAwaiter().GetResult(); + return JsonSerializer.SerializeAsync(response.BodyWriter, value, jsonTypeInfo, cancellationToken); - static async Task WriteAsJsonAsyncSlow(HttpResponse response, TValue value, JsonTypeInfo jsonTypeInfo) + static async Task WriteAsJsonAsyncSlow(Task startTask, HttpResponse response, TValue value, JsonTypeInfo jsonTypeInfo, + bool ignoreOCE, CancellationToken cancellationToken) { try { - await JsonSerializer.SerializeAsync(response.Body, value, jsonTypeInfo, response.HttpContext.RequestAborted); + await startTask; + await JsonSerializer.SerializeAsync(response.BodyWriter, value, jsonTypeInfo, cancellationToken); } - catch (OperationCanceledException) { } + catch (OperationCanceledException) when (ignoreOCE) { } } } @@ -161,37 +184,52 @@ public static Task WriteAsJsonAsync( response.ContentType = contentType ?? JsonConstants.JsonContentTypeWithCharset; + var startTask = Task.CompletedTask; + if (!response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + startTask = response.StartAsync(cancellationToken); + } + // if no user provided token, pass the RequestAborted token and ignore OperationCanceledException - if (!cancellationToken.CanBeCanceled) + if (!startTask.IsCompleted || !cancellationToken.CanBeCanceled) { - return WriteAsJsonAsyncSlow(response, value, jsonTypeInfo); + return WriteAsJsonAsyncSlow(startTask, response, value, jsonTypeInfo, + ignoreOCE: !cancellationToken.CanBeCanceled, + cancellationToken.CanBeCanceled ? cancellationToken : response.HttpContext.RequestAborted); } - return JsonSerializer.SerializeAsync(response.Body, value, jsonTypeInfo, cancellationToken); + startTask.GetAwaiter().GetResult(); + return JsonSerializer.SerializeAsync(response.BodyWriter, value, jsonTypeInfo, cancellationToken); - static async Task WriteAsJsonAsyncSlow(HttpResponse response, object? value, JsonTypeInfo jsonTypeInfo) + static async Task WriteAsJsonAsyncSlow(Task startTask, HttpResponse response, object? value, JsonTypeInfo jsonTypeInfo, + bool ignoreOCE, CancellationToken cancellationToken) { try { - await JsonSerializer.SerializeAsync(response.Body, value, jsonTypeInfo, response.HttpContext.RequestAborted); + await startTask; + await JsonSerializer.SerializeAsync(response.BodyWriter, value, jsonTypeInfo, cancellationToken); } - catch (OperationCanceledException) { } + catch (OperationCanceledException) when (ignoreOCE) { } } } [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] [RequiresDynamicCode(RequiresDynamicCodeMessage)] private static async Task WriteAsJsonAsyncSlow( - Stream body, + Task startTask, + PipeWriter body, TValue value, JsonSerializerOptions? options, + bool ignoreOCE, CancellationToken cancellationToken) { try { + await startTask; await JsonSerializer.SerializeAsync(body, value, options, cancellationToken); } - catch (OperationCanceledException) { } + catch (OperationCanceledException) when (ignoreOCE) { } } /// @@ -266,29 +304,42 @@ public static Task WriteAsJsonAsync( response.ContentType = contentType ?? JsonConstants.JsonContentTypeWithCharset; + var startTask = Task.CompletedTask; + if (!response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + startTask = response.StartAsync(cancellationToken); + } + // if no user provided token, pass the RequestAborted token and ignore OperationCanceledException - if (!cancellationToken.CanBeCanceled) + if (!startTask.IsCompleted || !cancellationToken.CanBeCanceled) { - return WriteAsJsonAsyncSlow(response.Body, value, type, options, response.HttpContext.RequestAborted); + return WriteAsJsonAsyncSlow(startTask, response.BodyWriter, value, type, options, + ignoreOCE: !cancellationToken.CanBeCanceled, + cancellationToken.CanBeCanceled ? cancellationToken : response.HttpContext.RequestAborted); } - return JsonSerializer.SerializeAsync(response.Body, value, type, options, cancellationToken); + startTask.GetAwaiter().GetResult(); + return JsonSerializer.SerializeAsync(response.BodyWriter, value, type, options, cancellationToken); } [RequiresUnreferencedCode(RequiresUnreferencedCodeMessage)] [RequiresDynamicCode(RequiresDynamicCodeMessage)] private static async Task WriteAsJsonAsyncSlow( - Stream body, + Task startTask, + PipeWriter body, object? value, Type type, JsonSerializerOptions? options, + bool ignoreOCE, CancellationToken cancellationToken) { try { + await startTask; await JsonSerializer.SerializeAsync(body, value, type, options, cancellationToken); } - catch (OperationCanceledException) { } + catch (OperationCanceledException) when (ignoreOCE) { } } /// @@ -316,21 +367,33 @@ public static Task WriteAsJsonAsync( response.ContentType = contentType ?? JsonConstants.JsonContentTypeWithCharset; + var startTask = Task.CompletedTask; + if (!response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + startTask = response.StartAsync(cancellationToken); + } + // if no user provided token, pass the RequestAborted token and ignore OperationCanceledException - if (!cancellationToken.CanBeCanceled) + if (!startTask.IsCompleted || !cancellationToken.CanBeCanceled) { - return WriteAsJsonAsyncSlow(); + return WriteAsJsonAsyncSlow(startTask, response.BodyWriter, value, type, context, + ignoreOCE: !cancellationToken.CanBeCanceled, + cancellationToken.CanBeCanceled ? cancellationToken : response.HttpContext.RequestAborted); } - return JsonSerializer.SerializeAsync(response.Body, value, type, context, cancellationToken); + startTask.GetAwaiter().GetResult(); + return JsonSerializer.SerializeAsync(response.BodyWriter, value, type, context, cancellationToken); - async Task WriteAsJsonAsyncSlow() + static async Task WriteAsJsonAsyncSlow(Task startTask, PipeWriter body, object? value, Type type, JsonSerializerContext context, + bool ignoreOCE, CancellationToken cancellationToken) { try { - await JsonSerializer.SerializeAsync(response.Body, value, type, context, cancellationToken); + await startTask; + await JsonSerializer.SerializeAsync(body, value, type, context, cancellationToken); } - catch (OperationCanceledException) { } + catch (OperationCanceledException) when (ignoreOCE) { } } } diff --git a/src/Http/Http.Extensions/test/HttpResponseJsonExtensionsTests.cs b/src/Http/Http.Extensions/test/HttpResponseJsonExtensionsTests.cs index 7d9a22cfb7be..771a824112d6 100644 --- a/src/Http/Http.Extensions/test/HttpResponseJsonExtensionsTests.cs +++ b/src/Http/Http.Extensions/test/HttpResponseJsonExtensionsTests.cs @@ -494,10 +494,7 @@ private class TestStream : Stream public override long Length { get; } public override long Position { get; set; } - public override void Flush() - { - throw new NotImplementedException(); - } + public override void Flush() { } public override int Read(byte[] buffer, int offset, int count) { diff --git a/src/Mvc/Mvc.Core/src/Formatters/SystemTextJsonOutputFormatter.cs b/src/Mvc/Mvc.Core/src/Formatters/SystemTextJsonOutputFormatter.cs index 273b11d6f65d..c51ca745d8e7 100644 --- a/src/Mvc/Mvc.Core/src/Formatters/SystemTextJsonOutputFormatter.cs +++ b/src/Mvc/Mvc.Core/src/Formatters/SystemTextJsonOutputFormatter.cs @@ -83,21 +83,25 @@ public sealed override async Task WriteResponseBodyAsync(OutputFormatterWriteCon } } - var responseStream = httpContext.Response.Body; if (selectedEncoding.CodePage == Encoding.UTF8.CodePage) { try { + var responseWriter = httpContext.Response.BodyWriter; + if (!httpContext.Response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + await httpContext.Response.StartAsync(); + } + if (jsonTypeInfo is not null) { - await JsonSerializer.SerializeAsync(responseStream, context.Object, jsonTypeInfo, httpContext.RequestAborted); + await JsonSerializer.SerializeAsync(responseWriter, context.Object, jsonTypeInfo, httpContext.RequestAborted); } else { - await JsonSerializer.SerializeAsync(responseStream, context.Object, SerializerOptions, httpContext.RequestAborted); + await JsonSerializer.SerializeAsync(responseWriter, context.Object, SerializerOptions, httpContext.RequestAborted); } - - await responseStream.FlushAsync(httpContext.RequestAborted); } catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { } } diff --git a/src/Mvc/Mvc.Core/src/Infrastructure/SystemTextJsonResultExecutor.cs b/src/Mvc/Mvc.Core/src/Infrastructure/SystemTextJsonResultExecutor.cs index c905ff9cabee..cfce28c8dc64 100644 --- a/src/Mvc/Mvc.Core/src/Infrastructure/SystemTextJsonResultExecutor.cs +++ b/src/Mvc/Mvc.Core/src/Infrastructure/SystemTextJsonResultExecutor.cs @@ -61,13 +61,18 @@ public async Task ExecuteAsync(ActionContext context, JsonResult result) var objectType = value?.GetType() ?? typeof(object); // Keep this code in sync with SystemTextJsonOutputFormatter - var responseStream = response.Body; if (resolvedContentTypeEncoding.CodePage == Encoding.UTF8.CodePage) { try { - await JsonSerializer.SerializeAsync(responseStream, value, objectType, jsonSerializerOptions, context.HttpContext.RequestAborted); - await responseStream.FlushAsync(context.HttpContext.RequestAborted); + var responseWriter = response.BodyWriter; + if (!response.HasStarted) + { + // Flush headers before starting Json serialization. This avoids an extra layer of buffering before the first flush. + await response.StartAsync(); + } + + await JsonSerializer.SerializeAsync(responseWriter, value, objectType, jsonSerializerOptions, context.HttpContext.RequestAborted); } catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs index c32d6940f3c7..cdd2b23c0ca5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs @@ -61,6 +61,7 @@ internal class Http1OutputProducer : IHttpOutputProducer, IDisposable // Fields needed to store writes before calling either startAsync or Write/FlushAsync // These should be cleared by the end of the request private List? _completedSegments; + private int _completedSegmentsByteCount; private Memory _currentSegment; private IMemoryOwner? _currentSegmentOwner; private int _position; @@ -273,6 +274,15 @@ public void Advance(int bytes) } } + public long UnflushedBytes + { + get + { + var bytes = _position + _advancedBytesForChunk + _pipeWriter.UnflushedBytes + _completedSegmentsByteCount; + return bytes; + } + } + public void CancelPendingFlush() { _pipeWriter.CancelPendingFlush(); @@ -372,6 +382,7 @@ private void WriteDataWrittenBeforeHeaders(ref BufferWriter writer) segment.Return(); } + _completedSegmentsByteCount = 0; _completedSegments.Clear(); } @@ -730,6 +741,7 @@ private void AddSegment(int sizeHint = 0) // GetMemory was called. In that case we'll take the current segment and call it "completed", but need to // ignore any empty space in it. _completedSegments.Add(new CompletedBuffer(_currentSegmentOwner, _currentSegment, _position)); + _completedSegmentsByteCount += _position; } if (sizeHint <= _memoryPool.MaxBufferSize) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs index 9f70362b493b..9bb109efda4e 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs @@ -1482,6 +1482,8 @@ public void Advance(int bytes) } } + public long UnflushedBytes => Output.UnflushedBytes; + public Memory GetMemory(int sizeHint = 0) { _isLeasedMemoryInvalid = false; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs index 2d73ca578668..5e5078e05cc5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs @@ -93,6 +93,9 @@ public void Abort() } } + public override bool CanGetUnflushedBytes => true; + public override long UnflushedBytes => _pipeControl.UnflushedBytes; + [MethodImpl(MethodImplOptions.AggressiveInlining)] private void ValidateState(CancellationToken cancellationToken = default) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs index 0cb1c596e4a0..6fea3bd290cb 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs @@ -16,6 +16,7 @@ internal interface IHttpOutputProducer Task WriteDataAsync(ReadOnlySpan data, CancellationToken cancellationToken); ValueTask WriteStreamSuffixAsync(); void Advance(int bytes); + long UnflushedBytes { get; } Span GetSpan(int sizeHint = 0); Memory GetMemory(int sizeHint = 0); void CancelPendingFlush(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs index 28fcbffdff0d..b2106b7e1da5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs @@ -11,6 +11,7 @@ internal interface IHttpResponseControl Memory GetMemory(int sizeHint = 0); Span GetSpan(int sizeHint = 0); void Advance(int bytes); + long UnflushedBytes { get; } ValueTask FlushPipeAsync(CancellationToken cancellationToken); ValueTask WritePipeAsync(ReadOnlyMemory source, CancellationToken cancellationToken); void CancelPendingFlush(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs index f65890adf7cb..7436784464a0 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs @@ -469,6 +469,8 @@ public void Advance(int bytes) } } + public long UnflushedBytes => _pipeWriter.UnflushedBytes; + public Span GetSpan(int sizeHint = 0) { lock (_dataWriterLock) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs index d387d3629662..64ce3f7cd3c5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3OutputProducer.cs @@ -122,6 +122,8 @@ public void Advance(int bytes) } } + public long UnflushedBytes => _pipeWriter.UnflushedBytes; + public void CancelPendingFlush() { lock (_dataWriterLock) diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/PipeWriterHelpers/ConcurrentPipeWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/PipeWriterHelpers/ConcurrentPipeWriter.cs index 2f0d3f8ba534..2ca58149e7e3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/PipeWriterHelpers/ConcurrentPipeWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/PipeWriterHelpers/ConcurrentPipeWriter.cs @@ -209,6 +209,15 @@ public override void Complete(Exception? exception = null) } } + public override bool CanGetUnflushedBytes => _innerPipeWriter.CanGetUnflushedBytes; + public override long UnflushedBytes + { + get + { + return _innerPipeWriter.UnflushedBytes + _bytesBuffered; + } + } + public void Abort() { _aborted = true; diff --git a/src/Servers/Kestrel/shared/CompletionPipeWriter.cs b/src/Servers/Kestrel/shared/CompletionPipeWriter.cs index d8224bbdf35b..f79a764abfca 100644 --- a/src/Servers/Kestrel/shared/CompletionPipeWriter.cs +++ b/src/Servers/Kestrel/shared/CompletionPipeWriter.cs @@ -64,6 +64,10 @@ public override Span GetSpan(int sizeHint = 0) return _inner.GetSpan(sizeHint); } + public override bool CanGetUnflushedBytes => _inner.CanGetUnflushedBytes; + + public override long UnflushedBytes => _inner.UnflushedBytes; + public void Reset() { IsCompleted = false; diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs index 0a437a4a2c1d..d0420bcb71c1 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs @@ -5529,6 +5529,116 @@ public async Task StartConnection_SendNothing_NoError() await StopConnectionAsync(expectedLastStreamId: 0, ignoreNonGoAwayFrames: false); } + [Fact] + public async Task WriteBeforeFlushingHeadersTracksBytesCorrectly() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await InitializeConnectionAsync(async c => + { + try + { + var length = 0; + var memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + await c.Response.BodyWriter.FlushAsync(); + + Assert.Equal(0, c.Response.BodyWriter.UnflushedBytes); + + tcs.SetResult(); + } + catch (Exception ex) + { + tcs.SetException(ex); + } + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + var frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)(Http2HeadersFrameFlags.END_HEADERS), + withStreamId: 1); + + frame = await ExpectAsync(Http2FrameType.DATA, + withLength: 8192, + withFlags: (byte)(Http2HeadersFrameFlags.NONE), + withStreamId: 1); + + await ExpectAsync(Http2FrameType.DATA, + withLength: 0, + withFlags: (byte)(Http2HeadersFrameFlags.END_STREAM), + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false); + + await tcs.Task; + } + + [Fact] + public async Task WriteAfterFlushingHeadersTracksBytesCorrectly() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await InitializeConnectionAsync(async c => + { + try + { + await c.Response.StartAsync(); + + var length = 0; + var memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + await c.Response.BodyWriter.FlushAsync(); + + Assert.Equal(0, c.Response.BodyWriter.UnflushedBytes); + + tcs.SetResult(); + } + catch (Exception ex) + { + tcs.SetException(ex); + } + }); + + await StartStreamAsync(1, _browserRequestHeaders, endStream: true); + + var frame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 32, + withFlags: (byte)(Http2HeadersFrameFlags.END_HEADERS), + withStreamId: 1); + + frame = await ExpectAsync(Http2FrameType.DATA, + withLength: 8192, + withFlags: (byte)(Http2HeadersFrameFlags.NONE), + withStreamId: 1); + + await ExpectAsync(Http2FrameType.DATA, + withLength: 0, + withFlags: (byte)(Http2HeadersFrameFlags.END_STREAM), + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false); + + await tcs.Task; + } + public static TheoryData UpperCaseHeaderNameData { get diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs index 2595f6dd76c3..7bb52e666e03 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3ConnectionTests.cs @@ -1,10 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Buffers; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Net.Http; using System.Reflection; @@ -13,13 +11,12 @@ using Microsoft.AspNetCore.Connections.Features; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; +using Microsoft.AspNetCore.InternalTesting; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3; -using Microsoft.AspNetCore.InternalTesting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; -using Xunit; using Http3SettingType = Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3SettingType; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests; @@ -589,6 +586,112 @@ await Http3Api.InitializeConnectionAsync(context => Assert.NotSame(trailersFirst, trailersLast); } + [Fact] + public async Task WriteBeforeFlushingHeadersTracksBytesCorrectly() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await Http3Api.InitializeConnectionAsync(async c => + { + try + { + var length = 0; + var memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + await c.Response.BodyWriter.FlushAsync(); + + Assert.Equal(0, c.Response.BodyWriter.UnflushedBytes); + + tcs.SetResult(); + } + catch (Exception ex) + { + tcs.SetException(ex); + } + }); + + var requestStream = await Http3Api.CreateRequestStream(new[] + { + new KeyValuePair(InternalHeaderNames.Method, "POST"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Authority, "127.0.0.1"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + new KeyValuePair(HeaderNames.Expect, "100-continue"), + }); + + await requestStream.SendDataAsync(Memory.Empty, endStream: true); + + await requestStream.ExpectHeadersAsync(); + await requestStream.ExpectDataAsync(); + + await requestStream.OnDisposedTask.DefaultTimeout(); + Assert.True(requestStream.Disposed); + + await tcs.Task; + } + + [Fact] + public async Task WriteAfterFlushingHeadersTracksBytesCorrectly() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await Http3Api.InitializeConnectionAsync(async c => + { + try + { + await c.Response.StartAsync(); + + var length = 0; + var memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + memory = c.Response.BodyWriter.GetMemory(); + c.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + + Assert.Equal(length, c.Response.BodyWriter.UnflushedBytes); + + await c.Response.BodyWriter.FlushAsync(); + + Assert.Equal(0, c.Response.BodyWriter.UnflushedBytes); + + tcs.SetResult(); + } + catch (Exception ex) + { + tcs.SetException(ex); + } + }); + + var requestStream = await Http3Api.CreateRequestStream(new[] + { + new KeyValuePair(InternalHeaderNames.Method, "POST"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Authority, "127.0.0.1"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + new KeyValuePair(HeaderNames.Expect, "100-continue"), + }); + + await requestStream.SendDataAsync(Memory.Empty, endStream: true); + + await requestStream.ExpectHeadersAsync(); + await requestStream.ExpectDataAsync(); + + await requestStream.OnDisposedTask.DefaultTimeout(); + Assert.True(requestStream.Disposed); + + await tcs.Task; + } + private async Task MakeRequestAsync(int index, KeyValuePair[] headers, bool sendData, bool waitForServerDispose) { var requestStream = await Http3Api.CreateRequestStream(headers, endStream: !sendData); diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/WebTransport/WebTransportTestUtilities.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/WebTransport/WebTransportTestUtilities.cs index 07c83f4fad34..5f8d338d97f5 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/WebTransport/WebTransportTestUtilities.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/WebTransport/WebTransportTestUtilities.cs @@ -137,6 +137,8 @@ public Span GetSpan(int sizeHint = 0) return GetMemory(sizeHint).Span; } + public long UnflushedBytes => 0; + public ValueTask ProduceContinueAsync() { // no-op diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/ResponseTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/ResponseTests.cs index 0909df237f49..ba363236cb9f 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/ResponseTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/ResponseTests.cs @@ -4527,6 +4527,112 @@ await connection.Receive( } } + [Fact] + public async Task WriteBeforeFlushingHeadersTracksBytesCorrectly() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await using var server = new TestServer(async context => + { + try + { + var length = 0; + var memory = context.Response.BodyWriter.GetMemory(); + context.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + Assert.Equal(length, context.Response.BodyWriter.UnflushedBytes); + + memory = context.Response.BodyWriter.GetMemory(); + context.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + + Assert.Equal(length, context.Response.BodyWriter.UnflushedBytes); + + await context.Response.BodyWriter.FlushAsync(); + + Assert.Equal(0, context.Response.BodyWriter.UnflushedBytes); + + tcs.SetResult(); + } + catch (Exception ex) + { + tcs.SetException(ex); + } + }); + + using (var connection = server.CreateConnection()) + { + await connection.Send( + "GET / HTTP/1.1", + "Host:", + "", + ""); + + await connection.Receive( + "HTTP/1.1 200 OK", + $"Date: {server.Context.DateHeaderValue}", + "Transfer-Encoding: chunked", + ""); + + await tcs.Task; + } + } + + [Fact] + public async Task WriteAfterFlushingHeadersTracksBytesCorrectly() + { + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await using var server = new TestServer(async context => + { + try + { + await context.Response.StartAsync(); + // StartAsync doesn't actually flush, it just commits bytes to Pipe + // going to flush here so we have 0 unflushed bytes to make asserts below easier + await context.Response.BodyWriter.FlushAsync(); + + var length = 0; + var memory = context.Response.BodyWriter.GetMemory(); + context.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + Assert.Equal(length, context.Response.BodyWriter.UnflushedBytes); + + memory = context.Response.BodyWriter.GetMemory(); + context.Response.BodyWriter.Advance(memory.Length); + length += memory.Length; + + // + 7 for first chunked framing (ff9\r\n\r\n) + Assert.Equal(length + 7, context.Response.BodyWriter.UnflushedBytes); + + await context.Response.BodyWriter.FlushAsync(); + + Assert.Equal(0, context.Response.BodyWriter.UnflushedBytes); + + tcs.SetResult(); + } + catch (Exception ex) + { + tcs.SetException(ex); + } + }); + + using (var connection = server.CreateConnection()) + { + await connection.Send( + "GET / HTTP/1.1", + "Host:", + "", + ""); + + await connection.Receive( + "HTTP/1.1 200 OK", + $"Date: {server.Context.DateHeaderValue}", + "Transfer-Encoding: chunked", + ""); + + await tcs.Task; + } + } + private static async Task ResponseStatusCodeSetBeforeHttpContextDispose( ITestSink testSink, ILoggerFactory loggerFactory, From 90a622d4f3f377dcf4eabbbbb8765ba9d3e65415 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Fri, 12 Jul 2024 22:12:47 -0700 Subject: [PATCH 164/257] Add support for CreateSchemaReferenceId option (#56753) * Add support for CreateSchemaReferenceId option * Apply suggestions from code review Co-authored-by: Martin Costello * Add test for reference ID de-dupe with CreateSchemaReferenceId --------- Co-authored-by: Martin Costello --- .../Extensions/JsonNodeSchemaExtensions.cs | 15 +- src/OpenApi/src/PublicAPI.Unshipped.txt | 3 + src/OpenApi/src/Services/OpenApiOptions.cs | 17 + .../Services/Schemas/OpenApiSchemaService.cs | 7 +- .../Services/CreateSchemaReferenceIdTests.cs | 304 ++++++++++++++++++ 5 files changed, 337 insertions(+), 9 deletions(-) create mode 100644 src/OpenApi/test/Services/CreateSchemaReferenceIdTests.cs diff --git a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index 5a8706525609..322856a6ed88 100644 --- a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -168,7 +168,8 @@ internal static void ApplyDefaultValue(this JsonNode schema, object? defaultValu /// /// The produced by the underlying schema generator. /// The associated with the . - internal static void ApplyPrimitiveTypesAndFormats(this JsonNode schema, JsonSchemaExporterContext context) + /// A delegate that generates the reference ID to create for a type. + internal static void ApplyPrimitiveTypesAndFormats(this JsonNode schema, JsonSchemaExporterContext context, Func createSchemaReferenceId) { var type = context.TypeInfo.Type; var underlyingType = Nullable.GetUnderlyingType(type); @@ -177,7 +178,7 @@ internal static void ApplyPrimitiveTypesAndFormats(this JsonNode schema, JsonSch schema[OpenApiSchemaKeywords.NullableKeyword] = openApiSchema.Nullable || (schema[OpenApiSchemaKeywords.TypeKeyword] is JsonArray schemaType && schemaType.GetValues().Contains("null")); schema[OpenApiSchemaKeywords.TypeKeyword] = openApiSchema.Type; schema[OpenApiSchemaKeywords.FormatKeyword] = openApiSchema.Format; - schema[OpenApiConstants.SchemaId] = context.TypeInfo.GetSchemaReferenceId(); + schema[OpenApiConstants.SchemaId] = createSchemaReferenceId(context.TypeInfo); schema[OpenApiSchemaKeywords.NullableKeyword] = underlyingType != null; // Clear out patterns that the underlying JSON schema generator uses to represent // validations for DateTime, DateTimeOffset, and integers. @@ -323,7 +324,8 @@ internal static void ApplyParameterInfo(this JsonNode schema, ApiParameterDescri /// /// The produced by the underlying schema generator. /// The associated with the current type. - internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaExporterContext context) + /// A delegate that generates the reference ID to create for a type. + internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaExporterContext context, Func createSchemaReferenceId) { // The `context.Path.Length == 0` check is used to ensure that we only apply the polymorphism options // to the top-level schema and not to any nested schemas that are generated. @@ -340,7 +342,7 @@ internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaEx // that we hardcode here. We could use `OpenApiReference` to construct the reference and // serialize it but we use a hardcoded string here to avoid allocating a new object and // working around Microsoft.OpenApi's serialization libraries. - mappings[$"{discriminator}"] = $"#/components/schemas/{context.TypeInfo.GetSchemaReferenceId()}{jsonDerivedType.GetSchemaReferenceId()}"; + mappings[$"{discriminator}"] = $"#/components/schemas/{createSchemaReferenceId(context.TypeInfo)}{createSchemaReferenceId(jsonDerivedType)}"; } } schema[OpenApiSchemaKeywords.DiscriminatorKeyword] = polymorphismOptions.TypeDiscriminatorPropertyName; @@ -353,9 +355,10 @@ internal static void ApplyPolymorphismOptions(this JsonNode schema, JsonSchemaEx /// /// The produced by the underlying schema generator. /// The associated with the current type. - internal static void ApplySchemaReferenceId(this JsonNode schema, JsonSchemaExporterContext context) + /// A delegate that generates the reference ID to create for a type. + internal static void ApplySchemaReferenceId(this JsonNode schema, JsonSchemaExporterContext context, Func createSchemaReferenceId) { - if (context.TypeInfo.GetSchemaReferenceId() is { } schemaReferenceId) + if (createSchemaReferenceId(context.TypeInfo) is { } schemaReferenceId) { schema[OpenApiConstants.SchemaId] = schemaReferenceId; } diff --git a/src/OpenApi/src/PublicAPI.Unshipped.txt b/src/OpenApi/src/PublicAPI.Unshipped.txt index ddde07129563..e8a64d3adc5d 100644 --- a/src/OpenApi/src/PublicAPI.Unshipped.txt +++ b/src/OpenApi/src/PublicAPI.Unshipped.txt @@ -4,6 +4,8 @@ Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer.TransformAsync(Microsof Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Description.get -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription! Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Description.init -> void Microsoft.AspNetCore.OpenApi.OpenApiOptions +Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId.get -> System.Func! +Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId.set -> void Microsoft.AspNetCore.OpenApi.OpenApiOptions.DocumentName.get -> string! Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiOptions() -> void Microsoft.AspNetCore.OpenApi.OpenApiOptions.OpenApiVersion.get -> Microsoft.OpenApi.OpenApiSpecVersion @@ -27,6 +29,7 @@ Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Type.get -> System. Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Type.init -> void Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions static Microsoft.AspNetCore.Builder.OpenApiEndpointRouteBuilderExtensions.MapOpenApi(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpoints, string! pattern = "/openapi/{documentName}.json") -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder! +static Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateDefaultSchemaReferenceId(System.Text.Json.Serialization.Metadata.JsonTypeInfo! jsonTypeInfo) -> string? static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! documentName) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! documentName, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! diff --git a/src/OpenApi/src/Services/OpenApiOptions.cs b/src/OpenApi/src/Services/OpenApiOptions.cs index a9162196decd..a8ee4ec93f1d 100644 --- a/src/OpenApi/src/Services/OpenApiOptions.cs +++ b/src/OpenApi/src/Services/OpenApiOptions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization.Metadata; using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.OpenApi; using Microsoft.OpenApi.Models; @@ -16,6 +17,13 @@ public sealed class OpenApiOptions internal readonly List DocumentTransformers = []; internal readonly List> SchemaTransformers = []; + /// + /// A default implementation for creating a schema reference ID for a given . + /// + /// The associated with the schema we are generating a reference ID for. + /// The reference ID to use for the schema or if the schema should always be inlined. + public static string? CreateDefaultSchemaReferenceId(JsonTypeInfo jsonTypeInfo) => jsonTypeInfo.GetSchemaReferenceId(); + /// /// Initializes a new instance of the class /// with the default predicate. @@ -40,6 +48,15 @@ public OpenApiOptions() /// public Func ShouldInclude { get; set; } + /// + /// A delegate to determine how reference IDs should be created for schemas associated with types in the given OpenAPI document. + /// + /// + /// The default implementation uses the method to generate reference IDs. When + /// the provided delegate returns , the schema associated with the will always be inlined. + /// + public Func CreateSchemaReferenceId { get; set; } = CreateDefaultSchemaReferenceId; + /// /// Registers a new document transformer on the current instance. /// diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 0d2998cbd180..750037807d54 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -88,9 +88,10 @@ internal sealed class OpenApiSchemaService( { schema = new JsonObject(); } - schema.ApplyPrimitiveTypesAndFormats(context); - schema.ApplySchemaReferenceId(context); - schema.ApplyPolymorphismOptions(context); + var createSchemaReferenceId = optionsMonitor.Get(documentName).CreateSchemaReferenceId; + schema.ApplyPrimitiveTypesAndFormats(context, createSchemaReferenceId); + schema.ApplySchemaReferenceId(context, createSchemaReferenceId); + schema.ApplyPolymorphismOptions(context, createSchemaReferenceId); if (context.PropertyInfo is { } jsonPropertyInfo) { // Short-circuit STJ's handling of nested properties, which uses a reference to the diff --git a/src/OpenApi/test/Services/CreateSchemaReferenceIdTests.cs b/src/OpenApi/test/Services/CreateSchemaReferenceIdTests.cs new file mode 100644 index 000000000000..0a66bda8cc03 --- /dev/null +++ b/src/OpenApi/test/Services/CreateSchemaReferenceIdTests.cs @@ -0,0 +1,304 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Text.Json.Serialization.Metadata; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.OpenApi; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; + +public class CreateSchemaReferenceIdTests : OpenApiDocumentServiceTestBase +{ + [Fact] + public async Task HandlesPolymorphicTypeWithCustomReferenceIds() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/api", (Shape shape) => { }); + string createReferenceId(JsonTypeInfo jsonTypeInfo) + { + return jsonTypeInfo.Type.Name switch + { + "Shape" => "MyShape", + "Triangle" => "MyTriangle", + "Square" => "MySquare", + _ => jsonTypeInfo.Type.Name, + }; + } + var options = new OpenApiOptions { CreateSchemaReferenceId = createReferenceId }; + + // Assert + await VerifyOpenApiDocument(builder, options, document => + { + var operation = document.Paths["/api"].Operations[OperationType.Post]; + Assert.NotNull(operation.RequestBody); + var requestBody = operation.RequestBody.Content; + Assert.True(requestBody.TryGetValue("application/json", out var mediaType)); + var schema = mediaType.Schema.GetEffective(document); + // Assert discriminator mappings have been configured correctly + Assert.Equal("$type", schema.Discriminator.PropertyName); + Assert.Contains(schema.Discriminator.PropertyName, schema.Required); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("triangle", item.Key), + item => Assert.Equal("square", item.Key) + ); + Assert.Collection(schema.Discriminator.Mapping, + item => Assert.Equal("#/components/schemas/MyShapeMyTriangle", item.Value), + item => Assert.Equal("#/components/schemas/MyShapeMySquare", item.Value) + ); + // Assert the schemas with the discriminator have been inserted into the components + Assert.True(document.Components.Schemas.TryGetValue("MyShapeMyTriangle", out var triangleSchema)); + Assert.Contains(schema.Discriminator.PropertyName, triangleSchema.Properties.Keys); + Assert.Equal("triangle", ((OpenApiString)triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + Assert.True(document.Components.Schemas.TryGetValue("MyShapeMySquare", out var squareSchema)); + Assert.Equal("square", ((OpenApiString)squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); + }); + } + + [Fact] + public async Task GeneratesSchemaForPoco_WithSchemaReferenceIdCustomization() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/", (Todo todo) => { }); + var options = new OpenApiOptions { CreateSchemaReferenceId = (type) => $"{type.Type.Name}Schema" }; + + // Assert + await VerifyOpenApiDocument(builder, options, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + + Assert.NotNull(requestBody); + var content = Assert.Single(requestBody.Content); + Assert.Equal("application/json", content.Key); + Assert.NotNull(content.Value.Schema); + Assert.Equal("TodoSchema", content.Value.Schema.Reference.Id); + var schema = content.Value.Schema.GetEffective(document); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("completed", property.Key); + Assert.Equal("boolean", property.Value.Type); + }, + property => + { + Assert.Equal("createdAt", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + }); + + }); + } + + [Fact] + public async Task GeneratesInlineSchemaForPoco_WithCustomNullId() + { + // Arrange + var builder = CreateBuilder(); + + // Act + builder.MapPost("/", (Todo todo) => { }); + var options = new OpenApiOptions { CreateSchemaReferenceId = (type) => type.Type.Name == "Todo" ? null : $"{type.Type.Name}Schema" }; + + // Assert + await VerifyOpenApiDocument(builder, options, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + + Assert.NotNull(requestBody); + var content = Assert.Single(requestBody.Content); + Assert.Equal("application/json", content.Key); + Assert.NotNull(content.Value.Schema); + // Assert that no reference was created and the schema is inlined + var schema = content.Value.Schema; + Assert.Null(schema.Reference); + Assert.Equal("object", schema.Type); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("completed", property.Key); + Assert.Equal("boolean", property.Value.Type); + }, + property => + { + Assert.Equal("createdAt", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + }); + + }); + } + + [Fact] + public async Task CanCallDefaultImplementationFromCustomOne() + { + var builder = CreateBuilder(); + + builder.MapPost("/", (Todo todo) => new TodoWithDueDate(todo.Id, todo.Title, todo.Completed, todo.CreatedAt, DateTime.UtcNow)); + var options = new OpenApiOptions + { + CreateSchemaReferenceId = (type) => + { + if (type.Type.Name == "Todo") + { + return null; + } + return OpenApiOptions.CreateDefaultSchemaReferenceId(type); + } + }; + + await VerifyOpenApiDocument(builder, options, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var response = operation.Responses["200"]; + + // Assert that no reference was created for the Todo type + Assert.NotNull(requestBody); + var content = Assert.Single(requestBody.Content); + Assert.Equal("application/json", content.Key); + Assert.NotNull(content.Value.Schema); + var schema = content.Value.Schema; + Assert.Null(schema.Reference); + + // Assert that a reference was created for the TodoWithDueDate type + Assert.NotNull(response); + var responseContent = Assert.Single(response.Content); + Assert.Equal("application/json", responseContent.Key); + Assert.NotNull(responseContent.Value.Schema); + var responseSchema = responseContent.Value.Schema; + Assert.NotNull(responseSchema.Reference); + Assert.Equal("TodoWithDueDate", responseSchema.Reference.Id); + }); + } + + [Fact] + public async Task HandlesDuplicateSchemaReferenceIdsGeneratedByOverload() + { + var builder = CreateBuilder(); + + builder.MapPost("/", (Todo todo) => new TodoWithDueDate(todo.Id, todo.Title, todo.Completed, todo.CreatedAt, DateTime.UtcNow)); + var options = new OpenApiOptions + { + CreateSchemaReferenceId = (type) => + { + if (type.Type.Name == "TodoWithDueDate" || type.Type.Name == "Todo") + { + return "Todo"; + } + return OpenApiOptions.CreateDefaultSchemaReferenceId(type); + } + }; + + await VerifyOpenApiDocument(builder, options, document => + { + var operation = document.Paths["/"].Operations[OperationType.Post]; + var requestBody = operation.RequestBody; + var response = operation.Responses["200"]; + + // Assert that a reference was created for the Todo type + Assert.NotNull(requestBody); + var content = Assert.Single(requestBody.Content); + Assert.Equal("application/json", content.Key); + Assert.NotNull(content.Value.Schema); + var schema = content.Value.Schema; + Assert.NotNull(schema.Reference); + + // Assert that a reference was created for the TodoWithDueDate type + Assert.NotNull(response); + var responseContent = Assert.Single(response.Content); + Assert.Equal("application/json", responseContent.Key); + Assert.NotNull(responseContent.Value.Schema); + var responseSchema = responseContent.Value.Schema; + Assert.NotNull(responseSchema.Reference); + + // Assert that the reference IDs are not the same (have been deduped) + Assert.NotEqual(schema.Reference.Id, responseSchema.Reference.Id); + + // Assert that the referenced schemas are correct + var effectiveResponseSchema = responseSchema.GetEffective(document); + Assert.Equal("object", effectiveResponseSchema.Type); + Assert.Collection(effectiveResponseSchema.Properties, + property => + { + Assert.Equal("dueDate", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + }, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("completed", property.Key); + Assert.Equal("boolean", property.Value.Type); + }, + property => + { + Assert.Equal("createdAt", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + }); + + var effectiveRequestSchema = schema.GetEffective(document); + Assert.Equal("object", effectiveRequestSchema.Type); + Assert.Collection(effectiveRequestSchema.Properties, + property => + { + Assert.Equal("id", property.Key); + Assert.Equal("integer", property.Value.Type); + }, + property => + { + Assert.Equal("title", property.Key); + Assert.Equal("string", property.Value.Type); + }, + property => + { + Assert.Equal("completed", property.Key); + Assert.Equal("boolean", property.Value.Type); + }, + property => + { + Assert.Equal("createdAt", property.Key); + Assert.Equal("string", property.Value.Type); + Assert.Equal("date-time", property.Value.Format); + }); + }); + } + +} From d0078ee5e714e3d1bb111680991dcde2cb48dca2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:56:41 +0000 Subject: [PATCH 165/257] Update dependencies from https://github.com/dotnet/source-build-externals build 20240708.3 (#56795) Microsoft.SourceBuild.Intermediate.source-build-externals From Version 9.0.0-alpha.1.24324.1 -> To Version 9.0.0-alpha.1.24358.3 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3c9686fdea9c..2131c4800082 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -372,9 +372,9 @@ 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/source-build-externals - 311ef7fef52828f4a70a94d13e32c394fd3292ee + 52c45e529d6a5956136ba3cddf849a16b65eb1f2 diff --git a/eng/Versions.props b/eng/Versions.props index 4efeeb250224..96427d6e0a73 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -170,7 +170,7 @@ 9.0.0-beta.24352.2 9.0.0-beta.24352.2 - 9.0.0-alpha.1.24324.1 + 9.0.0-alpha.1.24358.3 9.0.0-alpha.1.24358.1 From 9876a319f2f32221f81d7159fd7035712842de60 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:11:38 +0000 Subject: [PATCH 166/257] Update dependencies from https://github.com/dotnet/extensions build 20240710.1 (#56796) Microsoft.Extensions.Diagnostics.Testing , Microsoft.Extensions.TimeProvider.Testing From Version 9.0.0-preview.7.24356.1 -> To Version 9.0.0-preview.7.24360.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2131c4800082..2b6766524668 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -414,13 +414,13 @@ https://github.com/dotnet/arcade 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 - + https://github.com/dotnet/extensions - 2c8a4c17e2661224b460ae3d4c4ffc2019a059f8 + ff6dd4e5c43307fc8144d0361cf96986e43fba83 - + https://github.com/dotnet/extensions - 2c8a4c17e2661224b460ae3d4c4ffc2019a059f8 + ff6dd4e5c43307fc8144d0361cf96986e43fba83 https://github.com/nuget/nuget.client diff --git a/eng/Versions.props b/eng/Versions.props index 96427d6e0a73..bb7d7d3018e7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -142,8 +142,8 @@ 9.0.0-preview.7.24357.2 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24356.1 - 9.0.0-preview.7.24356.1 + 9.0.0-preview.7.24360.1 + 9.0.0-preview.7.24360.1 9.0.0-preview.7.24358.3 9.0.0-preview.7.24358.3 From c249ab5c3b2c91ab8fa185da0d8640544d38c449 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:42:50 +0000 Subject: [PATCH 167/257] Update .NET SDK (#56793) Update .NET SDK to version 9.0.100-preview.7.24365.8. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 9c8d1a9eb62e..7b1053a94be9 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "9.0.100-preview.7.24358.6" + "version": "9.0.100-preview.7.24365.8" }, "tools": { - "dotnet": "9.0.100-preview.7.24358.6", + "dotnet": "9.0.100-preview.7.24365.8", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From fa956c611d541efe498c69389da8bcc2120f7b78 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:45:11 +0000 Subject: [PATCH 168/257] Update dependencies from https://github.com/dotnet/arcade build 20240710.4 (#56792) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor From Version 9.0.0-beta.24352.2 -> To Version 9.0.0-beta.24360.4 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 24 ++++++++--------- eng/Versions.props | 8 +++--- .../job/publish-build-assets.yml | 27 +++---------------- eng/common/cross/build-rootfs.sh | 2 +- global.json | 4 +-- 5 files changed, 23 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2b6766524668..6f5cd7a3c08c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -388,31 +388,31 @@ https://github.com/dotnet/winforms 10f120ddca8dc60568e4b9cb93667e90746aade3 - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 731d793be2d0a66bafc96b1a79dc96b4d1f0301b - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 731d793be2d0a66bafc96b1a79dc96b4d1f0301b - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 731d793be2d0a66bafc96b1a79dc96b4d1f0301b - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 731d793be2d0a66bafc96b1a79dc96b4d1f0301b - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 731d793be2d0a66bafc96b1a79dc96b4d1f0301b - + https://github.com/dotnet/arcade - 4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944 + 731d793be2d0a66bafc96b1a79dc96b4d1f0301b https://github.com/dotnet/extensions diff --git a/eng/Versions.props b/eng/Versions.props index bb7d7d3018e7..98a713d7f7c5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -165,10 +165,10 @@ 6.2.4 6.2.4 - 9.0.0-beta.24352.2 - 9.0.0-beta.24352.2 - 9.0.0-beta.24352.2 - 9.0.0-beta.24352.2 + 9.0.0-beta.24360.4 + 9.0.0-beta.24360.4 + 9.0.0-beta.24360.4 + 9.0.0-beta.24360.4 9.0.0-alpha.1.24358.3 diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index d99a1a3b2840..ec3cd14191ab 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -113,38 +113,19 @@ jobs: Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - args: - displayName: Publish ReleaseConfigs Artifact - pathToPublish: '$(Build.StagingDirectory)/ReleaseConfigs' - publishLocation: Container - artifactName: ReleaseConfigs - - - task: powershell@2 - displayName: Check if SymbolPublishingExclusionsFile.txt exists - inputs: - targetType: inline - script: | $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt" - if(Test-Path -Path $symbolExclusionfile) + if (Test-Path -Path $symbolExclusionfile) { Write-Host "SymbolExclusionFile exists" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true" - } - else{ - Write-Host "Symbols Exclusion file does not exist" - Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false" + Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs" } - template: /eng/common/core-templates/steps/publish-build-artifacts.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} args: - displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') - pathToPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' + displayName: Publish ReleaseConfigs Artifact + pathToPublish: '$(Build.StagingDirectory)/ReleaseConfigs' publishLocation: Container artifactName: ReleaseConfigs diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index eb1a90804648..6d99d1263c0b 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -72,7 +72,7 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="13.2-RELEASE" +__FreeBSDBase="13.3-RELEASE" __FreeBSDPkg="1.17.0" __FreeBSDABI="13" __FreeBSDPackages="libunwind" diff --git a/global.json b/global.json index 7b1053a94be9..8b36f60b2721 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ "jdk": "11" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24352.2", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24352.2" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24360.4", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24360.4" } } From 7b757a048879bee6d18326b5f54d780660caebd4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:47:35 +0000 Subject: [PATCH 169/257] Update dependencies from https://github.com/dotnet/winforms build 20240714.1 (#56797) System.Drawing.Common From Version 9.0.0-preview.7.24357.1 -> To Version 9.0.0-preview.7.24364.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6f5cd7a3c08c..b56478c3e44d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -384,9 +384,9 @@ https://github.com/dotnet/runtime 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b - + https://github.com/dotnet/winforms - 10f120ddca8dc60568e4b9cb93667e90746aade3 + c2c7376eab06df529f76f119149514730d396745 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 98a713d7f7c5..425b01b336d4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,7 +176,7 @@ 2.2.0-beta.24327.2 - 9.0.0-preview.7.24357.1 + 9.0.0-preview.7.24364.1 9.0.0-preview.24317.2 9.0.0-preview.24317.2 From 8d9db2f4d2d1c0ddf50fa4f34e2eda126dde5f4b Mon Sep 17 00:00:00 2001 From: Paulo Morgado <470455+paulomorgado@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:43:29 +0100 Subject: [PATCH 170/257] Use ArgumentOutOfRangeException Throw methods in SendFileResponseExtensions..CheckRange (#56420) * Use ArgumentOutOfRangeException Throw methods in SendFileResponseExtensions..CheckRange To allow inlining by the JIT. * fixed logic error * Update src/Http/Http.Extensions/src/SendFileResponseExtensions.cs Co-authored-by: Andrew Casey --------- Co-authored-by: Andrew Casey --- .../src/SendFileResponseExtensions.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Http/Http.Extensions/src/SendFileResponseExtensions.cs b/src/Http/Http.Extensions/src/SendFileResponseExtensions.cs index 3b00124f51b6..013bbcdf6ef2 100644 --- a/src/Http/Http.Extensions/src/SendFileResponseExtensions.cs +++ b/src/Http/Http.Extensions/src/SendFileResponseExtensions.cs @@ -124,14 +124,12 @@ private static async Task SendFileAsyncCore(HttpResponse response, string fileNa private static void CheckRange(long offset, long? count, long fileLength) { - if (offset < 0 || offset > fileLength) + ArgumentOutOfRangeException.ThrowIfLessThan(offset, 0); + ArgumentOutOfRangeException.ThrowIfGreaterThan(offset, fileLength); + if (count is {} countValue) { - throw new ArgumentOutOfRangeException(nameof(offset), offset, string.Empty); - } - if (count.HasValue && - (count.GetValueOrDefault() < 0 || count.GetValueOrDefault() > fileLength - offset)) - { - throw new ArgumentOutOfRangeException(nameof(count), count, string.Empty); + ArgumentOutOfRangeException.ThrowIfLessThan(countValue, 0, nameof(count)); + ArgumentOutOfRangeException.ThrowIfGreaterThan(countValue, fileLength - offset, nameof(count)); } } } From fce244105d82a6309b6d7ca7078184339b039b3a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:20:21 -0700 Subject: [PATCH 171/257] [main] Update dependencies from dotnet/source-build-reference-packages (#56771) * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240712.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24358.1 -> To Version 9.0.0-alpha.1.24362.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240712.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24358.1 -> To Version 9.0.0-alpha.1.24362.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240712.1 Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24358.1 -> To Version 9.0.0-alpha.1.24362.1 * Add prebuilt exclusions * Move lines --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Matt Thalman --- eng/SourceBuildPrebuiltBaseline.xml | 3 +++ eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index b2a2c0373533..a8ebac177d3e 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -17,6 +17,7 @@ + @@ -26,7 +27,9 @@ + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b56478c3e44d..8ac5f2616812 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -339,9 +339,9 @@ 0d51607fb791c51a14b552ed24fe3430c252148b - + https://github.com/dotnet/source-build-reference-packages - 815f91338b1c4485b50bc0da9518b7b8433c75c1 + 2fa4c4f8c0b17b48d2f37839563d6862d1974736 diff --git a/eng/Versions.props b/eng/Versions.props index 425b01b336d4..f84c2d26f491 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -172,7 +172,7 @@ 9.0.0-alpha.1.24358.3 - 9.0.0-alpha.1.24358.1 + 9.0.0-alpha.1.24362.1 2.2.0-beta.24327.2 From bd50a68ecfa4b39b0275805c2c82490e9a71eb18 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Mon, 15 Jul 2024 23:09:45 +0100 Subject: [PATCH 172/257] Amortise Content-Type arrays (#56525) - Amortise arrays used for `TypedResults`' metadata. - Use `ProducesResponseTypeMetadata.CreateUnvalidated` to bypass `Content-Type` validation for static values. - Add and use constant for `application/octet-stream`. --- .../src/Microsoft.AspNetCore.Http.Abstractions.csproj | 1 + src/Http/Http.Results/src/AcceptedAtRouteOfT.cs | 2 +- src/Http/Http.Results/src/AcceptedOfT.cs | 2 +- src/Http/Http.Results/src/BadRequestOfT.cs | 2 +- src/Http/Http.Results/src/ConflictOfT.cs | 2 +- src/Http/Http.Results/src/CreatedAtRouteOfT.cs | 2 +- src/Http/Http.Results/src/CreatedOfT.cs | 2 +- src/Http/Http.Results/src/FileContentHttpResult.cs | 2 +- src/Http/Http.Results/src/FileStreamHttpResult.cs | 2 +- src/Http/Http.Results/src/HttpResultsHelper.cs | 6 ++++++ src/Http/Http.Results/src/InternalServerErrorOfT.cs | 2 +- src/Http/Http.Results/src/NotFoundOfT.cs | 2 +- src/Http/Http.Results/src/OkOfT.cs | 2 +- src/Http/Http.Results/src/PhysicalFileHttpResult.cs | 2 +- src/Http/Http.Results/src/ProblemHttpResult.cs | 2 +- src/Http/Http.Results/src/UnprocessableEntityOfT.cs | 2 +- src/Http/Http.Results/src/ValidationProblem.cs | 4 ++-- src/Http/Http.Results/src/VirtualFileHttpResult.cs | 2 +- 18 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj b/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj index 9d36a6bffdb8..d76abad9b241 100644 --- a/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj +++ b/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj @@ -37,6 +37,7 @@ Microsoft.AspNetCore.Http.HttpResponse + diff --git a/src/Http/Http.Results/src/AcceptedAtRouteOfT.cs b/src/Http/Http.Results/src/AcceptedAtRouteOfT.cs index eee96dbb54a5..e01be31eca3b 100644 --- a/src/Http/Http.Results/src/AcceptedAtRouteOfT.cs +++ b/src/Http/Http.Results/src/AcceptedAtRouteOfT.cs @@ -122,6 +122,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status202Accepted, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/AcceptedOfT.cs b/src/Http/Http.Results/src/AcceptedOfT.cs index 0fcd1676f8fe..939f45f19e92 100644 --- a/src/Http/Http.Results/src/AcceptedOfT.cs +++ b/src/Http/Http.Results/src/AcceptedOfT.cs @@ -100,6 +100,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status202Accepted, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/BadRequestOfT.cs b/src/Http/Http.Results/src/BadRequestOfT.cs index 76d2da6f09aa..d28929f595af 100644 --- a/src/Http/Http.Results/src/BadRequestOfT.cs +++ b/src/Http/Http.Results/src/BadRequestOfT.cs @@ -65,6 +65,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status400BadRequest, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/ConflictOfT.cs b/src/Http/Http.Results/src/ConflictOfT.cs index 1bfa6f07c954..325ba7a90b89 100644 --- a/src/Http/Http.Results/src/ConflictOfT.cs +++ b/src/Http/Http.Results/src/ConflictOfT.cs @@ -65,6 +65,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status409Conflict, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status409Conflict, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/CreatedAtRouteOfT.cs b/src/Http/Http.Results/src/CreatedAtRouteOfT.cs index 3c7ec16337f6..28fd3dc69162 100644 --- a/src/Http/Http.Results/src/CreatedAtRouteOfT.cs +++ b/src/Http/Http.Results/src/CreatedAtRouteOfT.cs @@ -125,6 +125,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status201Created, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/CreatedOfT.cs b/src/Http/Http.Results/src/CreatedOfT.cs index d89ba7fb4ea1..beda8bd77995 100644 --- a/src/Http/Http.Results/src/CreatedOfT.cs +++ b/src/Http/Http.Results/src/CreatedOfT.cs @@ -99,6 +99,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status201Created, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/FileContentHttpResult.cs b/src/Http/Http.Results/src/FileContentHttpResult.cs index b8496be0752d..f60e4d7d0b3f 100644 --- a/src/Http/Http.Results/src/FileContentHttpResult.cs +++ b/src/Http/Http.Results/src/FileContentHttpResult.cs @@ -61,7 +61,7 @@ internal FileContentHttpResult( { FileContents = fileContents; FileLength = fileContents.Length; - ContentType = contentType ?? "application/octet-stream"; + ContentType = contentType ?? HttpResultsHelper.BinaryContentType; FileDownloadName = fileDownloadName; EnableRangeProcessing = enableRangeProcessing; LastModified = lastModified; diff --git a/src/Http/Http.Results/src/FileStreamHttpResult.cs b/src/Http/Http.Results/src/FileStreamHttpResult.cs index 12266995a453..e5ca5d76c918 100644 --- a/src/Http/Http.Results/src/FileStreamHttpResult.cs +++ b/src/Http/Http.Results/src/FileStreamHttpResult.cs @@ -67,7 +67,7 @@ internal FileStreamHttpResult( FileLength = fileStream.Length; } - ContentType = contentType ?? "application/octet-stream"; + ContentType = contentType ?? HttpResultsHelper.BinaryContentType; FileDownloadName = fileDownloadName; EnableRangeProcessing = enableRangeProcessing; LastModified = lastModified; diff --git a/src/Http/Http.Results/src/HttpResultsHelper.cs b/src/Http/Http.Results/src/HttpResultsHelper.cs index 1bf697ea55a5..a7a9de11661e 100644 --- a/src/Http/Http.Results/src/HttpResultsHelper.cs +++ b/src/Http/Http.Results/src/HttpResultsHelper.cs @@ -17,7 +17,13 @@ namespace Microsoft.AspNetCore.Http; internal static partial class HttpResultsHelper { + internal const string BinaryContentType = "application/octet-stream"; internal const string DefaultContentType = "text/plain; charset=utf-8"; + internal const string ProblemDetailsContentType = "application/problem+json"; + + internal static IEnumerable ApplicationJsonContentTypes { get; } = ["application/json"]; + internal static IEnumerable ProblemDetailsContentTypes { get; } = [ProblemDetailsContentType]; + private static readonly Encoding DefaultEncoding = Encoding.UTF8; [UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode", diff --git a/src/Http/Http.Results/src/InternalServerErrorOfT.cs b/src/Http/Http.Results/src/InternalServerErrorOfT.cs index 5776accbf75e..85493f1957df 100644 --- a/src/Http/Http.Results/src/InternalServerErrorOfT.cs +++ b/src/Http/Http.Results/src/InternalServerErrorOfT.cs @@ -65,6 +65,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status500InternalServerError, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status500InternalServerError, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/NotFoundOfT.cs b/src/Http/Http.Results/src/NotFoundOfT.cs index 87bc178baa91..c803b2067530 100644 --- a/src/Http/Http.Results/src/NotFoundOfT.cs +++ b/src/Http/Http.Results/src/NotFoundOfT.cs @@ -64,6 +64,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status404NotFound, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status404NotFound, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/OkOfT.cs b/src/Http/Http.Results/src/OkOfT.cs index e85dc889ab4d..ba5efa0c2319 100644 --- a/src/Http/Http.Results/src/OkOfT.cs +++ b/src/Http/Http.Results/src/OkOfT.cs @@ -64,6 +64,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status200OK, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/PhysicalFileHttpResult.cs b/src/Http/Http.Results/src/PhysicalFileHttpResult.cs index 7b44bd6c1bc3..aa8cadf5e71f 100644 --- a/src/Http/Http.Results/src/PhysicalFileHttpResult.cs +++ b/src/Http/Http.Results/src/PhysicalFileHttpResult.cs @@ -58,7 +58,7 @@ internal PhysicalFileHttpResult( EntityTagHeaderValue? entityTag = null) { FileName = fileName; - ContentType = contentType ?? "application/octet-stream"; + ContentType = contentType ?? HttpResultsHelper.BinaryContentType; FileDownloadName = fileDownloadName; EnableRangeProcessing = enableRangeProcessing; LastModified = lastModified; diff --git a/src/Http/Http.Results/src/ProblemHttpResult.cs b/src/Http/Http.Results/src/ProblemHttpResult.cs index 4cea9e33ff43..9eec49a20642 100644 --- a/src/Http/Http.Results/src/ProblemHttpResult.cs +++ b/src/Http/Http.Results/src/ProblemHttpResult.cs @@ -36,7 +36,7 @@ internal ProblemHttpResult(ProblemDetails problemDetails) /// /// Gets the value for the Content-Type header: application/problem+json /// - public string ContentType => "application/problem+json"; + public string ContentType => HttpResultsHelper.ProblemDetailsContentType; /// /// Gets the HTTP status code. diff --git a/src/Http/Http.Results/src/UnprocessableEntityOfT.cs b/src/Http/Http.Results/src/UnprocessableEntityOfT.cs index 3193ab69d674..764ed15514ac 100644 --- a/src/Http/Http.Results/src/UnprocessableEntityOfT.cs +++ b/src/Http/Http.Results/src/UnprocessableEntityOfT.cs @@ -65,6 +65,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status422UnprocessableEntity, typeof(TValue), new[] { "application/json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status422UnprocessableEntity, HttpResultsHelper.ApplicationJsonContentTypes)); } } diff --git a/src/Http/Http.Results/src/ValidationProblem.cs b/src/Http/Http.Results/src/ValidationProblem.cs index eaecf6bb72ac..653ac7bfe1c3 100644 --- a/src/Http/Http.Results/src/ValidationProblem.cs +++ b/src/Http/Http.Results/src/ValidationProblem.cs @@ -39,7 +39,7 @@ internal ValidationProblem(HttpValidationProblemDetails problemDetails) /// /// Gets the value for the Content-Type header: application/problem+json. /// - public string ContentType => "application/problem+json"; + public string ContentType => HttpResultsHelper.ProblemDetailsContentType; /// /// Gets the HTTP status code: @@ -76,6 +76,6 @@ static void IEndpointMetadataProvider.PopulateMetadata(MethodInfo method, Endpoi ArgumentNullException.ThrowIfNull(method); ArgumentNullException.ThrowIfNull(builder); - builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(HttpValidationProblemDetails), new[] { "application/problem+json" })); + builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(HttpValidationProblemDetails), StatusCodes.Status400BadRequest, HttpResultsHelper.ProblemDetailsContentTypes)); } } diff --git a/src/Http/Http.Results/src/VirtualFileHttpResult.cs b/src/Http/Http.Results/src/VirtualFileHttpResult.cs index e3107f4b7929..10e677e1247f 100644 --- a/src/Http/Http.Results/src/VirtualFileHttpResult.cs +++ b/src/Http/Http.Results/src/VirtualFileHttpResult.cs @@ -63,7 +63,7 @@ internal VirtualFileHttpResult( EntityTagHeaderValue? entityTag = null) { FileName = fileName; - ContentType = contentType ?? "application/octet-stream"; + ContentType = contentType ?? HttpResultsHelper.BinaryContentType; FileDownloadName = fileDownloadName; EnableRangeProcessing = enableRangeProcessing; LastModified = lastModified; From 6a2ad656a8d670500643209b8ba4ad984b95cb7f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 01:49:04 +0000 Subject: [PATCH 173/257] [main] Update dependencies from dotnet/efcore, dotnet/runtime (#56684) [main] Update dependencies from dotnet/efcore, dotnet/runtime - Update Mvc.FunctionalTests and ResponseCompressionTests - Fix IIS compression tests - Fix PassesThroughCompressionInProcess test --- eng/Version.Details.xml | 320 +++++++++--------- eng/Versions.props | 160 ++++----- .../test/ResponseCompressionMiddlewareTest.cs | 28 +- .../TestingInfrastructureInheritanceTests.cs | 16 +- .../RequestResponseTests.cs | 4 +- 5 files changed, 267 insertions(+), 261 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8ac5f2616812..7970da242f7b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,325 +9,325 @@ --> - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/efcore - 5f0887dc5d7af6d728d71875c071e5468e094acc + 61b90d6f9d30e207cae6699e14cc92beb7370979 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - 4e278fe17f69ea31fbdcbab74ac47ec6fa84914b + b885a58062434707e7584d29910af429a1ee0107 https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index f84c2d26f491..c690a3e872bb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,92 +67,92 @@ --> - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 - 9.0.0-preview.7.24357.2 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.1 9.0.0-preview.7.24360.1 9.0.0-preview.7.24360.1 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 - 9.0.0-preview.7.24358.3 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 4.11.0-1.24218.5 4.11.0-1.24218.5 diff --git a/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs b/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs index 85d8fdc08b7a..f79098e83c3d 100644 --- a/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs +++ b/src/Middleware/ResponseCompression/test/ResponseCompressionMiddlewareTest.cs @@ -32,7 +32,7 @@ private static IEnumerable TestData { get { - yield return new EncodingTestData("gzip", expectedBodyLength: 30); + yield return new EncodingTestData("gzip", expectedBodyLength: 29); yield return new EncodingTestData("br", expectedBodyLength: 21); } } @@ -59,7 +59,7 @@ public async Task Request_AcceptGzipDeflate_CompressedGzip() { var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip", "deflate" }, responseType: TextPlain); - CheckResponseCompressed(response, expectedBodyLength: 30, expectedEncoding: "gzip"); + CheckResponseCompressed(response, expectedBodyLength: 29, expectedEncoding: "gzip"); AssertCompressedWithLog(logMessages, "gzip"); } @@ -96,7 +96,7 @@ void Configure(ResponseCompressionOptions options) var (response, logMessages) = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain, configure: Configure); - CheckResponseCompressed(response, expectedBodyLength: 30, expectedEncoding: "gzip"); + CheckResponseCompressed(response, expectedBodyLength: 29, expectedEncoding: "gzip"); AssertCompressedWithLog(logMessages, "gzip"); } @@ -140,7 +140,7 @@ public async Task ContentType_WithCharset_Compress(string contentType) { var (response, logMessages) = await InvokeMiddleware(uncompressedBodyLength: 100, requestAcceptEncodings: new[] { "gzip" }, contentType); - CheckResponseCompressed(response, expectedBodyLength: 30, expectedEncoding: "gzip"); + CheckResponseCompressed(response, expectedBodyLength: 29, expectedEncoding: "gzip"); AssertCompressedWithLog(logMessages, "gzip"); } @@ -272,7 +272,7 @@ bool compress if (compress) { - CheckResponseCompressed(response, expectedBodyLength: 30, expectedEncoding: "gzip"); + CheckResponseCompressed(response, expectedBodyLength: 29, expectedEncoding: "gzip"); AssertCompressedWithLog(logMessages, "gzip"); } else @@ -293,7 +293,7 @@ public async Task NoIncludedMimeTypes_UseDefaults() options.ExcludedMimeTypes = new[] { "text/*" }; }); - CheckResponseCompressed(response, expectedBodyLength: 30, expectedEncoding: "gzip"); + CheckResponseCompressed(response, expectedBodyLength: 29, expectedEncoding: "gzip"); AssertCompressedWithLog(logMessages, "gzip"); } @@ -362,9 +362,9 @@ public async Task Request_AcceptIdentity_NotCompressed() } [Theory] - [InlineData(new[] { "identity;q=0.5", "gzip;q=1" }, 30)] - [InlineData(new[] { "identity;q=0", "gzip;q=0.8" }, 30)] - [InlineData(new[] { "identity;q=0.5", "gzip" }, 30)] + [InlineData(new[] { "identity;q=0.5", "gzip;q=1" }, 29)] + [InlineData(new[] { "identity;q=0", "gzip;q=0.8" }, 29)] + [InlineData(new[] { "identity;q=0.5", "gzip" }, 29)] public async Task Request_AcceptWithHigherCompressionQuality_Compressed(string[] acceptEncodings, int expectedBodyLength) { var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); @@ -431,7 +431,7 @@ public async Task Response_WithContentEncodingAlreadySet_NotReCompressed() [Theory] [InlineData(false, 100)] - [InlineData(true, 30)] + [InlineData(true, 29)] public async Task Request_Https_CompressedIfEnabled(bool enableHttps, int expectedLength) { var sink = new TestSink( @@ -492,7 +492,7 @@ public async Task Request_Https_CompressedIfEnabled(bool enableHttps, int expect [Theory] [InlineData(HttpsCompressionMode.Default, 100)] [InlineData(HttpsCompressionMode.DoNotCompress, 100)] - [InlineData(HttpsCompressionMode.Compress, 30)] + [InlineData(HttpsCompressionMode.Compress, 29)] public async Task Request_Https_CompressedIfOptIn(HttpsCompressionMode mode, int expectedLength) { var sink = new TestSink( @@ -553,8 +553,8 @@ public async Task Request_Https_CompressedIfOptIn(HttpsCompressionMode mode, int } [Theory] - [InlineData(HttpsCompressionMode.Default, 30)] - [InlineData(HttpsCompressionMode.Compress, 30)] + [InlineData(HttpsCompressionMode.Default, 29)] + [InlineData(HttpsCompressionMode.Compress, 29)] [InlineData(HttpsCompressionMode.DoNotCompress, 100)] public async Task Request_Https_NotCompressedIfOptOut(HttpsCompressionMode mode, int expectedLength) { @@ -1114,7 +1114,7 @@ public async Task SendFileAsync_FirstWrite_CompressesAndFlushes() var response = await client.SendAsync(request); - CheckResponseCompressed(response, expectedBodyLength: 34, expectedEncoding: "gzip"); + CheckResponseCompressed(response, expectedBodyLength: 35, expectedEncoding: "gzip"); Assert.False(fakeSendFile.SendFileInvoked); } diff --git a/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureInheritanceTests.cs b/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureInheritanceTests.cs index 0d080a0de26f..9f4162734292 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureInheritanceTests.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureInheritanceTests.cs @@ -83,10 +83,11 @@ public async Task TestingInfrastructure_GenericHost_HostDisposeAsync() { // Arrange using var factory = new CustomizedFactory().WithWebHostBuilder(ConfigureWebHostBuilder); - var sink = factory.Services.GetRequiredService(); + using var scope = factory.Services.CreateAsyncScope(); + var sink = scope.ServiceProvider.GetRequiredService(); // Act - await factory.DisposeAsync(); + await scope.DisposeAsync(); // Assert Assert.True(sink._asyncDisposed); @@ -97,10 +98,11 @@ public void TestingInfrastructure_GenericHost_HostDispose() { // Arrange using var factory = new CustomizedFactory().WithWebHostBuilder(ConfigureWebHostBuilder); - var sink = factory.Services.GetRequiredService(); + using var scope = factory.Services.CreateScope(); + var sink = scope.ServiceProvider.GetRequiredService(); // Act - factory.Dispose(); + scope.Dispose(); // Assert Assert.True(sink._asyncDisposed); @@ -110,7 +112,7 @@ private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => builder.UseStartup() .ConfigureServices(s => s.AddScoped()); - private class DisposableService : IAsyncDisposable + private class DisposableService : IAsyncDisposable, IDisposable { public bool _asyncDisposed = false; public ValueTask DisposeAsync() @@ -118,6 +120,10 @@ public ValueTask DisposeAsync() _asyncDisposed = true; return ValueTask.CompletedTask; } + public void Dispose() + { + _asyncDisposed = true; + } } private class CustomizedFactory : WebApplicationFactory where TEntryPoint : class diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs index 0cde855b58bc..c701dd6bea25 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestResponseTests.cs @@ -133,7 +133,7 @@ public async Task PassesThroughCompressionOutOfProcess() Assert.Equal( new byte[] { 0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x0A, 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00, + 0x04, 0x0A, 0x63, 0xA0, 0x03, 0x00, 0x00, 0xCA, 0xC6, 0x88, 0x99, 0x64, 0x00, 0x00, 0x00 }, await response.Content.ReadAsByteArrayAsync()); } @@ -151,7 +151,7 @@ public async Task PassesThroughCompressionInProcess() Assert.Equal( new byte[] { 0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x0A, 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00, + 0x04, 0x0A, 0x63, 0xA0, 0x03, 0x00, 0x00, 0xCA, 0xC6, 0x88, 0x99, 0x64, 0x00, 0x00, 0x00 }, await response.Content.ReadAsByteArrayAsync()); } From 2d8a0742d8f70d627ae68b798939abba95caabdf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:50:58 +0000 Subject: [PATCH 174/257] Update dependencies from https://github.com/dotnet/efcore build 20240716.1 (#56818) dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools From Version 9.0.0-preview.7.24365.2 -> To Version 9.0.0-preview.7.24366.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7970da242f7b..5f1d0f069aff 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,38 +9,38 @@ --> - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/efcore - 61b90d6f9d30e207cae6699e14cc92beb7370979 + 66fc2aa66ae1167cc4bccc748a5c128278d8c869 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index c690a3e872bb..6007b5e7d90f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -145,14 +145,14 @@ 9.0.0-preview.7.24360.1 9.0.0-preview.7.24360.1 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 + 9.0.0-preview.7.24366.2 4.11.0-1.24218.5 4.11.0-1.24218.5 From a5c1b26637da10366a88589942bea14196ba7411 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:53:26 +0000 Subject: [PATCH 175/257] Update dependencies from https://github.com/dotnet/runtime build 20240715.2 (#56825) Microsoft.Bcl.AsyncInterfaces , Microsoft.Bcl.TimeProvider , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.Diagnostics , Microsoft.Extensions.Diagnostics.Abstractions , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Hosting , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Http , Microsoft.Extensions.Logging , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Options , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Primitives , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.Platforms , System.Collections.Immutable , System.Composition , System.Configuration.ConfigurationManager , System.Diagnostics.DiagnosticSource , System.Diagnostics.EventLog , System.Diagnostics.PerformanceCounter , System.DirectoryServices.Protocols , System.IO.Hashing , System.IO.Pipelines , System.Net.Http.Json , System.Net.Http.WinHttpHandler , System.Net.ServerSentEvents , System.Reflection.Metadata , System.Resources.Extensions , System.Runtime.Caching , System.Security.Cryptography.Pkcs , System.Security.Cryptography.Xml , System.Security.Permissions , System.ServiceProcess.ServiceController , System.Text.Encodings.Web , System.Text.Json , System.Threading.AccessControl , System.Threading.Channels , System.Threading.RateLimiting , Microsoft.SourceBuild.Intermediate.runtime.linux-x64 From Version 9.0.0-preview.7.24365.1 -> To Version 9.0.0-preview.7.24365.2 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 288 ++++++++++++++++++++-------------------- eng/Versions.props | 144 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5f1d0f069aff..e10aedff1f88 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,292 +42,292 @@ https://github.com/dotnet/efcore 66fc2aa66ae1167cc4bccc748a5c128278d8c869 - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b https://github.com/dotnet/xdt @@ -367,9 +367,9 @@ afa1eb6821f62183651ab017b2f5c3fbeb934904 - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b @@ -380,9 +380,9 @@ - + https://github.com/dotnet/runtime - b885a58062434707e7584d29910af429a1ee0107 + e1ab2243b27da4aa8a76372e4384bcd2b5894b3b https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index 6007b5e7d90f..a1ae1b903b34 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -67,80 +67,80 @@ --> - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 - 9.0.0-preview.7.24365.1 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 + 9.0.0-preview.7.24365.2 9.0.0-preview.7.24360.1 9.0.0-preview.7.24360.1 From 44ab8a64ecd5ac5d6cb6183ef6080ad5517d0b0f Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Tue, 16 Jul 2024 18:05:23 +0200 Subject: [PATCH 176/257] [Infrastructure] Updated npm package cache 2024-07-15 (#56802) * Clear npm cache on each update * Set Node-Externals to main to avoid merge conflicts * Add a warning about merging Node-Externals PR before the main PR can get merged * Updated npm package cache 2024-07-15 --- eng/scripts/update-npm-dependencies.ps1 | 11 +- package-lock.json | 3232 ++++++++++++++++++----- src/submodules/Node-Externals | 2 +- 3 files changed, 2512 insertions(+), 733 deletions(-) diff --git a/eng/scripts/update-npm-dependencies.ps1 b/eng/scripts/update-npm-dependencies.ps1 index 47a04484366a..8b41b9f63994 100644 --- a/eng/scripts/update-npm-dependencies.ps1 +++ b/eng/scripts/update-npm-dependencies.ps1 @@ -3,7 +3,8 @@ param ( [switch]$WhatIf, - [switch]$SkipPullRequestCreation + [switch]$SkipPullRequestCreation, + [switch]$SkipClearCache ) $ErrorActionPreference = "Stop" @@ -20,6 +21,12 @@ if (-not $WhatIf) { Remove-Item .\package-lock.json } +if (-not $SkipClearCache -and -not $WhatIf) { + Write-Host "Clearing the npm cache" + Remove-Item -Recurse -Force "$PWD/src/submodules/Node-Externals/cache" + New-Item -ItemType Directory -Path "$PWD/src/submodules/Node-Externals/cache" +} + try { Get-Command vsts-npm-auth -CommandType ExternalScript Write-Host "vsts-npm-auth is already installed" @@ -97,7 +104,7 @@ else { git branch --set-upstream-to=origin/main git push origin $branchName`:$branchName --force; gh repo set-default dotnet/Node-Externals - gh pr create --base main --head "infrastructure/update-npm-package-cache-$(Get-Date -Format 'yyyy-MM-dd')" --title "[Infrastructure] Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" --body "" + gh pr create --base main --head "infrastructure/update-npm-package-cache-$(Get-Date -Format 'yyyy-MM-dd')" --title "[Infrastructure] Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" --body "Do not merge this PR until the one in aspnetcore passes all checks." } ## Navigate to the root of the repository diff --git a/package-lock.json b/package-lock.json index a27e12d08bd6..01c597224000 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,6 +43,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha1-7UQbb6YAByUgzhi0PSyMyMrsx/Q=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -55,6 +56,7 @@ "version": "2.39.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@azure/msal-browser/-/msal-browser-2.39.0.tgz", "integrity": "sha1-aE/Tl0wmKLLf/QSkyEFqCUW0K2k=", + "license": "MIT", "dependencies": { "@azure/msal-common": "13.3.3" }, @@ -66,6 +68,7 @@ "version": "13.3.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@azure/msal-common/-/msal-common-13.3.3.tgz", "integrity": "sha1-tJY8nloWTtiQsgS+ywNjA8z09qw=", + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -75,6 +78,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/code-frame/-/code-frame-7.24.7.tgz", "integrity": "sha1-iC/Z4J6O4yTklr0EBAHG8EbvRGU=", "dev": true, + "license": "MIT", "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" @@ -84,30 +88,32 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha1-0ju+pQjDiDuoJR+0FkmCw26ld+0=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/compat-data/-/compat-data-7.24.8.tgz", + "integrity": "sha1-+RlkVTNMONBZrIsaFqUd7NqdMNM=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha1-tnZFAUHgtSo9Q7yR2oaqYI+VCsQ=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/core/-/core-7.24.8.tgz", + "integrity": "sha1-wk+DmFIU9ZnO5fwm05PZqzIDQvQ=", "dev": true, + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", + "@babel/generator": "^7.24.8", + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-module-transforms": "^7.24.8", + "@babel/helpers": "^7.24.8", + "@babel/parser": "^7.24.8", "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -127,6 +133,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -143,15 +150,17 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha1-FlTQHeIK1mtLTZnBNUcbxlTFXm0=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/generator/-/generator-7.24.8.tgz", + "integrity": "sha1-GALWrE13qRmcda4+tqCDNuXR05o=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.24.8", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -165,6 +174,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", "integrity": "sha1-U3PHvINmsSoDO0vhrBOiBsZlaqs=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.24.7" }, @@ -177,6 +187,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", "integrity": "sha1-N9Zv6wEgJPJCK3Yrmyp8/ifH+6M=", "dev": true, + "license": "MIT", "dependencies": { "@babel/traverse": "^7.24.7", "@babel/types": "^7.24.7" @@ -186,14 +197,15 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha1-TrbEqA1v/qwlq4zZohtd+kjVA6k=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", + "integrity": "sha1-tgfDFhzZ0XRJd9T5cTlXL+d4wnE=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.24.8", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -202,15 +214,16 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz", - "integrity": "sha1-Lq7TazocEcU734DVODiyk8UvWzs=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.8.tgz", + "integrity": "sha1-R/VGQI0TwgDAhn+dk1GE6qCFGwk=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-function-name": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.8", "@babel/helper-optimise-call-expression": "^7.24.7", "@babel/helper-replace-supers": "^7.24.7", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", @@ -229,6 +242,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz", "integrity": "sha1-vk9DWoDcKwU8du60t9Ft0iz8ido=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "regexpu-core": "^5.3.1", @@ -246,6 +260,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", "integrity": "sha1-GFlPeJw1lKyyTP20p/e30ui9kS0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", "@babel/helper-plugin-utils": "^7.22.5", @@ -262,6 +277,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -278,13 +294,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/helper-environment-visitor": { "version": "7.24.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", "integrity": "sha1-SzG6lVHR+QeBuoNJHdWc+bJp99k=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.24.7" }, @@ -297,6 +315,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", "integrity": "sha1-dfHhcldC85rGWE7gsW2UUT2jjdI=", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.24.7", "@babel/types": "^7.24.7" @@ -310,6 +329,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", "integrity": "sha1-tO3hzeL9iUNjl/MNyTdu4GsPJe4=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.24.7" }, @@ -318,13 +338,14 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz", - "integrity": "sha1-Z2E9BoYVpw5O1RAQma/8ekHFIl8=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", + "integrity": "sha1-YVXgeckTNX0kpMIEgNt8cSpcP7Y=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -335,6 +356,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", "integrity": "sha1-8vmAOS3luEwzKPxx04vYG7uDBCs=", "dev": true, + "license": "MIT", "dependencies": { "@babel/traverse": "^7.24.7", "@babel/types": "^7.24.7" @@ -344,10 +366,11 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha1-MbbJopMGeUmNtltoWxaYv9bH2vg=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-module-transforms/-/helper-module-transforms-7.24.8.tgz", + "integrity": "sha1-sfLfT5bzRlsNA1tpfshstR/zSP4=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", @@ -367,6 +390,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", "integrity": "sha1-iwoEVskvazI9J8/QDR1mTnZpKg8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.24.7" }, @@ -375,10 +399,11 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", - "integrity": "sha1-mMhP5v49DTrnv8Ol4WakaET+sqA=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha1-lO5n6OwOXUTqe661Hlcb0mrweHg=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -388,6 +413,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz", "integrity": "sha1-s/DyA2KFInE4SdSUA/GkFEaL5Mc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "@babel/helper-environment-visitor": "^7.24.7", @@ -405,6 +431,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz", "integrity": "sha1-+TO37tgaHAJldA7ckUkc5RJQ92U=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-member-expression-to-functions": "^7.24.7", @@ -422,6 +449,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", "integrity": "sha1-vK3o2jrsjtFrnElTt05Qa1G17bM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/traverse": "^7.24.7", "@babel/types": "^7.24.7" @@ -435,6 +463,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", "integrity": "sha1-X4+oO2ntXCetxWBE+L4rPqlmadk=", "dev": true, + "license": "MIT", "dependencies": { "@babel/traverse": "^7.24.7", "@babel/types": "^7.24.7" @@ -448,6 +477,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", "integrity": "sha1-g5SUNokOB/o9aHPGGpbju/aS2FY=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.24.7" }, @@ -456,10 +486,11 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha1-TS0PFIIO3juYB+pfw238jNfaB/I=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha1-WzMpyaWIA9XfQl5XhYZYgagcpI0=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -469,15 +500,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", "integrity": "sha1-dbiJz6+eNcKq9Czw1yyOkXGSUds=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha1-JMO7d8ekJdF0LuyPtDO1obOOYvY=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha1-NyXN7qi0gOhtNN8VMEgGoGl14z0=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -487,6 +520,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz", "integrity": "sha1-UtiTr35C7cp8bSxnZFSYJjNqrh8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-function-name": "^7.24.7", "@babel/template": "^7.24.7", @@ -498,13 +532,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha1-qizNop9iGFrLXUL7SjobEIIQdBY=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/helpers/-/helpers-7.24.8.tgz", + "integrity": "sha1-KCDWTV1mhsyoeJ3RWwdM2GJ5WHM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -515,6 +550,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/highlight/-/highlight-7.24.7.tgz", "integrity": "sha1-oFqx3xNLKGVYquDtQebF9zG/QJ0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", @@ -526,10 +562,11 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha1-mlIm+S8MXI6tVQt1D1YI52bIzoU=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/parser/-/parser-7.24.8.tgz", + "integrity": "sha1-WKTbvK1+sdSJMFJKP9k9k+kITG8=", "dev": true, + "license": "MIT", "bin": { "parser": "bin/babel-parser.js" }, @@ -542,6 +579,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz", "integrity": "sha1-/QWf0nsYTqK0x+ZGhoqaOBu8MFU=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -558,6 +596,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz", "integrity": "sha1-RoCWykS7y+j8xXBXThLrGVDhgQc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -573,6 +612,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", "integrity": "sha1-5Oq91RCazDmbONeZmy72b8ICL4k=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", @@ -590,6 +630,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz", "integrity": "sha1-cbIbsChtWBDmOhU4qpAcWOhzdew=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -606,6 +647,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha1-eET5KJVG76n+usLeTP41igUL1wM=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" }, @@ -618,6 +660,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha1-qYP7Gusuw/btBCohD2QOkOeG/g0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -630,6 +673,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", "integrity": "sha1-TJpvZp9dDN8bkKFnHpoUa+UwDOo=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -642,6 +686,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha1-tcmHJ0xKOoK4lxR5aTGmtTVErhA=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -654,6 +699,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", "integrity": "sha1-GV34mxRrS3izv4l/16JXyEZZ1AY=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -669,6 +715,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -681,6 +728,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha1-AolkqbqA28CUyRXEh618TnpmRlo=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.3" }, @@ -693,6 +741,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", "integrity": "sha1-KgtAa1hxogqEEkBYaxMAziCIp3g=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -708,6 +757,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", "integrity": "sha1-tPnqlaeeaRJIDEtiZzn4agdmJMo=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -723,6 +773,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", "integrity": "sha1-7mATSMNw+jNNIge+FYd3SWUh/VE=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -735,6 +786,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -747,6 +799,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", "integrity": "sha1-OaH6Sn49PX804qzGvlhbcY0w4C0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -762,6 +815,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha1-ypHvRjA1MESLkGZSusLp/plB9pk=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -774,6 +828,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha1-Fn7XA2iIYIH3S1w2xlqIwDtm0ak=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -786,6 +841,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha1-ubBws+M1cM2f0Hun+pHA3Te5r5c=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -798,6 +854,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -810,6 +867,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha1-YRGiZbz7Ag6579D9/X0mQCue1sE=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -822,6 +880,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha1-T2nCq5UWfgGAzVM2YT+MV4j31Io=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -834,6 +893,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha1-DcZnHsDqIrbpShEU+FeXDNOd4a0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -849,6 +909,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha1-wc/a3DWmRiQAAfBhOCR7dBw02Uw=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -864,6 +925,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", "integrity": "sha1-WNRYJxtNO2uyfuaslSWsuyWbrRw=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -879,6 +941,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", "integrity": "sha1-1Jo7PmtS5b5nQAIjF1gCNKakc1c=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" @@ -895,6 +958,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", "integrity": "sha1-T2iGwR5CO9afPOUdv0JCSl8nVRQ=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -910,6 +974,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz", "integrity": "sha1-czClxQ4FGBylI1G4/QFkIADJbP0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7", @@ -928,6 +993,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", "integrity": "sha1-cqOvbEUdV1hCp+m1oChjQUNVvcw=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7", @@ -945,6 +1011,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", "integrity": "sha1-pCUdmOoMDzmdr+GjWAHqukVbvx8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -960,6 +1027,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz", "integrity": "sha1-QgY+TeuFDHvXxV5ia/Tnq0jmzgI=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -975,6 +1043,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", "integrity": "sha1-JWh5RntXsLaMfd/Ft2WE85jNaDQ=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -991,6 +1060,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", "integrity": "sha1-yCAn67cBC8M8EW1LUET7v4wFSE0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7", @@ -1004,16 +1074,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz", - "integrity": "sha1-SubvQ6EkkhNBOMHkWRP3xGxBtL8=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.8.tgz", + "integrity": "sha1-rSMwH+W8FTykz3+1cqm8iwtxHPc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.8", "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-function-name": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-replace-supers": "^7.24.7", "@babel/helper-split-export-declaration": "^7.24.7", "globals": "^11.1.0" @@ -1030,6 +1101,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", "integrity": "sha1-TKsyFOgLxx+uOFMjjRPQl7AExwc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/template": "^7.24.7" @@ -1042,12 +1114,13 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz", - "integrity": "sha1-oJfyUpLe+25swW1jM6TPwePHLZ4=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz", + "integrity": "sha1-yCjoFNvkKicYqDjCouFqQI4FVVA=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1061,6 +1134,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", "integrity": "sha1-X4v4poDyEWpyB+FiiKX5dK1Hp6A=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1077,6 +1151,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", "integrity": "sha1-3SAQKJfJojJOWt//tn/zYQNZqO4=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1092,6 +1167,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", "integrity": "sha1-TYuV47risDdnMJGqCc0z/s1kGfQ=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3" @@ -1108,6 +1184,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", "integrity": "sha1-tinuImRfQSAkKX1SRbzkJcMfmw0=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1124,6 +1201,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", "integrity": "sha1-F21S2NjtUWrq5wE+6VVtVAxT8Zc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" @@ -1140,6 +1218,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", "integrity": "sha1-8lsz9y3x2L52OZ4bjz+dNm61vHA=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" @@ -1156,6 +1235,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz", "integrity": "sha1-bYYB+//mZciURAq0RwvHId2RMdY=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.24.7", "@babel/helper-function-name": "^7.24.7", @@ -1173,6 +1253,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", "integrity": "sha1-8+nDfAo3P+6G42iA1Fs2ZM7a9zo=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-json-strings": "^7.8.3" @@ -1189,6 +1270,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz", "integrity": "sha1-NrUFweZVFRqddgd5mpmI/FRn0Gw=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1204,6 +1286,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", "integrity": "sha1-pY+27aFsncj5/xx7G6bet/RpTLA=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" @@ -1220,6 +1303,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", "integrity": "sha1-O0RU+w4wLhi6SUW6MkassSSDFd8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1235,6 +1319,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", "integrity": "sha1-ZQkO1JPEqDSXajyhzed25sz/Mtc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1247,13 +1332,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz", - "integrity": "sha1-n9X3/a3ukIWIaxg/GtE9GrJg9Ks=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", + "integrity": "sha1-q2Qh5WS3F8tHXW//cK5/EDU26jw=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-simple-access": "^7.24.7" }, "engines": { @@ -1268,6 +1354,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz", "integrity": "sha1-+AEjFsUJj26N7m7NWOK8bwA9DOc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-hoist-variables": "^7.24.7", "@babel/helper-module-transforms": "^7.24.7", @@ -1286,6 +1373,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", "integrity": "sha1-7dn0PsVJCZYg333yTnuhO1x278g=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1302,6 +1390,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", "integrity": "sha1-kELpuFa8azaIwMLkBg6eELFGCSM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1318,6 +1407,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", "integrity": "sha1-Mf9UxOBVXMVJ1YFuSrOSQd+2qwA=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1333,6 +1423,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", "integrity": "sha1-HeRTTFkK+VlvU9Z/UqkvEtuYQSA=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" @@ -1349,6 +1440,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", "integrity": "sha1-vqYrU4yAYF2KD6ybQPSOl++n3mM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-numeric-separator": "^7.10.4" @@ -1365,6 +1457,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", "integrity": "sha1-0Tork0Na64oZfhFSIcqyZrpuVdY=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7", @@ -1383,6 +1476,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", "integrity": "sha1-Zu6v94MLupRd2JibYypAwE7WJb4=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/helper-replace-supers": "^7.24.7" @@ -1399,6 +1493,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", "integrity": "sha1-AOq9iD0N1qYMHFV1SHhZGbbnF7Q=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" @@ -1411,12 +1506,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz", - "integrity": "sha1-uPaEioDPLamKiiBEKb7AR1bG1FQ=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz", + "integrity": "sha1-uwKme2D/BAYIXBPRBMmag1zfNl0=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, @@ -1432,6 +1528,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", "integrity": "sha1-WIHwriEBhADjIPx+uBflKdElS2g=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1447,6 +1544,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", "integrity": "sha1-5jGHRrKucKWdAj1cwTRKK6enX14=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1463,6 +1561,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", "integrity": "sha1-TuxrxwEojB+rX3LmpLvJ1n+soGE=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "@babel/helper-create-class-features-plugin": "^7.24.7", @@ -1481,6 +1580,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", "integrity": "sha1-8NLtg4DfvtlJxC1NeQJmUl1ju9w=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1496,6 +1596,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", "integrity": "sha1-AhVi3kU02LSxhRdZ/Xr04F0sR/g=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "regenerator-transform": "^0.15.2" @@ -1512,6 +1613,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", "integrity": "sha1-gAN/5PvwMfwRJQIheP85OLs3Q6Q=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1527,6 +1629,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", "integrity": "sha1-hUSMa5luEi+p4ol0YUCqqZ2mTnM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1542,6 +1645,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", "integrity": "sha1-6KOMD954guD7jxYDePdL2IXMe7M=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" @@ -1558,6 +1662,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", "integrity": "sha1-lq6A16flJR9le1zxjx6mv5JvX+s=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1573,6 +1678,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", "integrity": "sha1-oF3rtKkHKuj5hbz3fz8hVDTI+Mg=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1584,12 +1690,13 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz", - "integrity": "sha1-8HS+RmWA1H1uaydHOoQMn5ygj7A=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz", + "integrity": "sha1-OD2rN/sHP1v+bmDGVMqsMJ+Suhw=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1599,14 +1706,15 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz", - "integrity": "sha1-sAaz4AlL8IE9UF4MVIVnnur0qIE=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.8.tgz", + "integrity": "sha1-wQTWKG4Ev35EuMuhtobUG61X64Q=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", "@babel/plugin-syntax-typescript": "^7.24.7" }, "engines": { @@ -1621,6 +1729,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", "integrity": "sha1-ICOoLO0ftJcWMKLgeXZFAsQUjg4=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1636,6 +1745,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", "integrity": "sha1-kHOkzRO4bqccMmRllZCsCGYFu80=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1652,6 +1762,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", "integrity": "sha1-38PUpREnEICZsZgXwJY75qKt8Z8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1668,6 +1779,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", "integrity": "sha1-1AcF1nUjgDpXbinGPO9uUWuFjtk=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.7" @@ -1680,15 +1792,16 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-env/-/preset-env-7.24.7.tgz", - "integrity": "sha1-/wZ7TjC6SnLyJfEvEjFz53uYfzc=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-env/-/preset-env-7.24.8.tgz", + "integrity": "sha1-4NuU1/F9bw4lZOjSkZC8jNrOwtE=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", + "@babel/compat-data": "^7.24.8", + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-validator-option": "^7.24.8", "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", @@ -1719,9 +1832,9 @@ "@babel/plugin-transform-block-scoping": "^7.24.7", "@babel/plugin-transform-class-properties": "^7.24.7", "@babel/plugin-transform-class-static-block": "^7.24.7", - "@babel/plugin-transform-classes": "^7.24.7", + "@babel/plugin-transform-classes": "^7.24.8", "@babel/plugin-transform-computed-properties": "^7.24.7", - "@babel/plugin-transform-destructuring": "^7.24.7", + "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-dotall-regex": "^7.24.7", "@babel/plugin-transform-duplicate-keys": "^7.24.7", "@babel/plugin-transform-dynamic-import": "^7.24.7", @@ -1734,7 +1847,7 @@ "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-member-expression-literals": "^7.24.7", "@babel/plugin-transform-modules-amd": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.8", "@babel/plugin-transform-modules-systemjs": "^7.24.7", "@babel/plugin-transform-modules-umd": "^7.24.7", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", @@ -1744,7 +1857,7 @@ "@babel/plugin-transform-object-rest-spread": "^7.24.7", "@babel/plugin-transform-object-super": "^7.24.7", "@babel/plugin-transform-optional-catch-binding": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/plugin-transform-private-property-in-object": "^7.24.7", @@ -1755,7 +1868,7 @@ "@babel/plugin-transform-spread": "^7.24.7", "@babel/plugin-transform-sticky-regex": "^7.24.7", "@babel/plugin-transform-template-literals": "^7.24.7", - "@babel/plugin-transform-typeof-symbol": "^7.24.7", + "@babel/plugin-transform-typeof-symbol": "^7.24.8", "@babel/plugin-transform-unicode-escapes": "^7.24.7", "@babel/plugin-transform-unicode-property-regex": "^7.24.7", "@babel/plugin-transform-unicode-regex": "^7.24.7", @@ -1764,7 +1877,7 @@ "babel-plugin-polyfill-corejs2": "^0.4.10", "babel-plugin-polyfill-corejs3": "^0.10.4", "babel-plugin-polyfill-regenerator": "^0.6.1", - "core-js-compat": "^3.31.0", + "core-js-compat": "^3.37.1", "semver": "^6.3.1" }, "engines": { @@ -1779,6 +1892,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", "integrity": "sha1-zLiKLEnIFyNoYf7ngmCAVzuKkjo=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/types": "^7.4.4", @@ -1793,6 +1907,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", "integrity": "sha1-Zs2G6o+MAUhVZx1eqac3E5y7/vE=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7", "@babel/helper-validator-option": "^7.24.7", @@ -1811,13 +1926,15 @@ "version": "0.8.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/regjsgen/-/regjsgen-0.8.0.tgz", "integrity": "sha1-8LppsHXh8F+yglt/rZkeetuxgxA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/runtime": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha1-9PDVUw6NvfWbNFG5s+WUtroILhI=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/runtime/-/runtime-7.24.8.tgz", + "integrity": "sha1-XZWMOCexPMbQXgOMB/suXjQg2C4=", "dev": true, + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1830,6 +1947,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/template/-/template-7.24.7.tgz", "integrity": "sha1-Au/O4xfQYJ0sBxF8tw74+xercxU=", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/parser": "^7.24.7", @@ -1840,19 +1958,20 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha1-3iuQAWP6dBchujghY/5GqTbEDPU=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/traverse/-/traverse-7.24.8.tgz", + "integrity": "sha1-bBTtUjK3VJ3zNx2CD72av819+rc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", + "@babel/generator": "^7.24.8", "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-function-name": "^7.24.7", "@babel/helper-hoist-variables": "^7.24.7", "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/parser": "^7.24.8", + "@babel/types": "^7.24.8", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1865,6 +1984,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -1881,15 +2001,17 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha1-YCf+ErwapyTNMqsRP7fxmI8fZvI=", + "version": "7.24.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha1-1R/6kEOxfTZiLvpE6GGknmnhMKg=", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -1901,13 +2023,15 @@ "version": "0.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha1-daLotRy3WKdVPWgEpZMteqznXDk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha1-u1BFecHK6SPmV2pPXaQ9Jfl729k=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -1917,6 +2041,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha1-AGKcNaaI4FqIsc2mhPudXnPwAKE=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -1929,6 +2054,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha1-ZTT9WTOlO6fL86F2FeJzoNEnP/k=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -1939,6 +2065,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha1-HVcr+74Ut3BOC6Dzm3SBW4SHDXA=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -1948,6 +2075,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eggjs/yauzl/-/yauzl-2.11.0.tgz", "integrity": "sha1-uORBP1D8fFFFH3cPFS3kwRN6qZs=", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer2": "^1.2.0" @@ -1958,6 +2086,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz", "integrity": "sha1-a4pi6bMHcCeDdyiBjTxDiaiYs5I=", "dev": true, + "license": "MIT", "dependencies": { "comment-parser": "1.3.1", "esquery": "^1.5.0", @@ -1972,6 +2101,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha1-ojUU6Pua8SadX3eIqlVnmNYca1k=", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -1983,10 +2113,11 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha1-NhRh5cs4Rdh05hcxwRz+3WZNg6A=", + "version": "4.11.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha1-sP/QMStKP9LW93I35ySKWtOmgK4=", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -1996,6 +2127,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha1-OIomnw8lwbatwxe1osVXFIlMcK0=", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -2018,13 +2150,15 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/argparse/-/argparse-2.0.1.tgz", "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/@eslint/eslintrc/node_modules/debug": { "version": "4.3.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -2042,6 +2176,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globals/-/globals-13.24.0.tgz", "integrity": "sha1-hDKhnXjODB6DOUnDats0VAC7EXE=", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -2057,6 +2192,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha1-wftl+PUBeQHN0slRhkuhhFihBgI=", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -2068,13 +2204,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -2087,6 +2225,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@eslint/js/-/js-8.57.0.tgz", "integrity": "sha1-pUF66EJ4c/HdCLcLNXS0U+Z7X38=", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -2095,13 +2234,15 @@ "version": "1.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@gar/promisify/-/promisify-1.1.3.tgz", "integrity": "sha1-VVGTqy47s7atw9VRycAw2ehg2vY=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "integrity": "sha1-145IGgOfdWbsyWYLTqf+ax/sRCs=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", "debug": "^4.3.1", @@ -2116,6 +2257,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -2132,13 +2274,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha1-r1smkaIrRL6EewyoFkHF+2rQFyw=", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -2151,13 +2295,15 @@ "version": "2.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha1-Siho111taWPkI7z5C3/RvjQ0CdM=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha1-s3Znt7wYHBaHgiWbq0JHT79StVA=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -2175,6 +2321,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha1-MYPjj66aZdfLXlOUXNWJfQJgoGo=", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2187,6 +2334,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha1-DmIyDPmcIa//OzASGSVGqsv7BcU=", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2198,13 +2346,15 @@ "version": "9.2.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha1-hAyIA7DYBH9P8M+WMXazLU7z7XI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string-width/-/string-width-5.1.2.tgz", "integrity": "sha1-FPja7G2B5yIdKjV+Zoyrc728p5Q=", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -2222,6 +2372,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha1-1bZWjKaJ2FYTcLBwdoXSJDT6/0U=", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -2237,6 +2388,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha1-VtwiNo7lcPrOG0mBmXXZuaXq0hQ=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -2254,6 +2406,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "integrity": "sha1-/T2x1Z7PfPEh6AZQu4ZxL5tV7O0=", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -2270,6 +2423,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha1-5F44TkuOwWvOL9kDr3hFD2v37Jg=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2279,6 +2433,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/console/-/console-29.7.0.tgz", "integrity": "sha1-zUgi29uEUpJlxaK9tSmjycyVD/w=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -2296,6 +2451,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2311,6 +2467,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2327,6 +2484,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2338,13 +2496,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jest/console/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2354,6 +2514,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2366,6 +2527,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/core/-/core-29.7.0.tgz", "integrity": "sha1-tszMI58w/zZglljFpeIpF1fORI8=", "dev": true, + "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", @@ -2413,6 +2575,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2428,6 +2591,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2444,6 +2608,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2455,13 +2620,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jest/core/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2471,6 +2638,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -2485,6 +2653,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2496,13 +2665,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2515,6 +2686,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/environment/-/environment-29.7.0.tgz", "integrity": "sha1-JNYfVP8feG881Ac7S5RBY4O68qc=", "dev": true, + "license": "MIT", "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", @@ -2530,6 +2702,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/expect/-/expect-29.7.0.tgz", "integrity": "sha1-dqPtsMt1O3Dfv+Iyg1ENPUVDK/I=", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" @@ -2543,6 +2716,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/expect-utils/-/expect-utils-29.7.0.tgz", "integrity": "sha1-Aj7+XSaopw8hZ30KGvwPCkTjocY=", "dev": true, + "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3" }, @@ -2555,6 +2729,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/fake-timers/-/fake-timers-29.7.0.tgz", "integrity": "sha1-/ZG/H/+xbX0NJKQmqxpHpJiBpWU=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", @@ -2572,6 +2747,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/globals/-/globals-29.7.0.tgz", "integrity": "sha1-jZKQ+exH/3cmB/qGTKHVou+uHU0=", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -2587,6 +2763,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/reporters/-/reporters-29.7.0.tgz", "integrity": "sha1-BLJi7LO4+qg7Cz0yFiOXI5Po9Mc=", "dev": true, + "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", @@ -2630,6 +2807,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2645,6 +2823,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2661,6 +2840,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2672,13 +2852,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jest/reporters/node_modules/glob": { "version": "7.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2699,15 +2881,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha1-kWVZNs9zgOTkczgwgeOEeLaZk7E=", + "version": "6.0.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha1-+hVAHfbBWHS8shBfdzMl14xmZ2U=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", @@ -2724,6 +2908,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2736,6 +2921,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2748,6 +2934,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/schemas/-/schemas-29.6.3.tgz", "integrity": "sha1-Qwtc6KTgBEp+OBlmMwWnswkcjgM=", "dev": true, + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -2760,6 +2947,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/source-map/-/source-map-29.6.3.tgz", "integrity": "sha1-2Quncglc83o0peuUE/G1YqCFVMQ=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", @@ -2774,6 +2962,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/test-result/-/test-result-29.7.0.tgz", "integrity": "sha1-jbmoCqGgl7siYlcmhnNLrtmxZXw=", "dev": true, + "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", @@ -2789,6 +2978,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", "integrity": "sha1-bO+XfOHTmDSjrqiHoXJmKKbwcs4=", "dev": true, + "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", @@ -2804,6 +2994,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha1-3y3Zw0bH13aLigZjmZRkDGQuKEw=", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", @@ -2830,6 +3021,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2845,6 +3037,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2861,6 +3054,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2872,13 +3066,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jest/transform/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2888,6 +3084,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2900,6 +3097,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/types/-/types-29.6.3.tgz", "integrity": "sha1-ETH4z2NOfoTF53urEvBSr1hfulk=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", @@ -2917,6 +3115,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2932,6 +3131,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2948,6 +3148,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2959,13 +3160,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jest/types/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2975,6 +3178,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2987,6 +3191,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha1-3M5q/3S99trRqVgCtpsEovyx+zY=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -3001,6 +3206,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha1-eg7mAfYPmaIMfHxf8MgDiMEYm9Y=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -3010,6 +3216,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha1-VY+2Ry7RakyFC4iVMOazZDjEkoA=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -3019,22 +3226,25 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha1-nXHKiG4yUC65NiyadKRnh8Nt+Bo=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha1-18bmdVx4VnqVHgSrUu8P0m3lnzI=", - "dev": true + "version": "1.5.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha1-MYi8snOkFLDSFf0ipYVAuYm5QJo=", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha1-FfGQ6YiV8/wjJ27hS8drZ1wuUPA=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -3056,6 +3266,7 @@ "version": "2.8.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@msgpack/msgpack/-/msgpack-2.8.0.tgz", "integrity": "sha1-QhDet3HuORKWTxShXd+1/4d+cLk=", + "license": "ISC", "engines": { "node": ">= 10" } @@ -3065,6 +3276,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3078,6 +3290,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -3087,6 +3300,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -3100,6 +3314,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/fs/-/fs-3.1.1.tgz", "integrity": "sha1-Wc2qWtypXRNfwA8rtT9XcVdc5yY=", "dev": true, + "license": "ISC", "dependencies": { "semver": "^7.3.5" }, @@ -3112,6 +3327,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -3124,6 +3340,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/git/-/git-4.1.0.tgz", "integrity": "sha1-qwrT/YK8TYwTUbbGLw+lbo/mr6Y=", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/promise-spawn": "^6.0.0", "lru-cache": "^7.4.4", @@ -3143,6 +3360,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -3152,6 +3370,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -3164,6 +3383,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-3.0.1.tgz", "integrity": "sha1-ifHNDCP2KagQX/5puBcnkch7S+E=", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3179,6 +3399,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", "integrity": "sha1-YwSOX25AlHo6iNy8tP2bdv3TfBc=", "dev": true, + "license": "ISC", "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -3195,6 +3416,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/move-file/-/move-file-2.0.1.tgz", "integrity": "sha1-Jva9w3nYf3XlVzm6uJ21JbBhAOQ=", "dev": true, + "license": "MIT", "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" @@ -3208,6 +3430,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3228,6 +3451,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -3243,6 +3467,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", "integrity": "sha1-EBstBJDvGqIO1GDkwIE/DbVgVFo=", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -3252,6 +3477,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", "integrity": "sha1-yLxPor0PAcuXnYeYugOPMUz6cPI=", "dev": true, + "license": "ISC", "dependencies": { "which": "^3.0.0" }, @@ -3264,6 +3490,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-3.0.1.tgz", "integrity": "sha1-ifHNDCP2KagQX/5puBcnkch7S+E=", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3279,6 +3506,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/run-script/-/run-script-6.0.2.tgz", "integrity": "sha1-olRS1F7n9/uMFt+vliRCPAwOuIU=", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^3.0.0", "@npmcli/promise-spawn": "^6.0.0", @@ -3295,6 +3523,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-3.0.1.tgz", "integrity": "sha1-ifHNDCP2KagQX/5puBcnkch7S+E=", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -3310,6 +3539,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha1-p36nQvqyV3UUVDTrHSMoz1ATrDM=", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -3320,6 +3550,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@puppeteer/browsers/-/browsers-2.2.3.tgz", "integrity": "sha1-rWt5EpxQgl533auggmgPTa0LZ04=", "dev": true, + "license": "Apache-2.0", "dependencies": { "debug": "4.3.4", "extract-zip": "2.0.1", @@ -3342,6 +3573,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cliui/-/cliui-8.0.1.tgz", "integrity": "sha1-DASwddsCy/5g3I5s8vVIaxo2CKo=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -3356,6 +3588,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -3373,6 +3606,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -3384,13 +3618,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@puppeteer/browsers/node_modules/semver": { "version": "7.6.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.0.tgz", "integrity": "sha1-Gkak20v/zM2Xt0O1AFyDJfI9Ti0=", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -3405,13 +3641,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/@puppeteer/browsers/node_modules/yargs": { "version": "17.7.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs/-/yargs-17.7.2.tgz", "integrity": "sha1-mR3zmspnWhkrgW4eA2P5110qomk=", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -3430,6 +3668,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", "integrity": "sha1-x35girESpma38qa+piXHMiT33TQ=", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", @@ -3455,6 +3694,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", "integrity": "sha1-5eCwWb2FyldIlJLylc6IwtSw2vk=", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", @@ -3480,6 +3720,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-replace/-/plugin-replace-5.0.7.tgz", "integrity": "sha1-FQye6duAMdnkWAphoO3qrtPTdoc=", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "magic-string": "^0.30.3" @@ -3501,6 +3742,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", "integrity": "sha1-Fd/9s/c/Ehqk+7N+fKa+mu6pGWI=", "dev": true, + "license": "MIT", "dependencies": { "serialize-javascript": "^6.0.1", "smob": "^1.0.0", @@ -3523,6 +3765,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", "integrity": "sha1-ckI31ewSYJ7AFCn2GdKj59TRsis=", "dev": true, + "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.1.0", "resolve": "^1.22.1" @@ -3549,6 +3792,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", "integrity": "sha1-flPt3Ix/SDpK0LlK+x9/X9PHceA=", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", @@ -3567,208 +3811,224 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha1-u9DmFrIHjNLWivyYJNH62y8v/Sc=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", + "integrity": "sha1-8NpIEkS32eoVKWs19/45zYEVc5Y=", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha1-lyVe9jhMX3P0gAwN6R9fZRjiEgM=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", + "integrity": "sha1-gqs8V19CNftker6l4I7sbPMllk4=", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha1-tt104RdRDf6UVBZGBnsFRbQv8JY=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", + "integrity": "sha1-alMEUuaKkVKAnOWN4fiVl2MqCFs=", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha1-4H123hzsmHZz5/PUjMuOEG1CwFw=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", + "integrity": "sha1-R3J0efXKKSz0NNfnWvJyW3JOy8c=", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha1-nxptIYtWDJ11GFr0uLtC+fJHNrg=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", + "integrity": "sha1-Rhk8SYqnkCqNuJrAASgGAyDoT+8=", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha1-U2GLkub/tkLHtiDm5ShEZREzBUk=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", + "integrity": "sha1-Itgx/iOWQ8HQXJiQZCAyXO5DnYU=", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha1-mae6XnGdTwU3YaaY97Uikc77pXc=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", + "integrity": "sha1-GavTNpXsnViLSoWNEiYxQzCE5KM=", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha1-9T25mkXZvADOlNuKNe+nw8FEpYw=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", + "integrity": "sha1-1gr4wLm+QkQk/5aguhn85l0m9qs=", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha1-y7CDdAj+CBzjQ1zzcw4JD+uvyb8=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", + "integrity": "sha1-sRlOXtbROP3eCELRJvzN50qQ9Fc=", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha1-jtCcHRJiraTDjXkaKK4P6ii4DMk=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", + "integrity": "sha1-9aY1wBe5v/i4VrAiH71cDjNzt+w=", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha1-k4E408jgyW8CIlKihEHc+xev1+w=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", + "integrity": "sha1-8QQ9n0Amv2mVhjyz+N1HMmBuS6o=", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha1-GnSBE3pUdAvuHe1K5XUkUPFV2UI=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", + "integrity": "sha1-HngXML5EURnwbJ318YXhk7yCxhA=", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha1-8Rhq/GAaxPT8JfrEyhXsvuOhh00=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", + "integrity": "sha1-CPEuGWXW8n1omP+TJZISHMpqvEs=", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha1-7WYD6TY2qWIDxpFb5BFyRcG9La8=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", + "integrity": "sha1-Sl3Lvnr31ByskrCXmOfBgx2h9Zk=", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha1-FOC0BLHCXr5hV6Fe25xGlZunTFQ=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", + "integrity": "sha1-B1sHE95ieEOnO0zw4IfFa1Pp14A=", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha1-XWlNNFzja27PZXNJ4D64cpfmjaQ=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", + "integrity": "sha1-DLJAwUfA39Dj6v9MwGCnctOeFVw=", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -3779,6 +4039,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sigstore/bundle/-/bundle-1.1.0.tgz", "integrity": "sha1-F/jYE7CTSLFu7tZqjPHD1r09BPE=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.2.0" }, @@ -3791,6 +4052,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", "integrity": "sha1-vp7088OAUsQ705nT95LJf/niJ3s=", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -3800,6 +4062,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sigstore/sign/-/sign-1.0.0.tgz", "integrity": "sha1-awjrwvbJKqWssHpJeEy2c4eW97Q=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@sigstore/bundle": "^1.1.0", "@sigstore/protobuf-specs": "^0.2.0", @@ -3814,6 +4077,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -3823,6 +4087,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha1-hc65gHlYSpUj1L9x0ymW5+IIVJ8=", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -3849,6 +4114,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -3866,6 +4132,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -3875,6 +4142,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sigstore/tuf/-/tuf-1.0.3.tgz", "integrity": "sha1-KmWYZ3Lt6ZZIVyjwJ7BRTAtwsWA=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.2.0", "tuf-js": "^1.1.7" @@ -3887,12 +4155,14 @@ "version": "0.27.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha1-Zmf6wWxDa1Q0o4ejTe2wExmPbm4=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sindresorhus/is/-/is-4.6.0.tgz", "integrity": "sha1-PHycRuZ4/u/nouW7YJ09vWZf+z8=", + "license": "MIT", "engines": { "node": ">=10" }, @@ -3905,6 +4175,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sinonjs/commons/-/commons-3.0.1.tgz", "integrity": "sha1-ECk1fkTKkBphVYX20nc428iQhM0=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } @@ -3914,6 +4185,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", "integrity": "sha1-Vf3/Hsq581QBkSna9N8N1Nkj6mY=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.0" } @@ -3922,12 +4194,14 @@ "version": "3.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", "integrity": "sha1-gh+EQvQXXY8EZ7na8m46GOLQKvI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", "integrity": "sha1-tKkUu2LnwnLU5Zif5EQPgSqx2Ac=", + "license": "MIT", "dependencies": { "defer-to-connect": "^2.0.0" }, @@ -3940,6 +4214,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha1-9UShSNOrNYAcH2M6dEH9h8LkhL8=", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -3948,37 +4223,43 @@ "version": "0.23.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", "integrity": "sha1-207P1JmpdlqyQALDtpbQLm0yoSw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node10": { "version": "1.0.11", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha1-buRkAGhfEw4ngSjHs4t+Ax/1svI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha1-7j3vHyfZ7WbaxuRqKVz/sBUuBY0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha1-5DhjFihPALmENb9A9y91oJ2r9sE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha1-C5LcwMwcgfbzBqOB8o4xsaVlNuk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@tufjs/canonical-json": { "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz", "integrity": "sha1-6t6f0fU3mTvB8JSfOuonbsxPqzE=", "dev": true, + "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -3988,6 +4269,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@tufjs/models/-/models-1.0.4.tgz", "integrity": "sha1-WmiWMPa529ozjUsggBkzZWLxdu8=", "dev": true, + "license": "MIT", "dependencies": { "@tufjs/canonical-json": "1.0.0", "minimatch": "^9.0.0" @@ -4001,15 +4283,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@tufjs/models/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", + "version": "9.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha1-10+d1rV9g9jpjPuCEzsDl4vJKeU=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4025,6 +4309,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/archiver/-/archiver-5.3.4.tgz", "integrity": "sha1-MhctWlbxZbW0rJAuNmJIvwPTroQ=", "dev": true, + "license": "MIT", "dependencies": { "@types/readdir-glob": "*" } @@ -4034,6 +4319,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha1-PfFfJ7qFMZyqB7oI0HIYibs5wBc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -4047,6 +4333,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/babel__generator/-/babel__generator-7.6.8.tgz", "integrity": "sha1-+DbGH0ixNG59Kw2TxtrMW5U106s=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.0.0" } @@ -4056,6 +4343,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha1-VnJRNwHBshmbxtrWNqnXSRWGdm8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" @@ -4066,6 +4354,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", "integrity": "sha1-jcnwrg8gLAjY1Nq2SJEsjWA44/c=", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.20.7" } @@ -4074,6 +4363,7 @@ "version": "6.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", "integrity": "sha1-pDCzJgRmyntcpb/XNWk7Nuep0YM=", + "license": "MIT", "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", @@ -4085,13 +4375,15 @@ "version": "0.4.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/cookie/-/cookie-0.4.1.tgz", "integrity": "sha1-v9AsHyIkVnZ2wVRRmfh8OoYdh40=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/cors": { "version": "2.8.17", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/cors/-/cors-2.8.17.tgz", "integrity": "sha1-XXGKXklKgWb1admGeU5JxIshays=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -4100,13 +4392,15 @@ "version": "0.0.30", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/debug/-/debug-0.0.30.tgz", "integrity": "sha1-3B5A9687nIFQE6eGDmJS9jUqhN8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/eslint": { "version": "8.56.10", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/eslint/-/eslint-8.56.10.tgz", "integrity": "sha1-6yNwpzvwSpAe66jyJZXH7g9+tY0=", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -4117,6 +4411,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", "integrity": "sha1-MQi9XxiwzbJ3yGez3UScntcHmsU=", "dev": true, + "license": "MIT", "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -4126,13 +4421,15 @@ "version": "1.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha1-ps4+VW4A/ZiV3Yct0XKtDUvWh/Q=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", "integrity": "sha1-Kga8D2iiCrN7PjaqI4vmq99J6LQ=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -4140,19 +4437,22 @@ "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha1-uXnrrTkZeZyXmxfHJiHAvAoxxsQ=" + "integrity": "sha1-uXnrrTkZeZyXmxfHJiHAvAoxxsQ=", + "license": "MIT" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha1-dznCMqH+6bTTzomF8xTAxtM1Sdc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", "integrity": "sha1-UwR2FK5y4Z/AQB2HLeOuK0zjUL8=", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } @@ -4162,6 +4462,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", "integrity": "sha1-DwPj0vZw+9rFhuNLQzeDBwzBb1Q=", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } @@ -4170,13 +4471,15 @@ "version": "2.8.23", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/jasmine/-/jasmine-2.8.23.tgz", "integrity": "sha1-/di2hKsuMcWgHhx2PqTEQ6/iPfk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/jest": { "version": "26.0.24", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/jest/-/jest-26.0.24.tgz", "integrity": "sha1-lD0Rl2sWc5GFkToZNuDeDEp9WVo=", "dev": true, + "license": "MIT", "dependencies": { "jest-diff": "^26.0.0", "pretty-format": "^26.0.0" @@ -4187,6 +4490,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/jsdom/-/jsdom-16.2.15.tgz", "integrity": "sha1-bAmZDsQ7BU5JY2y6TRHVQ2f8kNY=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "@types/parse5": "^6.0.3", @@ -4197,13 +4501,15 @@ "version": "7.0.15", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha1-WWoXRyM2lNUPatinhp/Lb1bPWEE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/karma": { "version": "6.3.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/karma/-/karma-6.3.8.tgz", "integrity": "sha1-Bss+zdq+zoHrQ6EIeo8Brez2RkU=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "log4js": "^6.4.1" @@ -4213,14 +4519,16 @@ "version": "3.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/keyv/-/keyv-3.1.4.tgz", "integrity": "sha1-PM2xxnUbDH5SMAvNrNW8v4+qdbY=", + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-20.14.2.tgz", - "integrity": "sha1-pfTSvLS2qHv/yqcXcYxaDyCPShg=", + "version": "20.14.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-20.14.10.tgz", + "integrity": "sha1-oaIYKQ8bZChoLjrwRHheWHTbRpo=", + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } @@ -4229,13 +4537,15 @@ "version": "6.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/parse5/-/parse5-6.0.3.tgz", "integrity": "sha1-cFuzSeeJ76BvQ/EozvUSQHU0JMs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/puppeteer": { "version": "7.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/puppeteer/-/puppeteer-7.0.4.tgz", "integrity": "sha1-brQIEyPpB1wfTDU/k+4u1u7ZlIc=", "dev": true, + "license": "MIT", "dependencies": { "puppeteer": "*" } @@ -4245,6 +4555,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/puppeteer-core/-/puppeteer-core-5.4.0.tgz", "integrity": "sha1-iAp5F7Tt6Vy/4tXoGlWM/LBywPs=", "dev": true, + "license": "MIT", "dependencies": { "@types/puppeteer": "*" } @@ -4254,6 +4565,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/readdir-glob/-/readdir-glob-1.1.5.tgz", "integrity": "sha1-IaSpiJj8YGy1aK2BXyoO7cJNQSo=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -4262,12 +4574,14 @@ "version": "1.20.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha1-l9JuAM1KBCO0r2IKvs8+b0QreXU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/responselike": { "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/responselike/-/responselike-1.0.3.tgz", "integrity": "sha1-zClwbwo5fP5t+J3r/kv1zqFZ21A=", + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -4276,31 +4590,36 @@ "version": "7.5.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/semver/-/semver-7.5.8.tgz", "integrity": "sha1-gmioxXo+Sr0lwWXs02I323lIpV4=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/stack-utils/-/stack-utils-2.0.3.tgz", "integrity": "sha1-YgkyHrLBcSp+dGZCK4yx/A2d1dg=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/tough-cookie": { "version": "4.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", "integrity": "sha1-y24qaRtwyxd8bjrpwdLosuqM0wQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/which": { "version": "1.3.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/which/-/which-1.3.2.tgz", "integrity": "sha1-nCRvwMk97TEchRLfKJH7QfYif98=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/yargs": { "version": "17.0.32", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/yargs/-/yargs-17.0.32.tgz", "integrity": "sha1-Awd0cjovf6r+v2RfTlpINx3KYik=", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -4309,13 +4628,15 @@ "version": "21.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", "integrity": "sha1-gV4wt4bS6PDc2F/VvPXhoE0AjxU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha1-6bKAi08QlQSgPNqVglmHb2EBeZk=", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" @@ -4326,6 +4647,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", "integrity": "sha1-ru8DKNFyueN9m6ttvBO4ftiJd9s=", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.62.0", @@ -4360,6 +4682,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -4376,13 +4699,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { "version": "7.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -4395,6 +4720,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/parser/-/parser-5.62.0.tgz", "integrity": "sha1-G2PQgthJovyuilaSSPvi7huKVsc=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -4422,6 +4748,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -4438,13 +4765,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha1-2UV8zGoLjWs30OslKiMCJHjFRgw=", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -4462,6 +4791,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", "integrity": "sha1-KG8DicQWgTds2tlrMJzt0X1wNGo=", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "5.62.0", "@typescript-eslint/utils": "5.62.0", @@ -4489,6 +4819,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -4505,13 +4836,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/types": { "version": "5.62.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/types/-/types-5.62.0.tgz", "integrity": "sha1-JYYH5g7/ownwZ2CJMcPfb+1B/S8=", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -4525,6 +4858,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha1-fRd5S3f6vKxhXWpI+xQzMNli65s=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -4552,6 +4886,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -4568,13 +4903,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -4587,6 +4924,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/utils/-/utils-5.62.0.tgz", "integrity": "sha1-FB6AnHFjbkp12qOfrtL7X0sQ34Y=", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", @@ -4613,6 +4951,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -4625,6 +4964,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha1-IXQBGRfOWCh1lU/+L2kS1ZMeNT4=", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -4641,13 +4981,15 @@ "version": "1.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha1-dWZBrbWHhRtcyz4JXa8nrlgchAY=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/@wdio/config": { "version": "6.12.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@wdio/config/-/config-6.12.1.tgz", "integrity": "sha1-htmHtQXYyoXsEUcYMNK6KW2rO88=", "dev": true, + "license": "MIT", "dependencies": { "@wdio/logger": "6.10.10", "deepmerge": "^4.0.0", @@ -4662,6 +5004,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4682,6 +5025,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@wdio/logger/-/logger-6.10.10.tgz", "integrity": "sha1-HgfPMqaWBt25T6n9SwFxy4OaWYA=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "loglevel": "^1.6.0", @@ -4697,6 +5041,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4712,6 +5057,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -4728,6 +5074,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -4739,13 +5086,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@wdio/logger/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4755,6 +5104,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4767,6 +5117,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@wdio/protocols/-/protocols-6.12.0.tgz", "integrity": "sha1-5AhQvmLELILdLEhmVdZBnNnsHj4=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -4776,6 +5127,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@wdio/repl/-/repl-6.11.0.tgz", "integrity": "sha1-Wx6rV0triff3w4PnKVwGryPDgY4=", "dev": true, + "license": "MIT", "dependencies": { "@wdio/utils": "6.11.0" }, @@ -4788,6 +5140,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@wdio/utils/-/utils-6.11.0.tgz", "integrity": "sha1-h4wlAO+xoyW/WmbS/z0IFi+Xbow=", "dev": true, + "license": "MIT", "dependencies": { "@wdio/logger": "6.10.10" }, @@ -4800,6 +5153,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha1-uxag6LGRT5efRYZMI4Gcw+Pw1Ls=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -4809,25 +5163,29 @@ "version": "1.11.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha1-2svLla/xNcgmD3f6O0xf6mAKZDE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha1-YTL2jErNWdzRQcRLGMvrvZ8vp2g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.12.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha1-bfINJy6lQ5vyCrNJK3+3Dpv8s/Y=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha1-y85efgwb0yz0kFrkRO9kzqkZ8bU=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -4838,13 +5196,15 @@ "version": "1.11.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha1-uy69s7g6om2bqtTEbUMVKDrNUek=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.12.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha1-PaYjIzrhpgQJtQmlKt6bwio3978=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -4857,6 +5217,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha1-u2ZckdCxT//OsOOCmMMprwQ8bjo=", "dev": true, + "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -4866,6 +5227,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha1-cOYOXoL5rIERi8JTgaCyg4kyQNc=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" } @@ -4874,13 +5236,15 @@ "version": "1.11.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha1-kPi8NMVhWV/hVmA75yU8280Pq1o=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.12.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha1-n58/9SoUyYCTm+DvnV3568Z4rjs=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -4897,6 +5261,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha1-plIGAdobVwBEgnNmanGtCkXXhUc=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -4910,6 +5275,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha1-nm6BR138+2LatXSsLdo4ImwjK8U=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-buffer": "1.12.1", @@ -4922,6 +5288,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha1-xHrLkObwgzkeP6YdETZQ7qHpWTc=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", @@ -4936,6 +5303,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha1-vOz2YdfRq9r5idg0Gkgz4z4rMaw=", "dev": true, + "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" @@ -4946,6 +5314,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webpack-cli/configtest/-/configtest-1.2.0.tgz", "integrity": "sha1-eyDOHBJTORLDshfqaCYjZfoppvU=", "dev": true, + "license": "MIT", "peerDependencies": { "webpack": "4.x.x || 5.x.x", "webpack-cli": "4.x.x" @@ -4956,6 +5325,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webpack-cli/info/-/info-1.5.0.tgz", "integrity": "sha1-bHjBPFh0hS1uLdF/CKQfP+TCYbE=", "dev": true, + "license": "MIT", "dependencies": { "envinfo": "^7.7.3" }, @@ -4968,6 +5338,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@webpack-cli/serve/-/serve-1.7.0.tgz", "integrity": "sha1-4Zk2iaxC0rFukZQ3bPtnU/YlTbE=", "dev": true, + "license": "MIT", "peerDependencies": { "webpack-cli": "4.x.x" }, @@ -4981,30 +5352,35 @@ "version": "1.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0=", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/abab/-/abab-2.0.6.tgz", "integrity": "sha1-QbgPLIcdGWhiFrgjCSMc/Tyz0pE=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha1-6vVNU7YrrkE46AnKIlyEOabvs5I=", + "license": "MIT", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -5017,6 +5393,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/accepts/-/accepts-1.3.8.tgz", "integrity": "sha1-C/C+EltnAUrcsLCSHmLbe//hay4=", "dev": true, + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -5026,10 +5403,11 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha1-ceCxThOk7BYHJLOPt7DyM7G4HXo=", + "version": "8.12.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha1-cWFr3MviXielRDngBG6JynbfIkg=", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -5042,16 +5420,18 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-globals/-/acorn-globals-7.0.1.tgz", "integrity": "sha1-Db8FxE+nyUMykUwCBm1b7/YsQMM=", "dev": true, + "license": "MIT", "dependencies": { "acorn": "^8.1.0", "acorn-walk": "^8.0.2" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha1-UHJ2JJ1oR5fITgc074SGAzTPsaw=", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha1-frFVexugXvGLXtDsZ1kb+rBGiO8=", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^8" } @@ -5061,15 +5441,20 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha1-ftW7VZCLOy8bxVxq8WU7rafweTc=", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha1-dwOvlBXxttuTFdaJVQOGLiMdNKo=", + "version": "8.3.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha1-nK6sKe76oMQePUxlE33k1vNN9D4=", "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } @@ -5079,6 +5464,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha1-Sf/1hXfP7j83F2/qtMIuAPhtf3c=", "dev": true, + "license": "MIT", "dependencies": { "debug": "4" }, @@ -5091,6 +5477,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -5107,13 +5494,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/agentkeepalive": { "version": "4.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agentkeepalive/-/agentkeepalive-4.5.0.tgz", "integrity": "sha1-JnOtE4mzxBjFogxdc2T5PKBL6SM=", "dev": true, + "license": "MIT", "dependencies": { "humanize-ms": "^1.2.1" }, @@ -5126,6 +5515,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo=", "dev": true, + "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -5139,6 +5529,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-6.12.6.tgz", "integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5155,6 +5546,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha1-bmaUAGWet0lzu/LjMycYCgmWtSA=", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^8.0.0" }, @@ -5168,15 +5560,16 @@ } }, "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.16.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.16.0.tgz", - "integrity": "sha1-IuKpK5TwBffg+cnTllLvC49vDLQ=", + "version": "8.17.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha1-N9mlx3ava8ktf0+VEOukwKYNEaY=", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -5187,13 +5580,15 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha1-rnvLNlard6c7pcSb9lTzjmtoYOI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha1-MfKdpatuANHC0yms97WSlhTVAU0=", "dev": true, + "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" } @@ -5203,6 +5598,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-align/-/ansi-align-3.0.1.tgz", "integrity": "sha1-DN8S4RGs53OobpofrRIlxDyxmlk=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.1.0" } @@ -5212,6 +5608,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha1-ayKR0dt9mLZSHV8e+kLQ86n+tl4=", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -5227,6 +5624,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5236,6 +5634,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -5248,6 +5647,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha1-eQxYsZuhcgqEIFtXxhjVrYUklz4=", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -5260,13 +5660,15 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/aproba/-/aproba-2.0.0.tgz", "integrity": "sha1-UlILiuW1aSFbNU78DKo/4eRaitw=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/archiver": { "version": "5.3.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/archiver/-/archiver-5.3.2.tgz", "integrity": "sha1-mZkdWVflO9AwOjkpeSdqxN3M87A=", "dev": true, + "license": "MIT", "dependencies": { "archiver-utils": "^2.1.0", "async": "^3.2.4", @@ -5285,6 +5687,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/archiver-utils/-/archiver-utils-2.1.0.tgz", "integrity": "sha1-6KRg6UtpPD49oYKgmMpihbqSSeI=", "dev": true, + "license": "MIT", "dependencies": { "glob": "^7.1.4", "graceful-fs": "^4.2.0", @@ -5306,6 +5709,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5326,6 +5730,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha1-kRJegEK7obmIf0k0X2J3Anzovps=", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5340,13 +5745,15 @@ "version": "5.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/archiver-utils/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -5356,6 +5763,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/are-docs-informative/-/are-docs-informative-0.0.2.tgz", "integrity": "sha1-OH8Ok/XUUoA3PTh6WdNMltsyGWM=", "dev": true, + "license": "MIT", "engines": { "node": ">=14" } @@ -5365,6 +5773,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", "integrity": "sha1-Z53yIrJ4xk8s26EXXNwAsNlhZL0=", "dev": true, + "license": "ISC", "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" @@ -5377,13 +5786,15 @@ "version": "4.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/arg/-/arg-4.1.3.tgz", "integrity": "sha1-Jp/HrVuOQstjyJbVZmAXJhwUQIk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/argparse/-/argparse-1.0.10.tgz", "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } @@ -5393,6 +5804,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/array-union/-/array-union-2.1.0.tgz", "integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5402,6 +5814,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ast-types/-/ast-types-0.13.4.tgz", "integrity": "sha1-7g13s0MmOWXsw/ti2hbnIisrZ4I=", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.1" }, @@ -5413,31 +5826,36 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/async": { "version": "3.2.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/async/-/async-3.2.5.tgz", "integrity": "sha1-69Uqj9r3oiiaJN85n42Ehcika2Y=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/async-limiter": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha1-YCzUtG6EStTv/JKoARo8RuAjjcI=", "dev": true, + "license": "ISC", "engines": { "node": ">= 4.0.0" } @@ -5447,6 +5865,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/atob/-/atob-2.1.2.tgz", "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", "dev": true, + "license": "(MIT OR Apache-2.0)", "bin": { "atob": "bin/atob.js" }, @@ -5458,13 +5877,15 @@ "version": "1.6.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/b4a/-/b4a-1.6.6.tgz", "integrity": "sha1-pMw0mjhRmHw8SsLXeFwYdE9tqbo=", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-jest/-/babel-jest-29.7.0.tgz", "integrity": "sha1-9DaZGSJbaExWCFmYrGPb0FvgINU=", "dev": true, + "license": "MIT", "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", @@ -5486,6 +5907,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5501,6 +5923,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5517,6 +5940,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5528,13 +5952,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/babel-jest/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5544,6 +5970,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5556,6 +5983,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", "integrity": "sha1-+ojsWSMv2bTjbbvFQKjsmptH2nM=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -5572,6 +6000,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", "integrity": "sha1-qtvpQ0ZBgqiSLDySfDBn/0DSRiY=", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -5587,6 +6016,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", "integrity": "sha1-MDIN/j/+GjNsFa/c2v1v1hWyXjM=", "dev": true, + "license": "MIT", "dependencies": { "@babel/compat-data": "^7.22.6", "@babel/helper-define-polyfill-provider": "^0.6.2", @@ -5601,6 +6031,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", "integrity": "sha1-eJrIJAWtZkwgR20CM7SFKB3rnHc=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.1", "core-js-compat": "^3.36.1" @@ -5614,6 +6045,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", "integrity": "sha1-rdxH4kDt0doQWOvaAwIfOCu6eF4=", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.2" }, @@ -5626,6 +6058,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", "integrity": "sha1-tDmSObibKgEfndvj5PQB/EDP9zs=", "dev": true, + "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -5649,6 +6082,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", "integrity": "sha1-+gX6UQ59STiW17DdIDNgHIQPFxw=", "dev": true, + "license": "MIT", "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" @@ -5664,13 +6098,15 @@ "version": "1.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bare-events": { - "version": "2.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-events/-/bare-events-2.3.1.tgz", - "integrity": "sha1-WvLuC+lXj4Hjwaqbw6aivPIjB84=", + "version": "2.4.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-events/-/bare-events-2.4.2.tgz", + "integrity": "sha1-MUDMp6DhHUmz7cUEGrVgZZ/Y4fg=", "dev": true, + "license": "Apache-2.0", "optional": true }, "node_modules/bare-fs": { @@ -5678,6 +6114,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-fs/-/bare-fs-2.3.1.tgz", "integrity": "sha1-zb1j2selUt+yuH0YyCIpjR79IT0=", "dev": true, + "license": "Apache-2.0", "optional": true, "dependencies": { "bare-events": "^2.0.0", @@ -5686,10 +6123,11 @@ } }, "node_modules/bare-os": { - "version": "2.3.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-os/-/bare-os-2.3.0.tgz", - "integrity": "sha1-cY5oCxOe//8GJKdCHAmOeiwtY9o=", + "version": "2.4.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-os/-/bare-os-2.4.0.tgz", + "integrity": "sha1-XeXjuncE9FnJZWYp7cp8xzbgZgg=", "dev": true, + "license": "Apache-2.0", "optional": true }, "node_modules/bare-path": { @@ -5697,16 +6135,18 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-path/-/bare-path-2.1.3.tgz", "integrity": "sha1-WUEEyCnvZg5DtVieyNrvffbO2z4=", "dev": true, + "license": "Apache-2.0", "optional": true, "dependencies": { "bare-os": "^2.1.0" } }, "node_modules/bare-stream": { - "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-stream/-/bare-stream-2.1.2.tgz", - "integrity": "sha1-RqG+wKEJRmCK3jacFwF5cGuejhw=", + "version": "2.1.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bare-stream/-/bare-stream-2.1.3.tgz", + "integrity": "sha1-BwtpkZljpDfMniBVTt4HnOChKbI=", "dev": true, + "license": "Apache-2.0", "optional": true, "dependencies": { "streamx": "^2.18.0" @@ -5729,13 +6169,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/base64id/-/base64id-2.0.0.tgz", "integrity": "sha1-J3Csa8R9MSr5eov5pjQ0LgzSXLY=", "dev": true, + "license": "MIT", "engines": { "node": "^4.5.0 || >= 5.9" } @@ -5745,6 +6187,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/basic-ftp/-/basic-ftp-5.0.5.tgz", "integrity": "sha1-FKR09f/+zKH09AbxwmsY+AAiWsA=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -5754,6 +6197,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/big.js/-/big.js-5.2.2.tgz", "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -5763,6 +6207,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha1-9uFKl4WNMnJSIAJC1Mz+UixEVSI=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -5774,6 +6219,7 @@ "version": "4.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bl/-/bl-4.1.0.tgz", "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", + "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -5785,6 +6231,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/body-parser/-/body-parser-1.20.2.tgz", "integrity": "sha1-b+sOIcRyTQbef/ONo22tT1enR/0=", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -5809,6 +6256,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -5817,19 +6265,22 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/boolean": { "version": "3.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/boolean/-/boolean-3.2.0.tgz", "integrity": "sha1-nlKUr06YMUSUy7F5efpUyhWfEWs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/boxen": { "version": "5.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/boxen/-/boxen-5.1.2.tgz", "integrity": "sha1-eIy2hvyDwfSG36ikDGj8K4MdK1A=", "dev": true, + "license": "MIT", "dependencies": { "ansi-align": "^3.0.0", "camelcase": "^6.2.0", @@ -5852,6 +6303,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5867,6 +6319,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha1-VoW5XrIJrJwMF3Rnd4ychN9Yupo=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -5879,6 +6332,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5895,6 +6349,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5906,13 +6361,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/boxen/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5922,6 +6379,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5934,6 +6392,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -5946,6 +6405,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5956,6 +6416,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/braces/-/braces-3.0.3.tgz", "integrity": "sha1-SQMy9AkZRSJy1VqEgK3AxEE1h4k=", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -5968,6 +6429,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brotli-size/-/brotli-size-4.0.0.tgz", "integrity": "sha1-oF7j+q08DnAKLy2oJrprTXbmnl4=", "dev": true, + "license": "MIT", "dependencies": { "duplexer": "0.1.1" }, @@ -5976,9 +6438,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha1-zkrwU0s9N9tcGkypi5CA+YUEHpY=", + "version": "4.23.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/browserslist/-/browserslist-4.23.2.tgz", + "integrity": "sha1-JE/oA2QfHBnCjEjEtuyXNus9Mu0=", "dev": true, "funding": [ { @@ -5994,11 +6456,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", + "caniuse-lite": "^1.0.30001640", + "electron-to-chromium": "^1.4.820", "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -6012,6 +6475,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bs-logger/-/bs-logger-0.2.6.tgz", "integrity": "sha1-6302UwenLPl0zGzadraDVK0za9g=", "dev": true, + "license": "MIT", "dependencies": { "fast-json-stable-stringify": "2.x" }, @@ -6024,6 +6488,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bser/-/bser-2.1.1.tgz", "integrity": "sha1-5nh9og7OnQeZhTPP2d5vXDj0vAU=", "dev": true, + "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -6046,6 +6511,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -6056,6 +6522,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/buffer-alloc/-/buffer-alloc-1.2.0.tgz", "integrity": "sha1-iQ3ZDZI6hz4I4Q5f1RpX5bfM4Ow=", "dev": true, + "license": "MIT", "dependencies": { "buffer-alloc-unsafe": "^1.1.0", "buffer-fill": "^1.0.0" @@ -6065,12 +6532,14 @@ "version": "1.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", "integrity": "sha1-vX3CauKXLQ7aJTvgYdupkjScGfA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "license": "MIT", "engines": { "node": "*" } @@ -6079,19 +6548,22 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/buffer-fill/-/buffer-fill-1.0.0.tgz", "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/builtin-modules/-/builtin-modules-3.3.0.tgz", "integrity": "sha1-yuYoEriYAellYzbkYiPgMDhr57Y=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -6104,6 +6576,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bytes/-/bytes-3.1.2.tgz", "integrity": "sha1-iwvuuYYFrfGxKPpDhkA8AJ4CIaU=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6113,6 +6586,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cacache/-/cacache-17.1.4.tgz", "integrity": "sha1-s/84FYC0foXG5k+AEQFQjiZgSzU=", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -6136,28 +6610,28 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/cacache/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.1.tgz", - "integrity": "sha1-DPsBq2prQ4F3v+aljiV29u/pCcI=", + "version": "10.4.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.5.tgz", + "integrity": "sha1-9NnwuQ/9urCcnXf18ptCYlF7CVY=", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -6167,15 +6641,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", + "version": "9.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha1-10+d1rV9g9jpjPuCEzsDl4vJKeU=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -6191,6 +6667,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -6199,6 +6676,7 @@ "version": "5.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", "integrity": "sha1-WmuGWyxENXvj1evCpGewMnGacAU=", + "license": "MIT", "engines": { "node": ">=10.6.0" } @@ -6207,6 +6685,7 @@ "version": "7.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cacheable-request/-/cacheable-request-7.0.4.tgz", "integrity": "sha1-ejPr8IYTF4tANjW+e4mdPmm76Bc=", + "license": "MIT", "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -6224,6 +6703,7 @@ "version": "5.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha1-SWaheV7lrOZecGxLe+txJX1uItM=", + "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -6239,6 +6719,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha1-BgFlmcQMVkmMGHadJzC+JCtvo7k=", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -6258,6 +6739,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/callsites/-/callsites-3.1.0.tgz", "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -6267,6 +6749,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/camel-case/-/camel-case-4.1.2.tgz", "integrity": "sha1-lygHKpVPgFIoIlpt7qazhGHhvVo=", "dev": true, + "license": "MIT", "dependencies": { "pascal-case": "^3.1.2", "tslib": "^2.0.3" @@ -6276,21 +6759,23 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001632", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz", - "integrity": "sha1-lkIHt8ulhRcBr7TIr68USNs4hLY=", + "version": "1.0.30001642", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", + "integrity": "sha1-aqZhDrJAZ8JG0wxX8FWp0Kf40F8=", "dev": true, "funding": [ { @@ -6305,13 +6790,15 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/capital-case": { "version": "1.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/capital-case/-/capital-case-1.0.4.tgz", "integrity": "sha1-nRMCkjU8kkn2sA+lhSvuOKcX5mk=", "dev": true, + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -6322,13 +6809,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-2.4.2.tgz", "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6343,6 +6832,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/change-case/-/change-case-4.1.2.tgz", "integrity": "sha1-/t/F8TYEXiOYwEEO5EH5VwRkHhI=", "dev": true, + "license": "MIT", "dependencies": { "camel-case": "^4.1.2", "capital-case": "^1.0.4", @@ -6362,13 +6852,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/char-regex": { "version": "1.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha1-10Q1giYhf5ge1Y9Hmx1rzClUXc8=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -6378,6 +6870,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha1-GXxsxmnvKo3F57TZfuTgksPrDVs=", "dev": true, + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -6402,6 +6895,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -6414,6 +6908,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chownr/-/chownr-2.0.0.tgz", "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -6423,6 +6918,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chrome-launcher/-/chrome-launcher-0.13.4.tgz", "integrity": "sha1-TH2BMzyYKCiZxOOCVtoj4A7TL3M=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@types/node": "*", "escape-string-regexp": "^1.0.5", @@ -6437,6 +6933,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6457,6 +6954,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha1-fe8D0kMtyuS6HWEURcSDlgYiVfY=", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -6469,6 +6967,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -6484,19 +6983,21 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", "integrity": "sha1-Bb/9f/koRlCTMUcIyTvfqb0fD1s=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0" } }, "node_modules/chromium-bidi": { - "version": "0.5.19", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chromium-bidi/-/chromium-bidi-0.5.19.tgz", - "integrity": "sha1-5PSVG32bINZo1rOHg597e/LWnvQ=", + "version": "0.6.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chromium-bidi/-/chromium-bidi-0.6.0.tgz", + "integrity": "sha1-y6lzfc30KF0MsauCmOA9COE3C2Q=", "dev": true, + "license": "Apache-2.0", "dependencies": { "mitt": "3.0.1", "urlpattern-polyfill": "10.0.0", - "zod": "3.22.4" + "zod": "3.23.8" }, "peerDependencies": { "devtools-protocol": "*" @@ -6513,6 +7014,7 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], + "license": "MIT", "engines": { "node": ">=8" } @@ -6521,13 +7023,15 @@ "version": "1.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", "integrity": "sha1-xIU0Guj9mZyk7lry16HJrgHgCZw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -6537,6 +7041,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cli-boxes/-/cli-boxes-2.2.1.tgz", "integrity": "sha1-3dUDXSUJT84iDpyrQKRYQKRAMY8=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -6553,6 +7058,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cliui/-/cliui-7.0.4.tgz", "integrity": "sha1-oCZe5lVHb8gHrqnfPfjfd4OAi08=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -6564,6 +7070,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha1-wZ/Zvbv4WUK0/ZechNz31fB8I4c=", "dev": true, + "license": "MIT", "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -6577,6 +7084,7 @@ "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/clone-response/-/clone-response-1.0.3.tgz", "integrity": "sha1-ryAyqkeBY5nPXwodDbkC9ReruMM=", + "license": "MIT", "dependencies": { "mimic-response": "^1.0.0" }, @@ -6589,6 +7097,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true, + "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" @@ -6598,13 +7107,15 @@ "version": "1.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", "integrity": "sha1-wLKbzTO80HeaE0TCE2BR5q/T2ek=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "1.1.3" } @@ -6613,13 +7124,15 @@ "version": "1.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-support/-/color-support-1.1.3.tgz", "integrity": "sha1-k4NDeaHMmgxh+C9S8NBDIiUb1aI=", "dev": true, + "license": "ISC", "bin": { "color-support": "bin.js" } @@ -6628,13 +7141,15 @@ "version": "2.0.20", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/colorette/-/colorette-2.0.20.tgz", "integrity": "sha1-nreT5oMwZ/cjWQL807CZF6AAqVo=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/colors": { "version": "1.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/colors/-/colors-1.4.0.tgz", "integrity": "sha1-xQSRR51MG9rtLJztMs98fcI2D3g=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -6644,6 +7159,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -6655,13 +7171,15 @@ "version": "2.20.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/commander/-/commander-2.20.3.tgz", "integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/comment-parser": { "version": "1.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/comment-parser/-/comment-parser-1.3.1.tgz", "integrity": "sha1-PX6jra+TRVlK7e5lY/QiNI8WXBs=", "dev": true, + "license": "MIT", "engines": { "node": ">= 12.0.0" } @@ -6670,7 +7188,8 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/components.authentication": { "resolved": "src/Components/WebAssembly/WebAssembly.Authentication/src/Interop", @@ -6681,6 +7200,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/compress-commons/-/compress-commons-4.1.2.tgz", "integrity": "sha1-ZULlnLY+H0aoshsOBvmjLkyLBt8=", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", @@ -6696,6 +7216,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/compressing/-/compressing-1.10.1.tgz", "integrity": "sha1-RvHK5tihhF6EqVUjm0GbrJHFZqM=", "dev": true, + "license": "MIT", "dependencies": { "@eggjs/yauzl": "^2.11.0", "flushwritable": "^1.0.0", @@ -6716,6 +7237,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/bl/-/bl-1.2.3.tgz", "integrity": "sha1-Ho3YAULqyA1xWMnczAR/tiDgNec=", "dev": true, + "license": "MIT", "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -6726,6 +7248,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/iconv-lite/-/iconv-lite-0.5.2.tgz", "integrity": "sha1-r21ijcz7RjtzZNl/cV5LdLjIwrg=", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -6738,6 +7261,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha1-fe8D0kMtyuS6HWEURcSDlgYiVfY=", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -6750,6 +7274,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha1-kRJegEK7obmIf0k0X2J3Anzovps=", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -6764,13 +7289,15 @@ "version": "5.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/compressing/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -6780,6 +7307,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-stream/-/tar-stream-1.6.2.tgz", "integrity": "sha1-jqVdqzeXIlPZqa+Q/c1VmuQ1xVU=", "dev": true, + "license": "MIT", "dependencies": { "bl": "^1.0.0", "buffer-alloc": "^1.2.0", @@ -6797,13 +7325,15 @@ "version": "0.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/connect/-/connect-3.7.0.tgz", "integrity": "sha1-XUk0iRDKpeB6AYALAw0MNfIEhPg=", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "finalhandler": "1.1.2", @@ -6819,6 +7349,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -6827,19 +7358,22 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/constant-case": { "version": "3.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/constant-case/-/constant-case-3.0.4.tgz", "integrity": "sha1-O4Sprq9M8x7EXmv13pG9+wWJ+vE=", "dev": true, + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -6850,13 +7384,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/content-type/-/content-type-1.0.5.tgz", "integrity": "sha1-i3cxYmVtHRCGeEyPI6VM5tc9eRg=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6865,13 +7401,15 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha1-S1YPZJ/E6RjdCrdc9JYei8iC2Co=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cookie/-/cookie-0.4.2.tgz", "integrity": "sha1-DkHyTeXs8xeUfIL8eJ4GqISCRDI=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -6881,6 +7419,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js/-/core-js-3.37.1.tgz", "integrity": "sha1-0hdR3bdWUYrFoA5NZkmd+YGmLbk=", "hasInstallScript": true, + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -6891,6 +7430,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-js-compat/-/core-js-compat-3.37.1.tgz", "integrity": "sha1-yEQxDHhS9L30m40zlzC5fhf/Ce4=", "dev": true, + "license": "MIT", "dependencies": { "browserslist": "^4.23.0" }, @@ -6903,13 +7443,15 @@ "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha1-pgQtNjTCsn6TKPg3uWX6yDgI24U=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cors/-/cors-2.8.5.tgz", "integrity": "sha1-6sEdpRWS3Ya58G9uesKTs9+HXSk=", "dev": true, + "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -6923,6 +7465,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cosmiconfig/-/cosmiconfig-9.0.0.tgz", "integrity": "sha1-NMP8WCh7kV866QWrbcPeJYtVrZ0=", "dev": true, + "license": "MIT", "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -6948,13 +7491,15 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/argparse/-/argparse-2.0.1.tgz", "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/cosmiconfig/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha1-wftl+PUBeQHN0slRhkuhhFihBgI=", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -6967,6 +7512,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/crc-32/-/crc-32-1.2.2.tgz", "integrity": "sha1-PK01qTS4v3HyXKUkttpR+36s4v8=", "dev": true, + "license": "Apache-2.0", "bin": { "crc32": "bin/crc32.njs" }, @@ -6979,6 +7525,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/crc32-stream/-/crc32-stream-4.0.3.tgz", "integrity": "sha1-hd1nfrePp8rRuhfMUGpZfUH8bzM=", "dev": true, + "license": "MIT", "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" @@ -6992,6 +7539,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/create-jest/-/create-jest-29.7.0.tgz", "integrity": "sha1-o1XFs8seGvAroXf+ev1/7uSaUyA=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -7013,6 +7561,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -7028,6 +7577,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -7044,6 +7594,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -7055,13 +7606,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/create-jest/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7071,6 +7624,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -7082,12 +7636,14 @@ "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/create-require/-/create-require-1.1.1.tgz", "integrity": "sha1-wdfo8eX2z8n/ZfnNNS03NIdWwzM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7100,7 +7656,8 @@ "node_modules/crypto-js": { "version": "4.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha1-TZMWOezf0S/4DoGG26avLC6FZjE=" + "integrity": "sha1-TZMWOezf0S/4DoGG26avLC6FZjE=", + "license": "MIT" }, "node_modules/css-shorthand-properties": { "version": "1.1.1", @@ -7118,13 +7675,15 @@ "version": "0.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cssom/-/cssom-0.5.0.tgz", "integrity": "sha1-0lT6ks2Lb72DgRufuu00ZjzBfDY=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cssstyle": { "version": "2.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha1-/2ZaDdvcMYZLCWR/NBY0Q9kLCFI=", "dev": true, + "license": "MIT", "dependencies": { "cssom": "~0.3.6" }, @@ -7136,19 +7695,22 @@ "version": "0.3.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cssom/-/cssom-0.3.8.tgz", "integrity": "sha1-nxJ29bK0Y/IRTT8sdSUK+MGjb0o=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/custom-event": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/custom-event/-/custom-event-1.0.1.tgz", "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", "integrity": "sha1-ili7ZzhLJho47xi+oYEMsBut0os=", "dev": true, + "license": "MIT", "engines": { "node": ">= 14" } @@ -7158,6 +7720,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/data-urls/-/data-urls-3.0.2.tgz", "integrity": "sha1-nPJKR3riK871zV9vC/vB0tO+kUM=", "dev": true, + "license": "MIT", "dependencies": { "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", @@ -7172,6 +7735,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/date-format/-/date-format-4.0.14.tgz", "integrity": "sha1-eo5YRDT7FppSHIt6pIHzVYENlAA=", "dev": true, + "license": "MIT", "engines": { "node": ">=4.0" } @@ -7181,6 +7745,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-3.2.7.tgz", "integrity": "sha1-clgLfpFF+zm2Z2+cXl+xALk0F5o=", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.1.1" } @@ -7189,13 +7754,15 @@ "version": "10.4.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/decimal.js/-/decimal.js-10.4.3.tgz", "integrity": "sha1-EEQJKITSRdG39lcl+krUxveBzCM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/decode-uri-component": { "version": "0.2.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/decode-uri-component/-/decode-uri-component-0.2.2.tgz", "integrity": "sha1-5p2+JdN5QRcd1UDgJMREzVGI4ek=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10" } @@ -7204,6 +7771,7 @@ "version": "6.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha1-yjh2Et234QS9FthaqwDV7PCcZvw=", + "license": "MIT", "dependencies": { "mimic-response": "^3.1.0" }, @@ -7218,6 +7786,7 @@ "version": "3.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha1-LR1Zr5wbEpgVrMwsRqAipc4fo8k=", + "license": "MIT", "engines": { "node": ">=10" }, @@ -7230,6 +7799,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/dedent/-/dedent-1.5.3.tgz", "integrity": "sha1-ma7hnrm65VpnMncXtuhI0L93flo=", "dev": true, + "license": "MIT", "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, @@ -7243,13 +7813,15 @@ "version": "0.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha1-pvLc5hL63S7x9Rm3NVHxfoUZmDE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha1-RLXyFHzTsA1LVhN2hZZvJv0l3Uo=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7258,6 +7830,7 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/defer-to-connect/-/defer-to-connect-2.0.1.tgz", "integrity": "sha1-gBa9tBQ+RjK3ejRJxiNid95SBYc=", + "license": "MIT", "engines": { "node": ">=10" } @@ -7267,6 +7840,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha1-iU3BQbt9MGCuQ2b2oBB+aPvkjF4=", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -7284,6 +7858,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha1-EHgcxhbrlRqAoDS6/Kpzd/avK2w=", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -7301,6 +7876,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/degenerator/-/degenerator-5.0.1.tgz", "integrity": "sha1-lAO/KXxtrZoezkCbN9snlU+R8vU=", "dev": true, + "license": "MIT", "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -7315,6 +7891,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/del/-/del-6.1.1.tgz", "integrity": "sha1-O3AxTx7AqjJcaxTrNrlXhmce23o=", "dev": true, + "license": "MIT", "dependencies": { "globby": "^11.0.1", "graceful-fs": "^4.2.4", @@ -7337,6 +7914,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7357,6 +7935,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -7372,6 +7951,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -7380,13 +7960,15 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/depd/-/depd-2.0.0.tgz", "integrity": "sha1-tpYWPMdXVg0JzyLMj60Vcbeedt8=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -7396,6 +7978,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/destroy/-/destroy-1.2.0.tgz", "integrity": "sha1-SANzVQmti+VSk0xn32FPlOZvoBU=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -7406,6 +7989,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/detect-newline/-/detect-newline-3.1.0.tgz", "integrity": "sha1-V29d/GOuGhkv8ZLYrTr2MImRtlE=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7414,13 +7998,15 @@ "version": "2.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/detect-node/-/detect-node-2.1.0.tgz", "integrity": "sha1-yccHdaScPQO8LAbZpzvlUPl4+LE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/devtools": { "version": "6.12.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools/-/devtools-6.12.1.tgz", "integrity": "sha1-8CmMbW9G2NO3Ud2PpKDHvHbhJo8=", "dev": true, + "license": "MIT", "dependencies": { "@wdio/config": "6.12.1", "@wdio/logger": "6.10.10", @@ -7437,22 +8023,25 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1286932", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.1286932.tgz", - "integrity": "sha1-IwNwcDRCb+CzkBJxPUtzOffbyBU=", - "dev": true + "version": "0.0.1299070", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz", + "integrity": "sha1-s+TPC2eKRvD5B65uB+A606U8AN8=", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/di": { "version": "0.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/di/-/di-0.0.1.tgz", "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/diff/-/diff-4.0.2.tgz", "integrity": "sha1-YPOuy4nV+uUgwRqhnvwruYKq3n0=", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -7462,6 +8051,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/diff-sequences/-/diff-sequences-26.6.2.tgz", "integrity": "sha1-SLqZFX3hkjQS7tQdtrbUqpynwLE=", "dev": true, + "license": "MIT", "engines": { "node": ">= 10.14.2" } @@ -7471,6 +8061,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=", "dev": true, + "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -7483,6 +8074,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -7495,6 +8087,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/dom-serialize/-/dom-serialize-2.2.1.tgz", "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", "dev": true, + "license": "MIT", "dependencies": { "custom-event": "~1.0.0", "ent": "~2.2.0", @@ -7507,6 +8100,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/domexception/-/domexception-4.0.0.tgz", "integrity": "sha1-StG+VsytyG/HbQMzU5magDfQNnM=", "dev": true, + "license": "MIT", "dependencies": { "webidl-conversions": "^7.0.0" }, @@ -7519,6 +8113,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/dot-case/-/dot-case-3.0.4.tgz", "integrity": "sha1-mytnDQCkMWZ6inW6Kc0bmICc51E=", "dev": true, + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" @@ -7528,7 +8123,8 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/dotnet-runtime": { "resolved": "src/Components/dotnet-runtime-js", @@ -7544,19 +8140,22 @@ "version": "0.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha1-aWzi7Aqg5uqTo5f/zySqeEDIJ8s=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/edge-launcher": { "version": "1.2.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/edge-launcher/-/edge-launcher-1.2.2.tgz", "integrity": "sha1-60Cq+9Bnpup27/+rBke81VCbN7I=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/edge-paths": { "version": "2.2.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/edge-paths/-/edge-paths-2.2.1.tgz", "integrity": "sha1-0tkVEyJcBlFK6smEO/zlRqu/Q5E=", "dev": true, + "license": "MIT", "dependencies": { "@types/which": "^1.3.2", "which": "^2.0.2" @@ -7566,19 +8165,38 @@ "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha1-aauDWLFOiW+AzDnmIIe4hQDDrDs=", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/electron-to-chromium": { - "version": "1.4.798", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz", - "integrity": "sha1-aj/Ksu3B5m44g0Zva0uJRDI8AWQ=", - "dev": true + "version": "1.4.827", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/electron-to-chromium/-/electron-to-chromium-1.4.827.tgz", + "integrity": "sha1-dgaO0ccd05Y+G+/IroFQBLLaagI=", + "dev": true, + "license": "ISC" }, "node_modules/emittery": { "version": "0.13.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/emittery/-/emittery-0.13.1.tgz", "integrity": "sha1-wEuMNFdJDghHrlH87Tr1LTOOPa0=", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -7590,13 +8208,15 @@ "version": "8.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/emojis-list": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -7606,6 +8226,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -7614,6 +8235,7 @@ "version": "0.1.13", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/encoding/-/encoding-0.1.13.tgz", "integrity": "sha1-VldK/deR9UqOmyeFwFgqLSYhD6k=", + "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -7623,6 +8245,7 @@ "version": "0.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha1-pS+AvzjaGVLrXGgXkHGYcaGnJQE=", + "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -7635,15 +8258,17 @@ "version": "1.4.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=", + "license": "MIT", "dependencies": { "once": "^1.4.0" } }, "node_modules/engine.io": { - "version": "6.5.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/engine.io/-/engine.io-6.5.4.tgz", - "integrity": "sha1-aCLevzJOeBrdIlTpEvhWhQiFDNw=", + "version": "6.5.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/engine.io/-/engine.io-6.5.5.tgz", + "integrity": "sha1-QwuA2IQMqrkaUOniPLVRRVGV/JM=", "dev": true, + "license": "MIT", "dependencies": { "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", @@ -7654,17 +8279,18 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", - "ws": "~8.11.0" + "ws": "~8.17.1" }, "engines": { "node": ">=10.2.0" } }, "node_modules/engine.io-parser": { - "version": "5.2.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/engine.io-parser/-/engine.io-parser-5.2.2.tgz", - "integrity": "sha1-N7SOLSMRaRmjRTc4xXIEVeZOHEk=", + "version": "5.2.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha1-ANxbl7HyM6I8k5jQIJUEz1+U2S8=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -7674,6 +8300,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -7690,19 +8317,21 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/engine.io/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.11.0.tgz", - "integrity": "sha1-ag02uO39n5bYslaD2y+Nfebo4UM=", + "version": "8.17.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.1.tgz", + "integrity": "sha1-kpPaUwu1SP68lTcdkPnIeHJ9kZs=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -7728,16 +8357,24 @@ } }, "node_modules/ent": { - "version": "2.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true + "version": "2.2.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ent/-/ent-2.2.1.tgz", + "integrity": "sha1-aNyZoALxFXksJiObrtquqecMDKI=", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^1.4.1" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/entities/-/entities-4.5.0.tgz", "integrity": "sha1-XSaOpecRPsdMTQM7eepaNaSI+0g=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -7750,6 +8387,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha1-QgOZ1BbOH76bwKB8Yvpo1n/Q+PI=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -7759,6 +8397,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/envinfo/-/envinfo-7.13.0.tgz", "integrity": "sha1-gfu4Hl2jXXToFJQa6rfDJaYG+zE=", "dev": true, + "license": "MIT", "bin": { "envinfo": "dist/cli.js" }, @@ -7770,13 +8409,15 @@ "version": "2.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/err-code/-/err-code-2.0.3.tgz", "integrity": "sha1-I8Lzt1b/38YI0w4nyalBAkgH5/k=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/errno": { "version": "0.1.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/errno/-/errno-0.1.8.tgz", "integrity": "sha1-i7Ppx9Rjvkl2/4iPdrSAnrwugR8=", "dev": true, + "license": "MIT", "dependencies": { "prr": "~1.0.1" }, @@ -7789,6 +8430,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", "dev": true, + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } @@ -7798,6 +8440,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha1-x/rvvf+LJpbPX0aSHt+3fMS6OEU=", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -7810,33 +8453,38 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha1-BfdaJdq5jk+x3NXhRywFRtUFfI8=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-module-lexer": { - "version": "1.5.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es-module-lexer/-/es-module-lexer-1.5.3.tgz", - "integrity": "sha1-JZaUGd6cCx++VCeXiQI+ipp4hBI=", - "dev": true + "version": "1.5.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha1-qO/sOj2pkeYO+mtjOnytarjSa3g=", + "dev": true, + "license": "MIT" }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha1-njr0B0Wd7tR+mpH5uIWoTrBcVh0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/es6-promise": { "version": "4.2.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/es6-promise/-/es6-promise-4.2.8.tgz", "integrity": "sha1-TrIVlMlyvEBVPSduUQU5FD21Pgo=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escalade/-/escalade-3.1.2.tgz", "integrity": "sha1-VAdumrKepb89jx7WKs/7uIJy3yc=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -7845,13 +8493,15 @@ "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -7861,6 +8511,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha1-upO7t6Q5htKdYEH5n1Ji2nc+Lhc=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -7882,6 +8533,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha1-LupSkHAvJquP5TcDcP+GyWXSESM=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -7891,6 +8543,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint/-/eslint-8.57.0.tgz", "integrity": "sha1-x4am/Q4LaJQar2JFlvuYcIkZVmg=", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -7946,6 +8599,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz", "integrity": "sha1-bOUSQy1XZ1Jl+sRykrUNHv8RrNY=", "dev": true, + "license": "MIT", "peerDependencies": { "eslint": ">=7.7.0" } @@ -7955,6 +8609,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-44.2.7.tgz", "integrity": "sha1-Xs20bd/KIJ7NWP/5cqTrdLjd5Zk=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@es-joy/jsdoccomment": "~0.39.4", "are-docs-informative": "^0.0.2", @@ -7977,6 +8632,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -7994,6 +8650,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -8005,13 +8662,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { "version": "7.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -8024,6 +8683,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", "integrity": "sha1-5/uz+kzYT/EBW5xRrYZVDlUEEEE=", "dev": true, + "license": "MIT", "peerDependencies": { "eslint": ">=2.0.0" } @@ -8033,6 +8693,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha1-54blmmbLkrP2wfsNUIqrF0hI9Iw=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -8046,6 +8707,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha1-DNcv6FUOPC6uFWqWpN3c0cisWAA=", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -8058,6 +8720,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -8072,13 +8735,15 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/argparse/-/argparse-2.0.1.tgz", "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8095,6 +8760,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -8106,13 +8772,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eslint/node_modules/debug": { "version": "4.3.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -8130,6 +8798,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -8142,6 +8811,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha1-3rT5JWM5DzIAaJSvYqItuhxGQj8=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -8158,6 +8828,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha1-LupSkHAvJquP5TcDcP+GyWXSESM=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -8167,6 +8838,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/find-up/-/find-up-5.0.0.tgz", "integrity": "sha1-TJKBnstwg1YeT0okCoa+UZj1Nvw=", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -8183,6 +8855,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globals/-/globals-13.24.0.tgz", "integrity": "sha1-hDKhnXjODB6DOUnDats0VAC7EXE=", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -8198,6 +8871,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -8207,6 +8881,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha1-wftl+PUBeQHN0slRhkuhhFihBgI=", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -8219,6 +8894,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha1-VTIeswn+u8WcSAHZMackUqaB0oY=", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -8233,13 +8909,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eslint/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha1-g8gxXGeFAF470CGDlBHJ4RDm2DQ=", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -8255,6 +8933,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -8267,6 +8946,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -8279,6 +8959,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/espree/-/espree-9.6.1.tgz", "integrity": "sha1-oqF7jkNGkKVDLy+AGM5x0zGkjG8=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -8296,6 +8977,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/esprima/-/esprima-4.0.1.tgz", "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -8305,10 +8987,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha1-bOF3ON6Fd2lO3XNhxXGCrIyw2ws=", + "version": "1.6.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha1-kUGSNPgE2FKoLc7sPhbNwiz52uc=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -8321,6 +9004,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha1-LupSkHAvJquP5TcDcP+GyWXSESM=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -8330,6 +9014,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -8342,6 +9027,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha1-LupSkHAvJquP5TcDcP+GyWXSESM=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -8351,6 +9037,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -8359,13 +9046,15 @@ "version": "2.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha1-UvAQF4wqTBF6d1fP6UKtt9LaTKw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/esutils/-/esutils-2.0.3.tgz", "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -8374,6 +9063,7 @@ "version": "5.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha1-XU0+vflYPWOlMzzi3rdICrKwV4k=", + "license": "MIT", "engines": { "node": ">=6" } @@ -8382,13 +9072,15 @@ "version": "4.0.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha1-Lem2j2Uo1WRO9cWVJqG0oHMGFp8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/events": { "version": "3.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/events/-/events-3.3.0.tgz", "integrity": "sha1-Mala0Kkk4tLEGagTrrLE6HjqdAA=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -8397,6 +9089,7 @@ "version": "2.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eventsource/-/eventsource-2.0.2.tgz", "integrity": "sha1-dt/MApMPsv8zlSC20pDaVzqehQg=", + "license": "MIT", "engines": { "node": ">=12.0.0" } @@ -8406,6 +9099,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/execa/-/execa-5.1.1.tgz", "integrity": "sha1-+ArZy/Qpj3vR1MlVXCHpN0HEEd0=", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -8438,6 +9132,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/expect/-/expect-29.7.0.tgz", "integrity": "sha1-V4h0WQ3LMhRRQITAgRXYruYeEbw=", "dev": true, + "license": "MIT", "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", @@ -8453,19 +9148,22 @@ "version": "3.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/exponential-backoff/-/exponential-backoff-3.1.1.tgz", "integrity": "sha1-ZKx1Jv40GrGKOQFs0ix4fQHgC/Y=", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/extend/-/extend-3.0.2.tgz", "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha1-Zj3KVv5G34kNXxMe9KBtIruLoTo=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -8486,6 +9184,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -8503,6 +9202,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha1-SWaheV7lrOZecGxLe+txJX1uItM=", "dev": true, + "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -8517,25 +9217,29 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-fifo/-/fast-fifo-1.3.2.tgz", "integrity": "sha1-KG4x3pbrltOKl4mYFXQLoqTzZAw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha1-qQRQHlfP3S/83tRemaVP71XkYSk=", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -8552,6 +9256,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -8563,19 +9268,29 @@ "version": "2.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha1-zd0u7PyDpxwb4swu8gYTMb6KcTQ=", + "dev": true, + "license": "MIT" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha1-IQ5htv8YHekeqbPRuE/e3UfgNOU=", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.9.1" } @@ -8585,6 +9300,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fastq/-/fastq-1.17.1.tgz", "integrity": "sha1-KlI/B6TnsegaQrkbi/IlQQd1O0c=", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -8594,6 +9310,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fb-watchman/-/fb-watchman-2.0.2.tgz", "integrity": "sha1-6VJO5rXHfp5QAa8PhfOtu4YjJVw=", "dev": true, + "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -8602,6 +9319,7 @@ "version": "1.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "license": "MIT", "dependencies": { "pend": "~1.2.0" } @@ -8611,6 +9329,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fd-slicer2/-/fd-slicer2-1.2.0.tgz", "integrity": "sha1-osVKVAY5u81HAkgIIXcTQSd8og4=", "dev": true, + "license": "MIT", "dependencies": { "pend": "^1.2.0" } @@ -8619,6 +9338,7 @@ "version": "2.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fetch-cookie/-/fetch-cookie-2.2.0.tgz", "integrity": "sha1-AQhra1scPgjxX/2GR7AsoQA3c2U=", + "license": "Unlicense", "dependencies": { "set-cookie-parser": "^2.4.8", "tough-cookie": "^4.0.0" @@ -8629,6 +9349,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha1-IRst2WWcsDlLBz5zI6w8kz1SICc=", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -8636,11 +9357,45 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha1-94l4oelEd1/55i50RCTyFeWDUrU=", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha1-HPy4z1Ui6mmVLNKvla4JR38SKpY=", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/filemanager-webpack-plugin": { "version": "8.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/filemanager-webpack-plugin/-/filemanager-webpack-plugin-8.0.0.tgz", "integrity": "sha1-2aZoMSJQSppHrB+4VR8kHbuNAX0=", "dev": true, + "license": "MIT", "dependencies": { "@types/archiver": "^5.3.1", "archiver": "^5.3.1", @@ -8663,6 +9418,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/filesize/-/filesize-6.4.0.tgz", "integrity": "sha1-kU9QRx3Wb9yjzv5ii9DN5O92m80=", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">= 0.4.0" } @@ -8672,6 +9428,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha1-RCZdPKwH4+p9wkdRY4BkN1SgUpI=", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -8684,6 +9441,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/filter-obj/-/filter-obj-1.1.0.tgz", "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -8693,6 +9451,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/finalhandler/-/finalhandler-1.1.2.tgz", "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", "dev": true, + "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -8711,6 +9470,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -8719,13 +9479,15 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/finalhandler/node_modules/on-finished": { "version": "2.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", "dev": true, + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -8738,6 +9500,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/find-up/-/find-up-4.1.0.tgz", "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -8751,6 +9514,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/flat/-/flat-5.0.2.tgz", "integrity": "sha1-jKb+MyBp/6nTJMMnGYxZglnOskE=", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } @@ -8760,6 +9524,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha1-LAwtUEDJmxYydxqdEFclwBFTY+4=", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -8774,6 +9539,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8794,6 +9560,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -8808,13 +9575,15 @@ "version": "3.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/flatted/-/flatted-3.3.1.tgz", "integrity": "sha1-IdtHBymmc01JlwAvQ5yzCJh/Vno=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/flushwritable": { "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/flushwritable/-/flushwritable-1.0.0.tgz", "integrity": "sha1-PjKNj95BKtR+c44751C00pAENJg=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/follow-redirects": { "version": "1.15.6", @@ -8827,6 +9596,7 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -8837,10 +9607,11 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha1-HRc+d2110ncv7Qjv5KDeHqGxLQ0=", + "version": "3.2.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha1-dnAEzPOlsw3zm+2QcYurQ/4KWfc=", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -8857,6 +9628,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha1-lSGIwcvVRgcOLdIND0HArgUwywQ=", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -8869,6 +9641,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/form-data/-/form-data-4.0.0.tgz", "integrity": "sha1-k5Gdrq82HuUpWEubMWZNwSyfpFI=", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -8879,20 +9652,23 @@ } }, "node_modules/fp-ts": { - "version": "2.16.6", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fp-ts/-/fp-ts-2.16.6.tgz", - "integrity": "sha1-nWPFsqBjVdYnrpTDelz/2lxFXSQ=", - "dev": true + "version": "2.16.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fp-ts/-/fp-ts-2.16.8.tgz", + "integrity": "sha1-36HqHJZ6xnlMQ86HeuuO129eDfc=", + "dev": true, + "license": "MIT" }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=" + "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=", + "license": "MIT" }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha1-Aoc8+8QITd4SfqpfmQXu8jJdGr8=", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -8907,6 +9683,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-minipass/-/fs-minipass-3.0.3.tgz", "integrity": "sha1-eahZgcTcEgBl6W9iCGv2+dwmzFQ=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -8919,6 +9696,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -8927,13 +9705,15 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha1-ysZAd4XQNnWipeGlMFxpezR9kNY=", "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -8947,6 +9727,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha1-LALYZNl/PqbIgwxGTL0Rq26rehw=", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8960,6 +9741,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/gauge/-/gauge-4.0.4.tgz", "integrity": "sha1-Uv8GUvK79gepiXk9U7dRvvIyjc4=", "dev": true, + "license": "ISC", "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.3", @@ -8979,6 +9761,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -8988,6 +9771,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -8997,6 +9781,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha1-44X1pLUifUScPqu60FSU7wq76t0=", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -9016,6 +9801,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha1-jeLYA8/0TfO8bEVuZmizbDkm4Ro=", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -9025,6 +9811,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-port/-/get-port-5.1.1.tgz", "integrity": "sha1-BGntB1Y0ed5u+5hrrwU9zX1OMZM=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -9036,13 +9823,15 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-ready/-/get-ready-1.0.0.tgz", "integrity": "sha1-+RgX8emt7P6hOlYq38jeiDqzR4I=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha1-omLY7vZ6ztV8KFKtYWdSakPL97c=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -9055,6 +9844,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/get-uri/-/get-uri-6.0.3.tgz", "integrity": "sha1-DSZpe8E8+RCS5RmqY6pg7ltvOFo=", "dev": true, + "license": "MIT", "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", @@ -9070,6 +9860,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -9087,6 +9878,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-extra/-/fs-extra-11.2.0.tgz", "integrity": "sha1-5w4X361kIyKH0BkpOZ4Op8hrDls=", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -9100,13 +9892,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-8.1.0.tgz", "integrity": "sha1-04j2Vlk+9wjuPjRkD9+5mp/Rwz4=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -9126,6 +9920,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha1-bSN9mQg5UMeSkPJMdkKj3poo+eM=", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -9137,13 +9932,15 @@ "version": "0.4.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha1-x1KXCHyFG5pXi9IX3VmpL1n+VG4=", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -9153,6 +9950,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha1-HPy4z1Ui6mmVLNKvla4JR38SKpY=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -9165,6 +9963,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/global-agent/-/global-agent-2.2.0.tgz", "integrity": "sha1-VmMxsGRua/eUKaFod2hcSh+/dtw=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "boolean": "^3.0.1", "core-js": "^3.6.5", @@ -9183,6 +9982,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -9195,6 +9995,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globals/-/globals-11.12.0.tgz", "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -9204,6 +10005,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globalthis/-/globalthis-1.0.4.tgz", "integrity": "sha1-dDDtOpddl7+1m8zkH1yruvplEjY=", "dev": true, + "license": "MIT", "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" @@ -9220,6 +10022,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/globby/-/globby-11.1.0.tgz", "integrity": "sha1-vUvpi7BC+D15b344EZkfvoKg00s=", "dev": true, + "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -9240,6 +10043,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/gopd/-/gopd-1.0.1.tgz", "integrity": "sha1-Kf923mnax0ibfAkYpXiOVkd8Myw=", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -9251,6 +10055,7 @@ "version": "11.8.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/got/-/got-11.8.6.tgz", "integrity": "sha1-J26Cfq2Hcu3bz8lxcFkLhBgjIzo=", + "license": "MIT", "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", @@ -9274,25 +10079,29 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha1-QYPk6L8Iu24Fu7L30uDI9xLKQOM=" + "integrity": "sha1-QYPk6L8Iu24Fu7L30uDI9xLKQOM=", + "license": "ISC" }, "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha1-nPOmZcYkdHmJaDSvNc8du0QAdn4=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha1-+y8dVeDjoYSa7/yQxPoN1ToOZsY=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/gzip-size": { "version": "6.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/gzip-size/-/gzip-size-6.0.0.tgz", "integrity": "sha1-BlNn/VDCOcBnHLy61b4+LusQ5GI=", "dev": true, + "license": "MIT", "dependencies": { "duplexer": "^0.1.2" }, @@ -9307,13 +10116,15 @@ "version": "0.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha1-Or5DrvODX4rgd9E23c4PJ2sEAOY=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -9323,6 +10134,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha1-lj7X0HHce/XwhMW/vg0bYiJYaFQ=", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -9335,6 +10147,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha1-sx3f6bDm6ZFFNqarKGQm0CFPd/0=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -9347,6 +10160,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha1-u3ssQ0klHc6HsSX3vfh0qnyLOfg=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -9358,13 +10172,15 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/hash.js": { "version": "1.1.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I=", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -9375,6 +10191,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/hasown/-/hasown-2.0.2.tgz", "integrity": "sha1-AD6vkb563DcuhOxZ3DclLO24AAM=", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -9387,6 +10204,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/header-case/-/header-case-2.0.4.tgz", "integrity": "sha1-WkLmO1UXc0nPQFvrjXdayruSwGM=", "dev": true, + "license": "MIT", "dependencies": { "capital-case": "^1.0.4", "tslib": "^2.0.3" @@ -9396,13 +10214,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/hosted-git-info": { "version": "6.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/hosted-git-info/-/hosted-git-info-6.1.1.tgz", "integrity": "sha1-YpRCx4iaacBd5gTVKZa3T+bybVg=", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^7.5.1" }, @@ -9415,6 +10235,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -9424,6 +10245,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", "integrity": "sha1-LLGozw21JBR3blsqegTV3ZgVjek=", "dev": true, + "license": "MIT", "dependencies": { "whatwg-encoding": "^2.0.0" }, @@ -9435,18 +10257,21 @@ "version": "2.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha1-39YAJ9o2o238viNiYsAKWCJoFFM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha1-q+AvyymFRgvwMjvmZENuw0dqbVo=" + "integrity": "sha1-q+AvyymFRgvwMjvmZENuw0dqbVo=", + "license": "BSD-2-Clause" }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha1-t3dKFIbvc892Z6ya4IWMASxXudM=", "dev": true, + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -9463,6 +10288,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/statuses/-/statuses-2.0.1.tgz", "integrity": "sha1-VcsADM8dSHKL0jxoWgY5mM8aG2M=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9472,6 +10298,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http-proxy/-/http-proxy-1.18.1.tgz", "integrity": "sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=", "dev": true, + "license": "MIT", "dependencies": { "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", @@ -9486,6 +10313,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha1-USmAAgNSDUNPFCvHj/PBcIAPK0M=", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -9500,6 +10328,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -9516,12 +10345,14 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/http2-wrapper": { "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http2-wrapper/-/http2-wrapper-1.0.3.tgz", "integrity": "sha1-uPVeDB8l1OvQizsMLAeflZCACz0=", + "license": "MIT", "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" @@ -9535,6 +10366,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha1-xZ7yJKBP6LdU89sAY6Jeow0ABdY=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -9548,6 +10380,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -9564,13 +10397,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha1-3JH8ukLk0G5Kuu0zs+ejwC9RTqA=", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } @@ -9580,6 +10415,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/humanize-ms/-/humanize-ms-1.2.1.tgz", "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.0.0" } @@ -9589,6 +10425,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -9613,13 +10450,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ignore/-/ignore-5.3.1.tgz", "integrity": "sha1-UHPlVM1CxbM7OUN19Ti4WT401O8=", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -9629,6 +10468,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ignore-walk/-/ignore-walk-6.0.5.tgz", "integrity": "sha1-741h6rfaFpB4cj0fgoM7NuIAsN0=", "dev": true, + "license": "ISC", "dependencies": { "minimatch": "^9.0.0" }, @@ -9641,15 +10481,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/ignore-walk/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", + "version": "9.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha1-10+d1rV9g9jpjPuCEzsDl4vJKeU=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -9665,6 +10507,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha1-NxYsJfy566oublPVtNiM4X2eDCs=", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -9681,6 +10524,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -9690,6 +10534,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/import-local/-/import-local-3.1.0.tgz", "integrity": "sha1-tEed+KX9RPbNziQHBnVnYGPJXLQ=", "dev": true, + "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -9709,6 +10554,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -9718,6 +10564,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -9726,13 +10573,15 @@ "version": "1.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/infer-owner/-/infer-owner-1.0.4.tgz", "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -9741,13 +10590,15 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=" + "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", + "license": "ISC" }, "node_modules/inspectpack": { "version": "4.7.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/inspectpack/-/inspectpack-4.7.1.tgz", "integrity": "sha1-uvCBuuC1sxu+3VNEJOZY8y1g+Xo=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "fp-ts": "^2.6.1", @@ -9769,6 +10620,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -9784,6 +10636,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -9800,6 +10653,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -9811,13 +10665,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/inspectpack/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -9827,6 +10683,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -9839,6 +10696,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/interpret/-/interpret-2.2.0.tgz", "integrity": "sha1-GnigtZZcQKVBbQB61vUK0nxBffk=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -9848,6 +10706,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/io-ts/-/io-ts-2.2.21.tgz", "integrity": "sha1-TvdUF29wgqEJnQTH1cTqUyZ8Uwo=", "dev": true, + "license": "MIT", "peerDependencies": { "fp-ts": "^2.5.0" } @@ -9857,6 +10716,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/io-ts-reporters/-/io-ts-reporters-1.2.2.tgz", "integrity": "sha1-TTIZd36lIZx9j2/6wB/WjnJCbdE=", "dev": true, + "license": "MIT", "peerDependencies": { "fp-ts": "^2.0.2", "io-ts": "^2.0.0" @@ -9867,6 +10727,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha1-EXqWCBmwh4DDvR8U7zwcwdPz6lo=", "dev": true, + "license": "MIT", "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -9879,19 +10740,22 @@ "version": "1.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha1-SRS5A6L4toXRf994pw6RfocuREo=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -9904,6 +10768,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-builtin-module/-/is-builtin-module-3.2.1.tgz", "integrity": "sha1-8DJxcX2GVM/K8HqwRj+qNXFYEWk=", "dev": true, + "license": "MIT", "dependencies": { "builtin-modules": "^3.3.0" }, @@ -9915,12 +10780,16 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha1-rQ11Msb+qdoevcgnQtdFJcYnM4Q=", + "version": "2.14.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha1-Q7jvn0amoIiI22ex/9Tsnj39WdE=", "dev": true, + "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9931,6 +10800,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha1-M+6r4jz+hvFL3kQIoCwM+4U6zao=", "dev": true, + "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -9946,6 +10816,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9955,6 +10826,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -9964,6 +10836,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-generator-fn/-/is-generator-fn-2.1.0.tgz", "integrity": "sha1-fRQK3DiarzARqPKipM+m+q3/sRg=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -9973,6 +10846,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha1-ZPYeQsu7LuwgcanawLKLoeZdUIQ=", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -9984,19 +10858,22 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-lambda/-/is-lambda-1.0.1.tgz", "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-number/-/is-number-7.0.0.tgz", "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -10006,6 +10883,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-path-cwd/-/is-path-cwd-2.2.0.tgz", "integrity": "sha1-Z9Q7gmZKe1GR/ZEZEn6zAASKn9s=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -10015,6 +10893,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha1-0jE2LlOgf/Kw4Op/7QSRYf/RYoM=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10024,6 +10903,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", "dev": true, + "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -10035,6 +10915,7 @@ "version": "3.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-port-reachable/-/is-port-reachable-3.1.0.tgz", "integrity": "sha1-9maNO8qcNrB/c3xIqPh1qwZTzSs=", + "license": "MIT", "engines": { "node": ">=8" } @@ -10043,13 +10924,15 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha1-Fx7W8Z46xVQ5Tt94yqBXhKRb67U=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-reference/-/is-reference-1.2.1.tgz", "integrity": "sha1-iy2sCzcfS8mU/eq6nrVC0DAC0Lc=", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*" } @@ -10059,6 +10942,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha1-+sHj1TuXrVqdCunO8jifWBClwHc=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -10071,6 +10955,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE=", "dev": true, + "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -10082,13 +10967,15 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/isbinaryfile": { "version": "4.0.10", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/isbinaryfile/-/isbinaryfile-4.0.10.tgz", "integrity": "sha1-DFteMMJVei8G/r03tzIpRqruQrM=", "dev": true, + "license": "MIT", "engines": { "node": ">= 8.0.0" }, @@ -10099,13 +10986,15 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "license": "ISC" }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10115,6 +11004,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha1-LRZsSwZE1Do58Ev2wu3R5YXzF1Y=", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -10124,6 +11014,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", "integrity": "sha1-0QyIhcISVXThwjHKyt+VVnXhzj0=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", @@ -10140,6 +11031,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha1-kIMFusmlvRdaxqdEier9D8JEWn0=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -10154,6 +11046,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10163,6 +11056,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10175,6 +11069,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha1-iV86cJ/PujTG3lpCk5Ai8+Q1hVE=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -10189,6 +11084,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -10205,13 +11101,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/istanbul-reports/-/istanbul-reports-3.1.7.tgz", "integrity": "sha1-2u0SueHcpRjhXAVuHlN+dBKA+gs=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -10221,16 +11119,14 @@ } }, "node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha1-p1dj/zatd47eahVtjuixJN5EW0o=", + "version": "3.4.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha1-iDOp2Jq0rN5hiJQr0cU7Y5DtWoo=", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -10238,11 +11134,107 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jake": { + "version": "10.9.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jake/-/jake-10.9.1.tgz", + "integrity": "sha1-jclrf8xByxmqUCr1BtpOHVb15is=", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jake/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true, + "license": "MIT" + }, + "node_modules/jake/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jake/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jasmine": { "version": "3.99.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jasmine/-/jasmine-3.99.0.tgz", "integrity": "sha1-fMeu2nreLVdpT8gYo3T3eMu06mI=", "dev": true, + "license": "MIT", "dependencies": { "glob": "^7.1.6", "jasmine-core": "~3.99.0" @@ -10255,13 +11247,15 @@ "version": "3.99.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jasmine-core/-/jasmine-core-3.99.1.tgz", "integrity": "sha1-W/pLLXZhiGi/rEyP8Iuyb/+kEg0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jasmine/node_modules/glob": { "version": "7.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -10282,6 +11276,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest/-/jest-29.7.0.tgz", "integrity": "sha1-mUZ2/CQXfwiPHF43N/VpcgT/JhM=", "dev": true, + "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -10308,6 +11303,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-changed-files/-/jest-changed-files-29.7.0.tgz", "integrity": "sha1-HAbQfnfHjhWF0CBCTe3BDW4XrDo=", "dev": true, + "license": "MIT", "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", @@ -10322,6 +11318,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-circus/-/jest-circus-29.7.0.tgz", "integrity": "sha1-toF6RfzINdixbVli0MAmRz7jZoo=", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -10353,6 +11350,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10368,6 +11366,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10384,6 +11383,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10395,13 +11395,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-circus/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10411,6 +11413,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -10425,6 +11428,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -10436,13 +11440,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-circus/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10455,6 +11461,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-cli/-/jest-cli-29.7.0.tgz", "integrity": "sha1-VZLJQHmODK5nfuwWkmTy2DmjeZU=", "dev": true, + "license": "MIT", "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", @@ -10488,6 +11495,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10503,6 +11511,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10519,6 +11528,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cliui/-/cliui-8.0.1.tgz", "integrity": "sha1-DASwddsCy/5g3I5s8vVIaxo2CKo=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -10533,6 +11543,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10544,13 +11555,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-cli/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10560,6 +11573,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10572,6 +11586,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs/-/yargs-17.7.2.tgz", "integrity": "sha1-mR3zmspnWhkrgW4eA2P5110qomk=", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -10590,6 +11605,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-config/-/jest-config-29.7.0.tgz", "integrity": "sha1-vL2ogG28wBseMWpGu3QIWoSwJF8=", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", @@ -10635,6 +11651,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10650,6 +11667,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10666,6 +11684,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10677,13 +11696,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-config/node_modules/glob": { "version": "7.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -10704,6 +11725,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10713,6 +11735,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -10727,6 +11750,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -10738,13 +11762,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-config/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10757,6 +11783,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-diff/-/jest-diff-26.6.2.tgz", "integrity": "sha1-GqdGi1LDpo19XF/c381eSb0WQ5Q=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^26.6.2", @@ -10772,6 +11799,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10787,6 +11815,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10803,6 +11832,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10814,13 +11844,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-diff/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10830,6 +11862,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-get-type/-/jest-get-type-26.3.0.tgz", "integrity": "sha1-6X3Dw/U8K0Bsp6+u1Ek7HQmRmeA=", "dev": true, + "license": "MIT", "engines": { "node": ">= 10.14.2" } @@ -10839,6 +11872,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10851,6 +11885,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-docblock/-/jest-docblock-29.7.0.tgz", "integrity": "sha1-j922rcPNyVXJPiqH9hz9NQ1dEZo=", "dev": true, + "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, @@ -10863,6 +11898,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-each/-/jest-each-29.7.0.tgz", "integrity": "sha1-FiqbPyMovdmRvqq/+7dHReVld9E=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", @@ -10879,6 +11915,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -10894,6 +11931,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -10910,6 +11948,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -10921,13 +11960,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-each/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -10937,6 +11978,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -10951,6 +11993,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -10962,13 +12005,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-each/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -10981,6 +12026,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", "integrity": "sha1-0gb6NVGTPD/VGeXf21ig9ROag38=", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -11008,6 +12054,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/jsdom/-/jsdom-20.0.1.tgz", "integrity": "sha1-B8FLwZvS+RjBkpVBzarK6JR0SAg=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "@types/tough-cookie": "*", @@ -11019,6 +12066,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-environment-node/-/jest-environment-node-29.7.0.tgz", "integrity": "sha1-C5PhEd2o7BILyDAObR+5V24WQ3Y=", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -11036,6 +12084,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-get-type/-/jest-get-type-29.6.3.tgz", "integrity": "sha1-NvSZ/c6hl8EEWhJzGcBIFyOQj9E=", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -11045,6 +12094,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-haste-map/-/jest-haste-map-29.7.0.tgz", "integrity": "sha1-PCOWUkSC9aBQY3bmyFjDu8wXsQQ=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", @@ -11070,6 +12120,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-jasmine2/-/jest-jasmine2-29.7.0.tgz", "integrity": "sha1-w3BOKcp9dd+1RleOfoIavFpjFKE=", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", @@ -11098,6 +12149,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11113,6 +12165,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11129,6 +12182,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11140,13 +12194,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-jasmine2/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11156,6 +12212,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -11170,6 +12227,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -11181,13 +12239,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-jasmine2/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -11200,6 +12260,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-junit/-/jest-junit-13.2.0.tgz", "integrity": "sha1-Zu64ZCmq+sjBdFpw9ErOGFqsuUM=", "dev": true, + "license": "Apache-2.0", "dependencies": { "mkdirp": "^1.0.4", "strip-ansi": "^6.0.1", @@ -11215,6 +12276,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", "integrity": "sha1-W37A2t/f7Ayjg9yaoBbTa16kxyg=", "dev": true, + "license": "MIT", "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" @@ -11228,6 +12290,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -11240,6 +12303,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -11253,13 +12317,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-matcher-utils": { "version": "29.7.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", "integrity": "sha1-ro/sef8kn9WSzoDj7kdOg6bETxI=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", @@ -11275,6 +12341,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11290,6 +12357,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11306,6 +12374,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11317,13 +12386,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-matcher-utils/node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha1-Ter4lNEUB8Ue/IQYAS+ecLhOqSE=", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -11333,6 +12404,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11342,6 +12414,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-diff/-/jest-diff-29.7.0.tgz", "integrity": "sha1-AXk0pm67fs9vIF6EaZvhCv1wRYo=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", @@ -11357,6 +12430,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -11371,6 +12445,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -11382,13 +12457,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-matcher-utils/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -11401,6 +12478,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-message-util/-/jest-message-util-29.7.0.tgz", "integrity": "sha1-i8OS4gTpXf51ZKu+cqQE4o5R9/M=", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", @@ -11421,6 +12499,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11436,6 +12515,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11452,6 +12532,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11463,13 +12544,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-message-util/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11479,6 +12562,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -11493,6 +12577,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -11504,13 +12589,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-message-util/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -11523,6 +12610,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-mock/-/jest-mock-29.7.0.tgz", "integrity": "sha1-ToNs9g6Zxvz6vp+Z0Bfz/dUKY0c=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -11537,6 +12625,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha1-kwsVRhZNStWTfVVA5xHU041MrS4=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -11554,6 +12643,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-regex-util/-/jest-regex-util-29.6.3.tgz", "integrity": "sha1-SlVtnHdq9o4cX0gZT00DJ9JOilI=", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -11563,6 +12653,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-resolve/-/jest-resolve-29.7.0.tgz", "integrity": "sha1-ZNaomS3Sb2NasMAeXu9Dmca8vDA=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", @@ -11583,6 +12674,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", "integrity": "sha1-GwTywJXzf8d2/0CAPckpIbHohCg=", "dev": true, + "license": "MIT", "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" @@ -11596,6 +12688,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11611,6 +12704,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11627,6 +12721,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11638,13 +12733,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-resolve/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11654,6 +12751,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -11666,6 +12764,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-runner/-/jest-runner-29.7.0.tgz", "integrity": "sha1-gJrwctQIpT3P0uhJpMl20xMvcY4=", "dev": true, + "license": "MIT", "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", @@ -11698,6 +12797,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11713,6 +12813,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11729,6 +12830,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11740,13 +12842,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-runner/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11756,6 +12860,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -11768,6 +12873,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-runtime/-/jest-runtime-29.7.0.tgz", "integrity": "sha1-7+yzFBz303Z6OgzI98mZBYfT2Bc=", "dev": true, + "license": "MIT", "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", @@ -11801,6 +12907,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11816,6 +12923,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11832,6 +12940,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11843,13 +12952,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-runtime/node_modules/glob": { "version": "7.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -11870,6 +12981,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11879,6 +12991,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -11891,6 +13004,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-snapshot/-/jest-snapshot-29.7.0.tgz", "integrity": "sha1-wsV0w/UYZdobsykDZ3imm/iKa+U=", "dev": true, + "license": "MIT", "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", @@ -11922,6 +13036,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -11937,6 +13052,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -11953,6 +13069,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -11964,13 +13081,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-snapshot/node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha1-Ter4lNEUB8Ue/IQYAS+ecLhOqSE=", "dev": true, + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -11980,6 +13099,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -11989,6 +13109,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-diff/-/jest-diff-29.7.0.tgz", "integrity": "sha1-AXk0pm67fs9vIF6EaZvhCv1wRYo=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", @@ -12004,6 +13125,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -12018,6 +13140,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -12029,13 +13152,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-snapshot/node_modules/semver": { "version": "7.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -12048,6 +13173,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -12060,6 +13186,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-util/-/jest-util-29.7.0.tgz", "integrity": "sha1-I8K2K/sivoK0TemAVYAv83EPwLw=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", @@ -12077,6 +13204,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -12092,6 +13220,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -12108,6 +13237,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -12119,13 +13249,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-util/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12135,6 +13267,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -12147,6 +13280,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-validate/-/jest-validate-29.7.0.tgz", "integrity": "sha1-e/cFURxk2lkdRrFfzkFADVIUfZw=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", @@ -12164,6 +13298,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -12179,6 +13314,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha1-VoW5XrIJrJwMF3Rnd4ychN9Yupo=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -12191,6 +13327,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -12207,6 +13344,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -12218,13 +13356,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-validate/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12234,6 +13374,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha1-ykLHWDEPNlv6caC9oKgHFgt3aBI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -12248,6 +13389,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -12259,13 +13401,15 @@ "version": "18.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-18.3.1.tgz", "integrity": "sha1-6DVX3BLq5jqZ4AOkY4ix3LtE234=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-validate/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -12278,6 +13422,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-watcher/-/jest-watcher-29.7.0.tgz", "integrity": "sha1-eBDTDWGcOmIJMiPOa7NZyhsoovI=", "dev": true, + "license": "MIT", "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", @@ -12297,6 +13442,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -12312,6 +13458,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -12328,6 +13475,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -12339,13 +13487,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jest-watcher/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12355,6 +13505,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -12367,6 +13518,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha1-rK0HOsu663JivVOJ4bz0PhAFjUo=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", @@ -12382,6 +13534,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12391,6 +13544,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha1-zW/BfihQDP9WwbhsCn/UpUpzAFw=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -12405,13 +13559,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc=", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -12424,13 +13580,15 @@ "version": "1.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", "integrity": "sha1-E28FcamcGE2E7IRmLEXCnO/3ERQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=12.0.0" } @@ -12440,6 +13598,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsdom/-/jsdom-20.0.3.tgz", "integrity": "sha1-iGpBuh1HJvZ6iFgCjJlIn+1q1Ns=", "dev": true, + "license": "MIT", "dependencies": { "abab": "^2.0.6", "acorn": "^8.8.1", @@ -12481,10 +13640,11 @@ } }, "node_modules/jsdom/node_modules/ws": { - "version": "8.17.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.0.tgz", - "integrity": "sha1-0UXRjsou0lqveRoYOQP3vl4pX+o=", + "version": "8.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.18.0.tgz", + "integrity": "sha1-DXUFpur+Kw5xLSMrQiefU7wom7w=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -12506,6 +13666,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -12516,37 +13677,43 @@ "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha1-kziAKjDTtmBfvgYT4JQAjKjAWhM=" + "integrity": "sha1-kziAKjDTtmBfvgYT4JQAjKjAWhM=", + "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha1-fEeAWpQxmSjgV3dAXcEuH3pO4C0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json5/-/json5-2.2.3.tgz", "integrity": "sha1-eM1vGhm9wStz21rQxh79ZsHikoM=", "dev": true, + "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -12558,6 +13725,7 @@ "version": "6.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha1-vFWyY0eTxnnsZAMJTrE2mKbsCq4=", + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -12572,13 +13740,15 @@ "dev": true, "engines": [ "node >= 0.2.0" - ] + ], + "license": "MIT" }, "node_modules/karma": { "version": "6.4.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma/-/karma-6.4.3.tgz", "integrity": "sha1-dj5QD5lZchi7tTbeGhSsxM7qfOg=", "dev": true, + "license": "MIT", "dependencies": { "@colors/colors": "1.5.0", "body-parser": "^1.19.0", @@ -12617,6 +13787,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", "integrity": "sha1-65yVAk8tbfuzdI00FaybOBkGuak=", "dev": true, + "license": "MIT", "dependencies": { "which": "^1.2.1" } @@ -12626,6 +13797,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-1.3.1.tgz", "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -12638,6 +13810,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-edge-launcher/-/karma-edge-launcher-0.4.2.tgz", "integrity": "sha1-PZUpsJsTyQnF887uEtAOf5qYmz0=", "dev": true, + "license": "MIT", "dependencies": { "edge-launcher": "1.2.2" }, @@ -12653,6 +13826,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-firefox-launcher/-/karma-firefox-launcher-2.1.3.tgz", "integrity": "sha1-sniky/+pKrgTlLGjmIE4R7BiSoU=", "dev": true, + "license": "MIT", "dependencies": { "is-wsl": "^2.2.0", "which": "^3.0.0" @@ -12663,6 +13837,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-3.0.1.tgz", "integrity": "sha1-ifHNDCP2KagQX/5puBcnkch7S+E=", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -12678,6 +13853,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-ie-launcher/-/karma-ie-launcher-1.0.0.tgz", "integrity": "sha1-SXmGhCxJAZA0bNifVJTKmDDG1Zw=", "dev": true, + "license": "MIT", "dependencies": { "lodash": "^4.6.1" }, @@ -12690,6 +13866,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-jasmine/-/karma-jasmine-4.0.2.tgz", "integrity": "sha1-OG2yo+GswK9SZccR9nP3jx5JON4=", "dev": true, + "license": "MIT", "dependencies": { "jasmine-core": "^3.6.0" }, @@ -12705,6 +13882,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-junit-reporter/-/karma-junit-reporter-2.0.1.tgz", "integrity": "sha1-007vfwsv0GTgiWlU6IUakM8UyPM=", "dev": true, + "license": "MIT", "dependencies": { "path-is-absolute": "^1.0.0", "xmlbuilder": "12.0.0" @@ -12721,6 +13899,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz", "integrity": "sha1-FRIAlejtgZGG5HoLAS8810GJVWA=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^2.1.0", "log-symbols": "^2.1.0", @@ -12735,6 +13914,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-regex/-/ansi-regex-3.0.1.tgz", "integrity": "sha1-Ej1keekq1FrYl9QFTjx8p9tJROE=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -12744,6 +13924,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^3.0.0" }, @@ -12756,6 +13937,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-safari-launcher/-/karma-safari-launcher-1.0.0.tgz", "integrity": "sha1-lpgqLMR9BmquccVTursoMZEVos4=", "dev": true, + "license": "MIT", "peerDependencies": { "karma": ">=0.9" } @@ -12765,6 +13947,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-sauce-launcher/-/karma-sauce-launcher-4.3.6.tgz", "integrity": "sha1-J0+ZnOWjvHZXekOIOcsNu/J0akg=", "dev": true, + "license": "MIT", "dependencies": { "global-agent": "^2.1.12", "saucelabs": "^4.6.3", @@ -12779,6 +13962,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz", "integrity": "sha1-1LrnL7eoOXMopit1AT0t+Te9z5w=", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2" } @@ -12788,6 +13972,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/karma-summary-reporter/-/karma-summary-reporter-3.1.1.tgz", "integrity": "sha1-U9MVYKgZYCeojAGumsaQKShqPag=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0" }, @@ -12800,6 +13985,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -12815,6 +14001,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -12831,6 +14018,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -12842,13 +14030,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/karma-summary-reporter/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -12858,6 +14048,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -12870,6 +14061,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -12890,6 +14082,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha1-fe8D0kMtyuS6HWEURcSDlgYiVfY=", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -12902,6 +14095,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -12916,6 +14110,7 @@ "version": "4.5.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/keyv/-/keyv-4.5.4.tgz", "integrity": "sha1-qHmpnilFL5QkOfKkBeOvizHU3pM=", + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -12925,6 +14120,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -12934,6 +14130,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/kleur/-/kleur-3.0.3.tgz", "integrity": "sha1-p5yezIbuHOP6YgbRIWxQHxR/wH4=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -12943,6 +14140,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lazystream/-/lazystream-1.0.1.tgz", "integrity": "sha1-SUyDEGLx+UCCUexE2xy6KSQqJjg=", "dev": true, + "license": "MIT", "dependencies": { "readable-stream": "^2.0.5" }, @@ -12955,6 +14153,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha1-kRJegEK7obmIf0k0X2J3Anzovps=", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -12969,13 +14168,15 @@ "version": "5.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lazystream/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -12985,6 +14186,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/leven/-/leven-3.1.0.tgz", "integrity": "sha1-d4kd6DQGTMy6gq54QrtrFKE+1/I=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -12994,6 +14196,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/levn/-/levn-0.4.1.tgz", "integrity": "sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -13007,6 +14210,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", "integrity": "sha1-rvkPnpfNgds2fHY0KS7iIHkoCqo=", "dev": true, + "license": "Apache-2.0", "dependencies": { "debug": "^2.6.9", "marky": "^1.2.2" @@ -13017,6 +14221,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -13025,19 +14230,22 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha1-7KKE910pZQeTCdwK2SVauy68FjI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha1-wbShY7mfYUgwNTsWdV5xSawjFOE=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.11.5" } @@ -13047,6 +14255,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/loader-utils/-/loader-utils-2.0.4.tgz", "integrity": "sha1-i1yzi1w0qaAY7h/A5qBm0d/MUow=", "dev": true, + "license": "MIT", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -13061,6 +14270,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -13072,83 +14282,97 @@ "version": "4.17.21", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash/-/lodash-4.17.21.tgz", "integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.defaults": { "version": "4.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.difference": { "version": "4.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.difference/-/lodash.difference-4.5.0.tgz", "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.flatten": { "version": "4.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isobject": { "version": "3.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.isobject/-/lodash.isobject-3.0.2.tgz", "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.mapvalues": { "version": "4.6.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=" + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "license": "MIT" }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=" + "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=", + "license": "MIT" }, "node_modules/lodash.union": { "version": "4.6.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.zip": { "version": "4.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lodash.zip/-/lodash.zip-4.2.0.tgz", "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols": { "version": "2.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/log-symbols/-/log-symbols-2.2.0.tgz", "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^2.0.1" }, @@ -13161,6 +14385,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/log4js/-/log4js-6.9.1.tgz", "integrity": "sha1-q6Wj/054cq40+LTFM3BnU3CeOLY=", "dev": true, + "license": "Apache-2.0", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -13177,6 +14402,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -13193,13 +14419,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loglevel": { "version": "1.9.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/loglevel/-/loglevel-1.9.1.tgz", "integrity": "sha1-1jl2rJvNA8fIcxFtQcKoW6//G+c=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6.0" }, @@ -13212,13 +14440,15 @@ "version": "0.8.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz", "integrity": "sha1-L+DgXxqCAxfZjYwSPmNMG9hP9kQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lower-case/-/lower-case-2.0.2.tgz", "integrity": "sha1-b6I3xj29xKgsoP2ILkci3F5jTig=", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.3" } @@ -13227,12 +14457,14 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", + "license": "MIT", "engines": { "node": ">=8" } @@ -13242,6 +14474,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^3.0.2" } @@ -13251,6 +14484,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/magic-string/-/magic-string-0.30.10.tgz", "integrity": "sha1-Ej2cQaDLVkDIkrBB1M+zvQqks54=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" } @@ -13260,6 +14494,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha1-w8IwencSd82WODBfkVwprnQbYU4=", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -13275,6 +14510,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -13286,13 +14522,15 @@ "version": "1.3.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-error/-/make-error-1.3.6.tgz", "integrity": "sha1-LrLjfqm2fEiR9oShOUeZr0hM96I=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/make-fetch-happen": { "version": "10.2.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", "integrity": "sha1-9eODXF6YF7YX8ncIcNlJLShngWQ=", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^16.1.0", @@ -13320,6 +14558,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@npmcli/fs/-/fs-2.1.2.tgz", "integrity": "sha1-qeJUGkov7C5pwps15gYJc9p5uGU=", "dev": true, + "license": "ISC", "dependencies": { "@gar/promisify": "^1.1.3", "semver": "^7.3.5" @@ -13333,6 +14572,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cacache/-/cacache-16.1.3.tgz", "integrity": "sha1-oCufNOz6+aeMn0vBb865TV1no44=", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/fs": "^2.1.0", "@npmcli/move-file": "^2.0.0", @@ -13362,6 +14602,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -13374,6 +14615,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -13383,6 +14625,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13395,6 +14638,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -13410,6 +14654,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -13430,6 +14675,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -13442,6 +14688,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ssri/-/ssri-9.0.1.tgz", "integrity": "sha1-VE1MNXqNe3GhlwAHS2iD/LTq4Fc=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.1.1" }, @@ -13454,6 +14701,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unique-filename/-/unique-filename-2.0.1.tgz", "integrity": "sha1-54X4Z1qadYngrHfgtcNNLq6sbaI=", "dev": true, + "license": "ISC", "dependencies": { "unique-slug": "^3.0.0" }, @@ -13466,6 +14714,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unique-slug/-/unique-slug-3.0.0.tgz", "integrity": "sha1-bTR89XyKenpgRKq9Di105Ndtx8k=", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, @@ -13477,13 +14726,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/makeerror/-/makeerror-1.0.12.tgz", "integrity": "sha1-Pl3SB5qC6BLpg8xmEMSiyw6qgBo=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } @@ -13492,13 +14743,15 @@ "version": "1.2.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/marky/-/marky-1.2.5.tgz", "integrity": "sha1-VXlraIy9cjkNLTmeqvGDLJQT48A=", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/matcher": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/matcher/-/matcher-3.0.0.tgz", "integrity": "sha1-vZBg9MW3CqgEHMxvgDaHYJlPMMo=", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^4.0.0" }, @@ -13511,6 +14764,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -13523,6 +14777,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -13532,6 +14787,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/memory-fs/-/memory-fs-0.5.0.tgz", "integrity": "sha1-MkwBKIuIZSlm0WHbd4OHIIRajjw=", "dev": true, + "license": "MIT", "dependencies": { "errno": "^0.1.3", "readable-stream": "^2.0.1" @@ -13545,6 +14801,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha1-kRJegEK7obmIf0k0X2J3Anzovps=", "dev": true, + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -13559,13 +14816,15 @@ "version": "5.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/memory-fs/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -13574,13 +14833,15 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/merge2/-/merge2-1.4.1.tgz", "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -13590,6 +14851,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/micromatch/-/micromatch-4.0.7.tgz", "integrity": "sha1-M+gZDZ/kdKmJVSX1YY7uE21GwuU=", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -13619,6 +14881,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mime/-/mime-2.6.0.tgz", "integrity": "sha1-oqaCqVzU0MsdYlfij4PafjWAA2c=", "dev": true, + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -13631,6 +14894,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha1-u6vNwChZ9JhzAchW4zh85exDv3A=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -13640,6 +14904,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha1-OBqHG2KnNEUGYK497uRIE/cNlZo=", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -13652,6 +14917,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -13660,6 +14926,7 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha1-SSNTiHju9CBjy4o+OweYeBSHqxs=", + "license": "MIT", "engines": { "node": ">=4" } @@ -13668,13 +14935,15 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha1-Gc0ZS/0+Qo8EmnCBfAONiatL41s=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -13686,6 +14955,7 @@ "version": "1.2.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimist/-/minimist-1.2.8.tgz", "integrity": "sha1-waRk52kzAuCCoHXO4MBXdBrEdyw=", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -13695,6 +14965,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-5.0.0.tgz", "integrity": "sha1-PpeI/7kLaUpdDslEeaRbXYc4Ez0=", "dev": true, + "license": "ISC", "engines": { "node": ">=8" } @@ -13704,6 +14975,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-collect/-/minipass-collect-1.0.2.tgz", "integrity": "sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -13716,6 +14988,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13727,13 +15000,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-fetch": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-2.1.2.tgz", "integrity": "sha1-lVYLUMRy2Bo7x28g7egOrtdtit0=", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^3.1.6", "minipass-sized": "^1.0.3", @@ -13751,6 +15026,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13762,13 +15038,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-flush": { "version": "1.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -13781,6 +15059,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13792,13 +15071,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-json-stream": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", "integrity": "sha1-ftu5JYj7/C/x2y/BA5est7a0Sqc=", "dev": true, + "license": "MIT", "dependencies": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" @@ -13809,6 +15090,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13820,13 +15102,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", "integrity": "sha1-aEcveXEcCEZXwGfFxq2Tzd6oIUw=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -13839,6 +15123,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13850,13 +15135,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-sized/-/minipass-sized-1.0.3.tgz", "integrity": "sha1-cO5afFBSBwr6z7wil36nne81O3A=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -13869,6 +15156,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13880,13 +15168,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -13900,6 +15190,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -13911,18 +15202,21 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mitt/-/mitt-3.0.1.tgz", "integrity": "sha1-6jbPDMMEA2Aa4HTI93twks2rNtE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -13934,31 +15228,36 @@ "version": "0.5.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha1-+hDJEVzG2IZb4iG6R+6b7XhgERM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.3.tgz", "integrity": "sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha1-F7CVgZiJef3a/gIB6TG6kzyWy7Q=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha1-WOMjpy/twNb5zU0x/kn1FHlZDM0=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -13967,13 +15266,15 @@ "version": "2.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha1-tKr7k+OustgXTKU88WOrfXMIMF8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/netmask/-/netmask-2.0.2.tgz", "integrity": "sha1-iwGgdkQGXVNjg4NYI7xSAE66xec=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -13983,6 +15284,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/no-case/-/no-case-3.0.4.tgz", "integrity": "sha1-02H9XJgA9VhVGoNp/A3NRmK2Ek0=", "dev": true, + "license": "MIT", "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" @@ -13992,12 +15294,14 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha1-0PD6bj4twdJ+/NitmdVQvalNGH0=", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -14016,17 +15320,20 @@ "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "license": "MIT" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "license": "BSD-2-Clause" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -14037,6 +15344,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-gyp/-/node-gyp-9.4.1.tgz", "integrity": "sha1-ihAj4NZ2bstSdkzDpzSzb/J14YU=", "dev": true, + "license": "MIT", "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", @@ -14062,6 +15370,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -14082,6 +15391,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -14097,6 +15407,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -14108,19 +15419,22 @@ "version": "0.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha1-L/sFO864sr6Elezhq2zmAMRGGws=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nopt": { "version": "6.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nopt/-/nopt-6.0.0.tgz", "integrity": "sha1-JFgB2Ov0CcbfIqudlbZeEwnNsW0=", "dev": true, + "license": "ISC", "dependencies": { "abbrev": "^1.0.0" }, @@ -14136,6 +15450,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/normalize-package-data/-/normalize-package-data-5.0.0.tgz", "integrity": "sha1-q8uNfnJMQNiEYrhJgvfL9oWbRYg=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", @@ -14151,6 +15466,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -14163,6 +15479,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -14171,6 +15488,7 @@ "version": "6.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/normalize-url/-/normalize-url-6.1.0.tgz", "integrity": "sha1-QNCIW1Nd7/4/MUe+yHfQX+TFZoo=", + "license": "MIT", "engines": { "node": ">=10" }, @@ -14183,6 +15501,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-bundled/-/npm-bundled-3.0.1.tgz", "integrity": "sha1-zKc+FVYCN2liVLEBcNj4ba1i2iU=", "dev": true, + "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^3.0.0" }, @@ -14195,6 +15514,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-install-checks/-/npm-install-checks-6.3.0.tgz", "integrity": "sha1-BGVS2JIOgB+p+RnK1WlUXWDoJv4=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "semver": "^7.1.1" }, @@ -14207,6 +15527,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -14219,6 +15540,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", "integrity": "sha1-JUR+Mqmn3h9RNixhpVkjO4mUeDI=", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14228,6 +15550,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-package-arg/-/npm-package-arg-10.1.0.tgz", "integrity": "sha1-gn0SYKaDgGaF0XGTBzzBUtPH6bE=", "dev": true, + "license": "ISC", "dependencies": { "hosted-git-info": "^6.0.0", "proc-log": "^3.0.0", @@ -14243,6 +15566,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -14255,6 +15579,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-packlist/-/npm-packlist-7.0.4.tgz", "integrity": "sha1-Azv3QRDrdNrykQ3HUURBGZnF/zI=", "dev": true, + "license": "ISC", "dependencies": { "ignore-walk": "^6.0.0" }, @@ -14267,6 +15592,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz", "integrity": "sha1-IVl3jZxzYEIMklwaIoe1qITHE6o=", "dev": true, + "license": "ISC", "dependencies": { "npm-install-checks": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", @@ -14282,6 +15608,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -14294,6 +15621,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", "integrity": "sha1-/nFplXukmGpIU6ZQJ47gLlaNEV0=", "dev": true, + "license": "ISC", "dependencies": { "make-fetch-happen": "^11.0.0", "minipass": "^5.0.0", @@ -14312,6 +15640,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -14321,6 +15650,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha1-hc65gHlYSpUj1L9x0ymW5+IIVJ8=", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -14347,6 +15677,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -14364,6 +15695,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -14373,6 +15705,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha1-t+zR5e1T2o43pV4cImnguX7XSOo=", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -14385,6 +15718,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/npmlog/-/npmlog-6.0.2.tgz", "integrity": "sha1-yBZgF6QvLeqS1kUxaN2GUYanCDA=", "dev": true, + "license": "ISC", "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", @@ -14396,25 +15730,31 @@ } }, "node_modules/nwsapi": { - "version": "2.2.10", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nwsapi/-/nwsapi-2.2.10.tgz", - "integrity": "sha1-C3emjiGgtIPbcLEfrQVZBuhnzag=", - "dev": true + "version": "2.2.12", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/nwsapi/-/nwsapi-2.2.12.tgz", + "integrity": "sha1-+2r1wOw1sntFges7utNOyeXGlvg=", + "dev": true, + "license": "MIT" }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha1-uWxhCTJMz+9rEiFqlWyk3C/5S8I=", + "version": "1.13.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha1-3qAIhGf7mR5nr0BYFHokgkowQ/8=", "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -14424,6 +15764,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -14432,6 +15773,7 @@ "version": "1.11.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/oidc-client/-/oidc-client-1.11.5.tgz", "integrity": "sha1-Agqhk9aKPh+Hok/L9QBztzjekrs=", + "license": "Apache-2.0", "dependencies": { "acorn": "^7.4.1", "base64-js": "^1.5.1", @@ -14444,6 +15786,7 @@ "version": "7.4.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/acorn/-/acorn-7.4.1.tgz", "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -14455,6 +15798,7 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/serialize-javascript/-/serialize-javascript-4.0.0.tgz", "integrity": "sha1-tSXhI4SJpez8Qq+sw/6Z5mb0sao=", + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -14464,6 +15808,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha1-WMjEQRblSEWtV/FKsQsDUzGErD8=", "dev": true, + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -14475,6 +15820,7 @@ "version": "1.4.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -14484,6 +15830,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/onetime/-/onetime-5.1.2.tgz", "integrity": "sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4=", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -14499,6 +15846,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/optionator/-/optionator-0.9.4.tgz", "integrity": "sha1-fqHBpdkddk+yghOciP4R4YKjpzQ=", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -14515,6 +15863,7 @@ "version": "2.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-cancelable/-/p-cancelable-2.1.1.tgz", "integrity": "sha1-qrf71BZYL6MqPbSYWcEiSHxe0s8=", + "license": "MIT", "engines": { "node": ">=8" } @@ -14524,6 +15873,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha1-4drMvnjQ0TiMoYxk/qOOPlfjcGs=", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -14539,6 +15889,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -14551,6 +15902,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -14566,6 +15918,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-map/-/p-map-4.0.0.tgz", "integrity": "sha1-uy+Vpe2i7BaOySdOBqdHw+KQTSs=", "dev": true, + "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -14581,24 +15934,26 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/p-try/-/p-try-2.2.0.tgz", "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pac-proxy-agent": { - "version": "7.0.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", - "integrity": "sha1-a53cAC7D/wul/fSooh02O8xhLXU=", + "version": "7.0.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", + "integrity": "sha1-D7Aklr2fuK5+sRz9mDhtqqxEL1g=", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.2" + "https-proxy-agent": "^7.0.5", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.4" }, "engines": { "node": ">= 14" @@ -14609,6 +15964,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha1-vb3tffsJa3UaKgh+7rlmRyWy4xc=", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -14621,6 +15977,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -14638,6 +15995,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha1-mosfJGhmwChQlIZYX2K48sGMJw4=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -14647,10 +16005,11 @@ } }, "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha1-jpe4QaAprY3chzHyZZW62GjLQWg=", + "version": "7.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha1-notQE4cymeEfq2/VSEBdotbGArI=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -14663,17 +16022,19 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha1-ay2j13Nk/eYpLoELSWy3BEC5uJ0=", + "version": "8.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha1-kHHcoXr5X0gzADFvSwY1ePoNsIw=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", - "socks": "^2.7.1" + "socks": "^2.8.3" }, "engines": { "node": ">= 14" @@ -14684,6 +16045,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pac-resolver/-/pac-resolver-7.0.1.tgz", "integrity": "sha1-VGdVWOo2i2TSEP2ckqZAtfO4q7Y=", "dev": true, + "license": "MIT", "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" @@ -14692,11 +16054,19 @@ "node": ">= 14" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha1-5QHNMJSyeEletCWNTJ9tWsMBnwA=", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pacote": { "version": "15.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pacote/-/pacote-15.2.0.tgz", "integrity": "sha1-Dw38w+YMezkSGyrGEr+FlulTRNM=", "dev": true, + "license": "ISC", "dependencies": { "@npmcli/git": "^4.0.0", "@npmcli/installed-package-contents": "^2.0.1", @@ -14729,6 +16099,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/param-case/-/param-case-3.0.4.tgz", "integrity": "sha1-fRf+SqEr3jTUp32RrPtiGcqtAcU=", "dev": true, + "license": "MIT", "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -14738,13 +16109,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -14757,6 +16130,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha1-x2/Gbe5UIxyWKyK8yKcs8vmXU80=", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -14775,6 +16149,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/parse5/-/parse5-7.1.2.tgz", "integrity": "sha1-Bza+u/13eTgjJAojt/xeAQt/jjI=", "dev": true, + "license": "MIT", "dependencies": { "entities": "^4.4.0" }, @@ -14787,6 +16162,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -14796,6 +16172,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pascal-case/-/pascal-case-3.1.2.tgz", "integrity": "sha1-tI4O8rmOIF58Ha50fQsVCCN2YOs=", "dev": true, + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" @@ -14805,13 +16182,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/path-case": { "version": "3.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-case/-/path-case-3.0.4.tgz", "integrity": "sha1-kWhkUzTrlCZYN1xW+AtMDLX4LG8=", "dev": true, + "license": "MIT", "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -14821,13 +16200,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -14837,6 +16218,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -14845,6 +16227,7 @@ "version": "3.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-key/-/path-key-3.1.1.tgz", "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", + "license": "MIT", "engines": { "node": ">=8" } @@ -14853,13 +16236,15 @@ "version": "1.0.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha1-eWCmaIiFlKByCxKpEdGnQqufEdI=", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -14872,19 +16257,18 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha1-SCBrwRTBJSlAxBsltBr1tUWsqHg=", + "version": "10.4.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha1-QQ/IoXtw5ZgBPfJXwkRrfzOD8Rk=", "dev": true, - "engines": { - "node": "14 || >=16.14" - } + "license": "ISC" }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/path-type/-/path-type-4.0.0.tgz", "integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -14892,19 +16276,22 @@ "node_modules/pend": { "version": "1.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "license": "MIT" }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/picocolors/-/picocolors-1.0.1.tgz", "integrity": "sha1-qK1Xm1cZUvDl0liS3lRFvP4lqqE=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha1-O6ODNzNkbZ0+SZWUbBNlpn+wekI=", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -14917,6 +16304,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pify/-/pify-5.0.0.tgz", "integrity": "sha1-H17KP16H6+wozG1UoOSq8ArMEn8=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -14929,6 +16317,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pirates/-/pirates-4.0.6.tgz", "integrity": "sha1-MBiuMuz8/2wpuiJny/IRZqwfNrk=", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } @@ -14938,6 +16327,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -14950,6 +16340,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -14959,6 +16350,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pretty-format/-/pretty-format-26.6.2.tgz", "integrity": "sha1-41wnBfFMt/4v6U+geDRbREEg/JM=", "dev": true, + "license": "MIT", "dependencies": { "@jest/types": "^26.6.2", "ansi-regex": "^5.0.0", @@ -14974,6 +16366,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@jest/types/-/types-26.6.2.tgz", "integrity": "sha1-vvWlMgMOHYii9abZM/hOlyJu1I4=", "dev": true, + "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", @@ -14990,6 +16383,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/yargs/-/yargs-15.0.19.tgz", "integrity": "sha1-Mo+4nkYQnsvbcMKV2W/y9G39Abk=", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -14999,6 +16393,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -15014,6 +16409,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -15030,6 +16426,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -15041,13 +16438,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pretty-format/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -15057,6 +16456,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -15069,6 +16469,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/proc-log/-/proc-log-3.0.0.tgz", "integrity": "sha1-+wXvg8zWT9eyC76cjBBw/Agzjdg=", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -15078,6 +16479,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6.0" } @@ -15086,12 +16488,14 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/progress/-/progress-2.0.3.tgz", "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -15100,13 +16504,15 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha1-/3R6E2IKtXumiPX8Z4VUEMNw2iI=", "dev": true, + "license": "MIT", "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -15120,6 +16526,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/prompts/-/prompts-2.4.2.tgz", "integrity": "sha1-e1fnOzpIAprRDr1E90sBcipMsGk=", "dev": true, + "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -15133,6 +16540,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/proxy-agent/-/proxy-agent-6.4.0.tgz", "integrity": "sha1-tOLdUd7is3d0iu+NRWBMLXYIZS0=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", @@ -15152,6 +16560,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha1-vb3tffsJa3UaKgh+7rlmRyWy4xc=", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -15164,6 +16573,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -15181,6 +16591,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha1-mosfJGhmwChQlIZYX2K48sGMJw4=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -15190,10 +16601,11 @@ } }, "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha1-jpe4QaAprY3chzHyZZW62GjLQWg=", + "version": "7.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha1-notQE4cymeEfq2/VSEBdotbGArI=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -15207,6 +16619,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -15215,17 +16628,19 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha1-ay2j13Nk/eYpLoELSWy3BEC5uJ0=", + "version": "8.0.4", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha1-kHHcoXr5X0gzADFvSwY1ePoNsIw=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", - "socks": "^2.7.1" + "socks": "^2.8.3" }, "engines": { "node": ">= 14" @@ -15235,47 +16650,51 @@ "version": "1.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha1-4QLxbKNVQkhldV0sno6k8k1Yw+I=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/prr/-/prr-1.0.1.tgz", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/psl/-/psl-1.9.0.tgz", - "integrity": "sha1-0N8qE38AeUVl/K87LADNCfjVpac=" + "integrity": "sha1-0N8qE38AeUVl/K87LADNCfjVpac=", + "license": "MIT" }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/pump/-/pump-3.0.0.tgz", "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha1-AnQi4vrsCyXhVJw+G9gwm5EztuU=", - "engines": { - "node": ">=6" - } + "version": "1.4.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "license": "MIT" }, "node_modules/puppeteer": { - "version": "22.10.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer/-/puppeteer-22.10.0.tgz", - "integrity": "sha1-ELf4++W9SZM/HzZV8YVzCGKQ/vw=", + "version": "22.13.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer/-/puppeteer-22.13.0.tgz", + "integrity": "sha1-/1ZhYWUsL73C2/LDjIW+hBi4owI=", "dev": true, "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.2.3", - "cosmiconfig": "9.0.0", - "devtools-protocol": "0.0.1286932", - "puppeteer-core": "22.10.0" + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1299070", + "puppeteer-core": "22.13.0" }, "bin": { "puppeteer": "lib/esm/puppeteer/node/cli.js" @@ -15289,6 +16708,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-5.5.0.tgz", "integrity": "sha1-37Ymbv5akzy/GjaNJwJab9T1qIQ=", "dev": true, + "license": "Apache-2.0", "dependencies": { "debug": "^4.1.0", "devtools-protocol": "0.0.818844", @@ -15312,6 +16732,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/agent-base/-/agent-base-5.1.1.tgz", "integrity": "sha1-6Ps/JClZ20TWO+Zl23qOc5U3oyw=", "dev": true, + "license": "MIT", "engines": { "node": ">= 6.0.0" } @@ -15320,13 +16741,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chownr/-/chownr-1.1.4.tgz", "integrity": "sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/puppeteer-core/node_modules/debug": { "version": "4.3.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -15343,13 +16766,15 @@ "version": "0.0.818844", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/devtools-protocol/-/devtools-protocol-0.0.818844.tgz", "integrity": "sha1-0ZRyeOyFtT5MjKWY9geij6eFup4=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/puppeteer-core/node_modules/glob": { "version": "7.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -15370,6 +16795,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", "integrity": "sha1-cCtx+1UgoTKmbeH2dUHZ5iFU2Cs=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "5", "debug": "4" @@ -15382,13 +16808,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/puppeteer-core/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -15404,6 +16832,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha1-SJoVq4Xx8L76uzcLfeT561y+h4Q=", "dev": true, + "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -15412,10 +16841,11 @@ } }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-7.5.9.tgz", - "integrity": "sha1-VPp9sp9MfOxosd3TqJ3gmZQrtZE=", + "version": "7.5.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-7.5.10.tgz", + "integrity": "sha1-WLXCDcKBYz9sGRE/ObNJvYvVWNk=", "dev": true, + "license": "MIT", "engines": { "node": ">=8.3.0" }, @@ -15433,10 +16863,11 @@ } }, "node_modules/puppeteer/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.4.tgz", - "integrity": "sha1-Exn2V5NX8jONMzfSzdSRS7XcyGU=", + "version": "4.3.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", + "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -15453,29 +16884,32 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/puppeteer/node_modules/puppeteer-core": { - "version": "22.10.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-22.10.0.tgz", - "integrity": "sha1-7vVzX5DtKeOxCBXRQrNDfgWTkoM=", + "version": "22.13.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/puppeteer-core/-/puppeteer-core-22.13.0.tgz", + "integrity": "sha1-q6RekAzVN5/eiFELf0kVAXzGtcM=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.2.3", - "chromium-bidi": "0.5.19", - "debug": "4.3.4", - "devtools-protocol": "0.0.1286932", - "ws": "8.17.0" + "chromium-bidi": "0.6.0", + "debug": "^4.3.5", + "devtools-protocol": "0.0.1299070", + "ws": "^8.18.0" }, "engines": { "node": ">=18" } }, "node_modules/puppeteer/node_modules/ws": { - "version": "8.17.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.0.tgz", - "integrity": "sha1-0UXRjsou0lqveRoYOQP3vl4pX+o=", + "version": "8.18.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.18.0.tgz", + "integrity": "sha1-DXUFpur+Kw5xLSMrQiefU7wom7w=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -15506,13 +16940,15 @@ "type": "opencollective", "url": "https://opencollective.com/fast-check" } - ] + ], + "license": "MIT" }, "node_modules/qjobs": { "version": "1.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/qjobs/-/qjobs-1.2.0.tgz", "integrity": "sha1-xF6cYYAL0IfviNfiVkI73Unl0HE=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.9" } @@ -15522,6 +16958,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/qs/-/qs-6.11.0.tgz", "integrity": "sha1-/Q2WNEb3pl4TZ+AavYVClFPww3o=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.4" }, @@ -15537,6 +16974,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/query-string/-/query-string-7.1.3.tgz", "integrity": "sha1-oc+Q6ZSrsROjJYBKly2YJ2/gIyg=", "dev": true, + "license": "MIT", "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", @@ -15553,7 +16991,8 @@ "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha1-M0WUG0FTy50ILY7uTNogFqmu9/Y=" + "integrity": "sha1-M0WUG0FTy50ILY7uTNogFqmu9/Y=", + "license": "MIT" }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -15573,18 +17012,21 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/queue-tick": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/queue-tick/-/queue-tick-1.0.1.tgz", "integrity": "sha1-9vB6yCwf1g+C4Ji0F6gOUvH0wUI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha1-NmST5rPkKjpoheLpnRj4D7eoyTI=", + "license": "MIT", "engines": { "node": ">=10" }, @@ -15596,6 +17038,7 @@ "version": "2.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=", + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -15605,6 +17048,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -15614,6 +17058,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha1-mf69g7kOCJdQh+jx+UGaFJNmtoo=", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -15628,13 +17073,15 @@ "version": "17.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/react-is/-/react-is-17.0.2.tgz", "integrity": "sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/read-package-json": { "version": "6.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/read-package-json/-/read-package-json-6.0.4.tgz", "integrity": "sha1-kDGIJOxFbCh0N+p5WV9MKFRwiDY=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^10.2.2", "json-parse-even-better-errors": "^3.0.0", @@ -15650,6 +17097,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", "integrity": "sha1-OUkIqXJdx6XxTnDI51Vt/x0rEEk=", "dev": true, + "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -15663,6 +17111,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", "integrity": "sha1-tD016JwPO+a1+76dxsgkZ7MMKNo=", "dev": true, + "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -15672,28 +17121,28 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.1.tgz", - "integrity": "sha1-DPsBq2prQ4F3v+aljiV29u/pCcI=", + "version": "10.4.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.5.tgz", + "integrity": "sha1-9NnwuQ/9urCcnXf18ptCYlF7CVY=", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -15703,15 +17152,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", "integrity": "sha1-tD016JwPO+a1+76dxsgkZ7MMKNo=", "dev": true, + "license": "MIT", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", + "version": "9.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha1-10+d1rV9g9jpjPuCEzsDl4vJKeU=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -15727,6 +17178,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -15735,6 +17187,7 @@ "version": "3.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha1-VqmzbqllwAxak+8x6xEaDxEFaWc=", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -15749,6 +17202,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readdir-glob/-/readdir-glob-1.1.3.tgz", "integrity": "sha1-w9gx9R9ee/pi+i/75LUIxkDwlYQ=", "dev": true, + "license": "Apache-2.0", "dependencies": { "minimatch": "^5.1.0" } @@ -15758,6 +17212,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -15767,6 +17222,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha1-HPy4z1Ui6mmVLNKvla4JR38SKpY=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -15779,6 +17235,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -15791,6 +17248,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rechoir/-/rechoir-0.7.1.tgz", "integrity": "sha1-lHipahyhNbXoj8An8D7pLWxkVoY=", "dev": true, + "license": "MIT", "dependencies": { "resolve": "^1.9.0" }, @@ -15802,13 +17260,15 @@ "version": "1.4.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha1-uTRtiCfo9aMve6KWN9OYtpAUhIo=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regenerate-unicode-properties": { "version": "10.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", "integrity": "sha1-aw4FSJ2QdrBMQ28xjZsGe7pFlIA=", "dev": true, + "license": "MIT", "dependencies": { "regenerate": "^1.4.2" }, @@ -15820,13 +17280,15 @@ "version": "0.14.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha1-NWreECY/aF3aElEAzYYsHbiVMn8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regenerator-transform": { "version": "0.15.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regenerator-transform/-/regenerator-transform-0.15.2.tgz", "integrity": "sha1-W7rli1IgmOvfCbyi+Dg4kpABx6Q=", "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.4" } @@ -15836,6 +17298,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regexpu-core/-/regexpu-core-5.3.2.tgz", "integrity": "sha1-EaKwaITzUnrsPpPbv0o7lYqVVGs=", "dev": true, + "license": "MIT", "dependencies": { "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", @@ -15853,6 +17316,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/regjsparser/-/regjsparser-0.9.1.tgz", "integrity": "sha1-Jy0FqhDHwfZwlbH/Ct2uhEL8Vwk=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "jsesc": "~0.5.0" }, @@ -15874,6 +17338,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -15883,6 +17348,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha1-iaf92TgmEmcxjq/hT5wy5ZjDaQk=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -15890,13 +17356,15 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "license": "MIT" }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resolve/-/resolve-1.22.8.tgz", "integrity": "sha1-tsh6nyqgbfq1Lj1wrIzeMh+lpI0=", "dev": true, + "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -15912,13 +17380,15 @@ "node_modules/resolve-alpn": { "version": "1.2.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha1-t629rDVGqq7CC0Xn2CZZJwcnJvk=" + "integrity": "sha1-t629rDVGqq7CC0Xn2CZZJwcnJvk=", + "license": "MIT" }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha1-DwB18bslRHZs9zumpuKt/ryxPy0=", "dev": true, + "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -15931,6 +17401,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha1-w1IlhD3493bfIcV1V7wIfp39/Gk=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -15940,6 +17411,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resolve.exports/-/resolve.exports-2.0.2.tgz", "integrity": "sha1-+Mk0uOahP1OeOLcJji42E08B6AA=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -15948,6 +17420,7 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/responselike/-/responselike-2.0.1.tgz", "integrity": "sha1-mgvI/cJS8/scymiwFlkQWboUIrw=", + "license": "MIT", "dependencies": { "lowercase-keys": "^2.0.0" }, @@ -15960,6 +17433,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/resq/-/resq-1.11.0.tgz", "integrity": "sha1-7eyMWL6a+AD9YoEYwMqIFSg94ZY=", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^2.0.1" } @@ -15968,13 +17442,15 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/retry/-/retry-0.12.0.tgz", "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -15984,28 +17460,32 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/reusify/-/reusify-1.0.4.tgz", "integrity": "sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha1-K21N9S3/6Ls0aZKhDqlFHyQ3Oo8=", - "dev": true + "version": "1.4.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha1-d492xPtzHZNBTo+SX77PZMzn9so=", + "dev": true, + "license": "MIT" }, "node_modules/rgb2hex": { "version": "0.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rgb2hex/-/rgb2hex-0.2.3.tgz", "integrity": "sha1-iqRkxRe4omx6eddn2rrsK0nueOw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/rimraf": { - "version": "5.0.7", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-5.0.7.tgz", - "integrity": "sha1-J73fIC59icsuA4FlY4DRc0qFSnQ=", + "version": "5.0.9", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-5.0.9.tgz", + "integrity": "sha1-w7qhuIbq3C7HmBoGpZPD0BE0/+k=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^10.3.7" }, @@ -16013,7 +17493,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14.18" + "node": "14 >=14.20 || 16 >=16.20 || >=18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -16024,37 +17504,38 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.1.tgz", - "integrity": "sha1-DPsBq2prQ4F3v+aljiV29u/pCcI=", + "version": "10.4.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-10.4.5.tgz", + "integrity": "sha1-9NnwuQ/9urCcnXf18ptCYlF7CVY=", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha1-jknHMdF0nL7AUFDuUUUUezJJalE=", + "version": "9.0.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha1-10+d1rV9g9jpjPuCEzsDl4vJKeU=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -16070,6 +17551,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -16079,6 +17561,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/roarr/-/roarr-2.15.4.tgz", "integrity": "sha1-9f55W3uDjM/jXcYI4Cgrnrouev0=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "boolean": "^3.0.1", "detect-node": "^2.0.4", @@ -16095,13 +17578,15 @@ "version": "1.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha1-SRS5A6L4toXRf994pw6RfocuREo=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha1-SX9g8MUwjkYCz0ETYzn7+H1fXdo=", + "version": "4.18.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup/-/rollup-4.18.1.tgz", + "integrity": "sha1-GKYG3152ylO4pp8tjqslbWndqFE=", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "1.0.5" }, @@ -16113,22 +17598,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.18.1", + "@rollup/rollup-android-arm64": "4.18.1", + "@rollup/rollup-darwin-arm64": "4.18.1", + "@rollup/rollup-darwin-x64": "4.18.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", + "@rollup/rollup-linux-arm-musleabihf": "4.18.1", + "@rollup/rollup-linux-arm64-gnu": "4.18.1", + "@rollup/rollup-linux-arm64-musl": "4.18.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", + "@rollup/rollup-linux-riscv64-gnu": "4.18.1", + "@rollup/rollup-linux-s390x-gnu": "4.18.1", + "@rollup/rollup-linux-x64-gnu": "4.18.1", + "@rollup/rollup-linux-x64-musl": "4.18.1", + "@rollup/rollup-win32-arm64-msvc": "4.18.1", + "@rollup/rollup-win32-ia32-msvc": "4.18.1", + "@rollup/rollup-win32-x64-msvc": "4.18.1", "fsevents": "~2.3.2" } }, @@ -16137,6 +17622,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rollup-plugin-filesize/-/rollup-plugin-filesize-10.0.0.tgz", "integrity": "sha1-/lr5nlGU/TefF5ewyHVJ/q9Af4I=", "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.13.8", "boxen": "^5.0.0", @@ -16170,6 +17656,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -16179,6 +17666,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rxjs/-/rxjs-6.6.7.tgz", "integrity": "sha1-kKwBisq/SRv2UEQjXVhjxNq4BMk=", "dev": true, + "license": "Apache-2.0", "dependencies": { "tslib": "^1.9.0" }, @@ -16203,19 +17691,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", - "devOptional": true + "devOptional": true, + "license": "MIT" }, "node_modules/saucelabs": { "version": "7.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/saucelabs/-/saucelabs-7.5.0.tgz", "integrity": "sha1-dciKleFRmmO3mXjRRqdkou7LTw4=", "dev": true, + "license": "Apache-2.0", "dependencies": { "change-case": "^4.1.2", "compressing": "^1.10.0", @@ -16235,6 +17726,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/cliui/-/cliui-8.0.1.tgz", "integrity": "sha1-DASwddsCy/5g3I5s8vVIaxo2CKo=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -16249,6 +17741,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs/-/yargs-17.7.2.tgz", "integrity": "sha1-mR3zmspnWhkrgW4eA2P5110qomk=", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -16267,6 +17760,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/saxes/-/saxes-6.0.0.tgz", "integrity": "sha1-/ltKR2jfTxSiAbG6amXB89mYjMU=", "dev": true, + "license": "ISC", "dependencies": { "xmlchars": "^2.2.0" }, @@ -16279,6 +17773,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/schema-utils/-/schema-utils-4.2.0.tgz", "integrity": "sha1-cNfJPhU6JzqAWAGILr07/yDYnIs=", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", "ajv": "^8.9.0", @@ -16294,15 +17789,16 @@ } }, "node_modules/schema-utils/node_modules/ajv": { - "version": "8.16.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.16.0.tgz", - "integrity": "sha1-IuKpK5TwBffg+cnTllLvC49vDLQ=", + "version": "8.17.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha1-N9mlx3ava8ktf0+VEOukwKYNEaY=", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -16314,6 +17810,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ajv-keywords/-/ajv-keywords-5.1.0.tgz", "integrity": "sha1-adTThaRzPNvqtElkoRcKiPh/DhY=", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3" }, @@ -16325,12 +17822,14 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha1-rnvLNlard6c7pcSb9lTzjmtoYOI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/selenium-standalone": { "version": "7.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/selenium-standalone/-/selenium-standalone-7.1.0.tgz", "integrity": "sha1-EZKkrYTxFBN91d6ty4Gw9Wr+BUo=", + "license": "MIT", "dependencies": { "commander": "^7.2.0", "cross-spawn": "^7.0.3", @@ -16359,6 +17858,7 @@ "version": "7.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/commander/-/commander-7.2.0.tgz", "integrity": "sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=", + "license": "MIT", "engines": { "node": ">= 10" } @@ -16367,6 +17867,7 @@ "version": "4.3.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -16382,13 +17883,15 @@ "node_modules/selenium-standalone/node_modules/ms": { "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "license": "MIT" }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-6.3.1.tgz", "integrity": "sha1-VW0u+GiRRuRtzqS/3QlfNDTf/LQ=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -16397,13 +17900,15 @@ "version": "1.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/sentence-case": { "version": "3.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/sentence-case/-/sentence-case-3.0.4.tgz", "integrity": "sha1-NkWnuMEXx4f96HAgViJbtipFEx8=", "dev": true, + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", @@ -16414,13 +17919,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/serialize-error": { "version": "7.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/serialize-error/-/serialize-error-7.0.1.tgz", "integrity": "sha1-8TYLBEf2H/tIPsQVfHN/q313jhg=", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.13.1" }, @@ -16436,6 +17943,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.13.1.tgz", "integrity": "sha1-AXLLW86AsL1ULqNI21DH4hg02TQ=", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -16448,6 +17956,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha1-3voeBVyDv21Z6oBdjahiJU62psI=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -16456,18 +17965,21 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/set-cookie-parser": { "version": "2.6.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha1-Exkh5Q9i/xpmpGHX1i17IdXRWlE=" + "integrity": "sha1-Exkh5Q9i/xpmpGHX1i17IdXRWlE=", + "license": "MIT" }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha1-qscjFBmOrtl1z3eyw7a4gGleVEk=", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -16484,13 +17996,15 @@ "version": "1.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha1-ZsmiSnP5/CjL5msJ/tPTPcrxtCQ=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha1-jymBrZJTH1UDWwH7IwdppA4C76M=", "dev": true, + "license": "MIT", "dependencies": { "kind-of": "^6.0.2" }, @@ -16502,6 +18016,7 @@ "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -16513,6 +18028,7 @@ "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", + "license": "MIT", "engines": { "node": ">=8" } @@ -16522,6 +18038,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha1-q9Jft80kuvRUZkBrEJa3gxySFfI=", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -16539,13 +18056,15 @@ "version": "3.0.7", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha1-qaF2f4r4QVURTqq9c/mSc8j1mtk=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/sigstore": { "version": "1.9.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/sigstore/-/sigstore-1.9.0.tgz", "integrity": "sha1-HnrYkzqpm3XGiY3dDu68PrDVmHU=", "dev": true, + "license": "Apache-2.0", "dependencies": { "@sigstore/bundle": "^1.1.0", "@sigstore/protobuf-specs": "^0.2.0", @@ -16565,6 +18084,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -16574,6 +18094,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha1-hc65gHlYSpUj1L9x0ymW5+IIVJ8=", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -16600,6 +18121,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -16617,6 +18139,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -16625,13 +18148,15 @@ "version": "1.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/sisteransi/-/sisteransi-1.0.5.tgz", "integrity": "sha1-E01oEpd1ZDfMBcoBNw06elcQde0=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/slash/-/slash-3.0.0.tgz", "integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -16641,6 +18166,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha1-bh1x+k8YwF99D/IW3RakgdDo2a4=", "dev": true, + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -16650,13 +18176,15 @@ "version": "1.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/smob/-/smob-1.5.0.tgz", "integrity": "sha1-hdeaFAOr8SjSTT68HNxeGpVI06s=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/snake-case": { "version": "3.0.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/snake-case/-/snake-case-3.0.4.tgz", "integrity": "sha1-Tyu9Vo6ZNavf1ZPzTGkdrbScRSw=", "dev": true, + "license": "MIT", "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -16666,13 +18194,15 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/socket.io": { "version": "4.7.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socket.io/-/socket.io-4.7.5.tgz", "integrity": "sha1-Vustl2rvnRRF83OmLXgaQcet2Pg=", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", @@ -16687,13 +18217,14 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.5.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", - "integrity": "sha1-T9sTWGZ/bWjyU0M1O9mb0R7kEAY=", + "version": "2.5.5", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha1-x6H5xwPXdWhEdRtv+av8F4BmQII=", "dev": true, + "license": "MIT", "dependencies": { "debug": "~4.3.4", - "ws": "~8.11.0" + "ws": "~8.17.1" } }, "node_modules/socket.io-adapter/node_modules/debug": { @@ -16701,6 +18232,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -16717,19 +18249,21 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/socket.io-adapter/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.11.0.tgz", - "integrity": "sha1-ag02uO39n5bYslaD2y+Nfebo4UM=", + "version": "8.17.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-8.17.1.tgz", + "integrity": "sha1-kpPaUwu1SP68lTcdkPnIeHJ9kZs=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -16745,6 +18279,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socket.io-parser/-/socket.io-parser-4.2.4.tgz", "integrity": "sha1-yAaWbPcnBgHkdGnd7sMPvf2kTIM=", "dev": true, + "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -16758,6 +18293,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -16774,13 +18310,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/socket.io/node_modules/debug": { "version": "4.3.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -16797,13 +18335,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/socks": { "version": "2.8.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks/-/socks-2.8.3.tgz", "integrity": "sha1-Hr0PCcUrqVoJdQr+Pz+fckqADLU=", "dev": true, + "license": "MIT", "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -16818,6 +18358,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", "integrity": "sha1-3AaezzRDZiGstB4++mbKG1/tFbY=", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", @@ -16832,6 +18373,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -16848,13 +18390,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/source-map/-/source-map-0.6.1.tgz", "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -16864,6 +18408,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/source-map-support/-/source-map-support-0.5.13.tgz", "integrity": "sha1-MbJKnC5zwt6FBmwP631Edn7VKTI=", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -16874,6 +18419,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha1-T1qwZo8AWeNPnADc4zF4ShLeTpw=", "dev": true, + "license": "Apache-2.0", "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -16883,13 +18429,15 @@ "version": "2.5.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", "integrity": "sha1-XWB9J/yAb2bXtkp2ZlD6iQ8E7WY=", - "dev": true + "dev": true, + "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha1-z3D1BILu/cmOPOCmgz5KU87rpnk=", "dev": true, + "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -16899,13 +18447,15 @@ "version": "3.0.18", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", "integrity": "sha1-IqqSLc8vKIWmSUomHy2LdTRdAyY=", - "dev": true + "dev": true, + "license": "CC0-1.0" }, "node_modules/split-on-first": { "version": "1.1.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/split-on-first/-/split-on-first-1.1.0.tgz", "integrity": "sha1-9hCv7uOxK84dDDBCXnY5i3gkml8=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -16914,13 +18464,15 @@ "version": "1.0.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/ssri": { "version": "10.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ssri/-/ssri-10.0.6.tgz", "integrity": "sha1-qKreLeYLorzoaI4/o0m60Fx9weU=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^7.0.3" }, @@ -16933,6 +18485,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -16942,6 +18495,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/stack-utils/-/stack-utils-2.0.6.tgz", "integrity": "sha1-qvB0gWnAL8M8gjKrzPkz9Uocw08=", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -16954,6 +18508,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -16963,6 +18518,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -16972,6 +18528,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamifier/-/streamifier-0.1.1.tgz", "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10" } @@ -16981,6 +18538,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamroller/-/streamroller-3.1.5.tgz", "integrity": "sha1-EmMYIymkXe8f+u9Y0xsV0T0u5/8=", "dev": true, + "license": "MIT", "dependencies": { "date-format": "^4.0.14", "debug": "^4.3.4", @@ -16995,6 +18553,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -17012,6 +18571,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha1-SdQ8RaiM2Wd2aMt74bRu/bjS4cA=", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -17026,6 +18586,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, + "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -17034,13 +18595,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/streamroller/node_modules/universalify": { "version": "0.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/universalify/-/universalify-0.1.2.tgz", "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -17050,6 +18613,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/streamx/-/streamx-2.18.0.tgz", "integrity": "sha1-W8GlHrQSpmfr/c1ObPam/GVyGsc=", "dev": true, + "license": "MIT", "dependencies": { "fast-fifo": "^1.3.2", "queue-tick": "^1.0.1", @@ -17064,6 +18628,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -17072,6 +18637,7 @@ "version": "1.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=", + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -17081,6 +18647,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string-length/-/string-length-4.0.2.tgz", "integrity": "sha1-qKjce9XBqCubPIuH4SX2aHG25Xo=", "dev": true, + "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -17094,6 +18661,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string-width/-/string-width-4.2.3.tgz", "integrity": "sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -17109,6 +18677,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/string-width/-/string-width-4.2.3.tgz", "integrity": "sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -17123,6 +18692,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -17136,6 +18706,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -17148,6 +18719,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha1-nDUFwdtFvO3KPZz3oW9cWqOQGHg=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -17157,6 +18729,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -17166,6 +18739,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -17178,6 +18752,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -17190,6 +18765,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha1-btpL00SjyUrqN21MwxvHcxEDngk=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -17201,13 +18777,15 @@ "version": "3.2.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha1-QwY30ki6d+B4iDlR+5qg7tfGP6I=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tapable": { "version": "1.1.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tapable/-/tapable-1.1.3.tgz", "integrity": "sha1-ofzMBrWNth/XpF2i2kT186Pme6I=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -17217,6 +18795,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar/-/tar-6.2.1.tgz", "integrity": "sha1-cXVJxUG8PCrxV1G+qUsd0GjUsDo=", "dev": true, + "license": "ISC", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -17234,6 +18813,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-fs/-/tar-fs-3.0.5.tgz", "integrity": "sha1-+VTXd2fk5u35czhOHrlfj4HWTtk=", "dev": true, + "license": "MIT", "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" @@ -17248,6 +18828,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-stream/-/tar-stream-3.1.7.tgz", "integrity": "sha1-JLP7XqutoZ/nM47W0m5ffEgueSs=", "dev": true, + "license": "MIT", "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -17258,6 +18839,7 @@ "version": "2.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha1-rK2EwoQTawYNw/qmRHSqmuvXcoc=", + "license": "MIT", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -17274,6 +18856,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=", "dev": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -17286,6 +18869,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-3.3.6.tgz", "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -17297,13 +18881,15 @@ "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/terser": { - "version": "5.31.1", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser/-/terser-5.31.1.tgz", - "integrity": "sha1-c13jyYfdZx6VGQ5rmM/i8H888NQ=", + "version": "5.31.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser/-/terser-5.31.2.tgz", + "integrity": "sha1-tcoYgQe3BghNyoL5iAifphAuuhE=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -17322,6 +18908,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha1-kE9MkZPG/SoD9pOiFQxiqS9A0Zk=", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -17356,6 +18943,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -17365,6 +18953,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha1-jRRvCQDolzsQa29zzB6ajLhvjbA=", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -17379,6 +18968,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha1-9QqIh3w8AWUqFbYirp6Xld96YP4=", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -17397,6 +18987,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha1-zW/BfihQDP9WwbhsCn/UpUpzAFw=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -17412,6 +19003,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha1-BP58f54e0tZiIzwoyys1ufY/bk8=", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -17422,6 +19014,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha1-BKhphmHYBepvopO2y55jrARO8V4=", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -17436,6 +19029,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -17452,10 +19046,11 @@ } }, "node_modules/text-decoder": { - "version": "1.1.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-decoder/-/text-decoder-1.1.0.tgz", - "integrity": "sha1-M3nnKPz004k+wa6jXowsrCFe8ZA=", + "version": "1.1.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-decoder/-/text-decoder-1.1.1.tgz", + "integrity": "sha1-XfnCJM66xKeXdyC58IP576Gu/eg=", "dev": true, + "license": "Apache-2.0", "dependencies": { "b4a": "^1.6.4" } @@ -17464,19 +19059,22 @@ "version": "0.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/through": { "version": "2.3.8", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tmp/-/tmp-0.2.3.tgz", "integrity": "sha1-63g8wivB6L69BnFHbUbqTrMqea4=", "dev": true, + "license": "MIT", "engines": { "node": ">=14.14" } @@ -17485,19 +19083,22 @@ "version": "1.0.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha1-hoPguQK7nCDE9ybjwLafNlGMB8w=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/to-buffer": { "version": "1.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/to-buffer/-/to-buffer-1.1.1.tgz", "integrity": "sha1-STvUj2LXxD/N7TE6A9ytsuEhOoA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -17507,6 +19108,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -17519,6 +19121,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha1-O+NDIaiKgg7RvYDfqjPkefu43TU=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6" } @@ -17527,6 +19130,7 @@ "version": "4.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tough-cookie/-/tough-cookie-4.1.4.tgz", "integrity": "sha1-lF8UYbRbWox2ghwz6knDrBksGzY=", + "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -17537,10 +19141,20 @@ "node": ">=6" } }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha1-AnQi4vrsCyXhVJw+G9gwm5EztuU=", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/tough-cookie/node_modules/universalify": { "version": "0.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/universalify/-/universalify-0.2.0.tgz", "integrity": "sha1-ZFF2BWb6hXU0dFqx3elS0bF2G+A=", + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -17550,6 +19164,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tr46/-/tr46-3.0.0.tgz", "integrity": "sha1-VVxOKXqVBhfo7t3vYzyH1NnWy/k=", "dev": true, + "license": "MIT", "dependencies": { "punycode": "^2.1.1" }, @@ -17557,11 +19172,22 @@ "node": ">=12" } }, + "node_modules/tr46/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha1-AnQi4vrsCyXhVJw+G9gwm5EztuU=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-api-utils/-/ts-api-utils-1.3.0.tgz", "integrity": "sha1-S0kOJxKfHo5oa0XMSrY3FNxg7qE=", "dev": true, + "license": "MIT", "engines": { "node": ">=16" }, @@ -17570,12 +19196,14 @@ } }, "node_modules/ts-jest": { - "version": "29.1.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-jest/-/ts-jest-29.1.4.tgz", - "integrity": "sha1-JvilXOMeTS73of1H3H+hJ+knk+8=", + "version": "29.2.2", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-jest/-/ts-jest-29.2.2.tgz", + "integrity": "sha1-DSOHuwTTkXSyCgUXKpaPJYrt/00=", "dev": true, + "license": "MIT", "dependencies": { "bs-logger": "0.x", + "ejs": "^3.0.0", "fast-json-stable-stringify": "2.x", "jest-util": "^29.0.0", "json5": "^2.2.3", @@ -17621,6 +19249,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -17633,6 +19262,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-loader/-/ts-loader-8.4.0.tgz", "integrity": "sha1-6EXqDzjRQL3D19YCk8oY0S/ycg8=", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "enhanced-resolve": "^4.0.0", @@ -17653,6 +19283,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -17668,6 +19299,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/chalk/-/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -17684,6 +19316,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -17695,13 +19328,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ts-loader/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -17711,6 +19346,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -17723,6 +19359,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -17735,6 +19372,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha1-cPAhyeGFvM3Kgg4m3EE4BcEBxx8=", "dev": true, + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -17777,13 +19415,15 @@ "version": "1.14.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-1.14.1.tgz", "integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha1-tIcX05TOpsHglpg+7Vjp1hcVtiM=", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -17799,6 +19439,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tuf-js/-/tuf-js-1.1.7.tgz", "integrity": "sha1-Ibeukqk3MBW+d9/gyygqgOw7vkM=", "dev": true, + "license": "MIT", "dependencies": { "@tufjs/models": "1.0.4", "debug": "^4.3.4", @@ -17813,6 +19454,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -17830,6 +19472,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha1-95OJbg/Q6VSlnf3YLwdzgI32qok=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -17839,6 +19482,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", "integrity": "sha1-hc65gHlYSpUj1L9x0ymW5+IIVJ8=", "dev": true, + "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^17.0.0", @@ -17865,6 +19509,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass-fetch/-/minipass-fetch-3.0.5.tgz", "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", "dev": true, + "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -17882,6 +19527,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minipass/-/minipass-7.1.2.tgz", "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -17890,13 +19536,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha1-cvExSzSlsZLbASMk3yzFh8pH+Sw=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } @@ -17906,6 +19554,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-check/-/type-check-0.4.0.tgz", "integrity": "sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -17918,6 +19567,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -17927,6 +19577,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha1-0mCiSwGYQ24TP6JqUkptZfo7Ljc=", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -17939,6 +19590,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-is/-/type-is-1.6.18.tgz", "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", "dev": true, + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -17948,10 +19600,11 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha1-QszvLFcf29D2cYsdH15uXvAG9hE=", + "version": "5.5.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha1-4bCjw5QZCDigsWjncbCtVqCvD6o=", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17979,6 +19632,7 @@ "url": "https://github.com/sponsors/faisalman" } ], + "license": "MIT", "engines": { "node": "*" } @@ -17988,6 +19642,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", "integrity": "sha1-sNoExDcTEd93HNwhXofyEwmRrOc=", "dev": true, + "license": "MIT", "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -17996,13 +19651,15 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha1-vNU5iT0AtW6WT9JlekhmsiGmVhc=" + "integrity": "sha1-vNU5iT0AtW6WT9JlekhmsiGmVhc=", + "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", "integrity": "sha1-MBrNxSVjFnDTn2FG4Od/9rvevdw=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -18012,6 +19669,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha1-VP0W4OyxZ88Ezx91a9zJLrp5dsM=", "dev": true, + "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" @@ -18025,6 +19683,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", "integrity": "sha1-y1//3NFqBRJPWksL98N3Agisu+A=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -18034,6 +19693,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", "integrity": "sha1-Q9QeO+aYvUk++REHfJsTH4J+jM0=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -18043,6 +19703,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unique-filename/-/unique-filename-3.0.0.tgz", "integrity": "sha1-SLp6WhaEn1CA0mx2DIbPXPBXcOo=", "dev": true, + "license": "ISC", "dependencies": { "unique-slug": "^4.0.0" }, @@ -18055,6 +19716,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unique-slug/-/unique-slug-4.0.0.tgz", "integrity": "sha1-a65rsWvpE1G63STNznQfiSplMuM=", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" }, @@ -18066,6 +19728,7 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/universalify/-/universalify-2.0.1.tgz", "integrity": "sha1-Fo78IYCWTmOG0GHglN9hr+I5sY0=", + "license": "MIT", "engines": { "node": ">= 10.0.0" } @@ -18075,14 +19738,15 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha1-9tSJ7ZD7LwfWd4TrP1PXiR9zY1Y=", + "version": "1.1.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha1-fKYcDYZQdmCQcoBG5BaozeaChZ4=", "dev": true, "funding": [ { @@ -18098,6 +19762,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "escalade": "^3.1.2", "picocolors": "^1.0.1" @@ -18114,6 +19779,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/upper-case/-/upper-case-2.0.2.tgz", "integrity": "sha1-2JgQgj+qsd8VSbfZenb4Ziuub3o=", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.3" } @@ -18123,6 +19789,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/upper-case-first/-/upper-case-first-2.0.2.tgz", "integrity": "sha1-mSwyc/iCq9GdHgKJTMFHEX+EQyQ=", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.3" } @@ -18131,27 +19798,41 @@ "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/upper-case/node_modules/tslib": { "version": "2.6.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tslib/-/tslib-2.6.3.tgz", "integrity": "sha1-BDj4EK16ntzeeiQcPYDbaTyMv+A=", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha1-AnQi4vrsCyXhVJw+G9gwm5EztuU=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha1-nTwvc2wddd070r5QfcwRHx4uqcE=", + "license": "MIT", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -18161,18 +19842,21 @@ "version": "10.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", "integrity": "sha1-8KA6l7+wPN8zVT5eeaKq3SLKyOw=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "license": "MIT" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -18182,6 +19866,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/uuid/-/uuid-8.3.2.tgz", "integrity": "sha1-gNW1ztJxu5r2xEXyGhoExgbO++I=", "dev": true, + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -18190,13 +19875,15 @@ "version": "3.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha1-Yzbo1xllyz01obu3hoRFp8BSZL8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha1-LtdkSiRc3dg9Tgh7mzOz5i39EK0=", + "version": "9.3.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha1-uVcqv6Yr1VbBbXX968GkEdX/MXU=", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -18211,6 +19898,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", "dev": true, + "license": "Apache-2.0", "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -18221,6 +19909,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", "integrity": "sha1-oxZXPptJ88zZDbtutSs/BsbWBOg=", "dev": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -18230,6 +19919,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -18239,6 +19929,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/void-elements/-/void-elements-2.0.1.tgz", "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -18248,6 +19939,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", "integrity": "sha1-rr3ISSDYBiIpNuPNzkCOMkiKMHM=", "dev": true, + "license": "MIT", "dependencies": { "xml-name-validator": "^4.0.0" }, @@ -18260,6 +19952,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/walker/-/walker-1.0.8.tgz", "integrity": "sha1-vUmNtHev5XPcBBhfAR06uKjXZT8=", "dev": true, + "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } @@ -18269,6 +19962,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/watchpack/-/watchpack-2.4.1.tgz", "integrity": "sha1-KTCPLKwVD6jkyS+Q4OyVSp/tf/8=", "dev": true, + "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -18282,6 +19976,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webdriver/-/webdriver-6.12.1.tgz", "integrity": "sha1-MO7mU0DqUSSqVk+ZpNvH0vllswg=", "dev": true, + "license": "MIT", "dependencies": { "@wdio/config": "6.12.1", "@wdio/logger": "6.10.10", @@ -18299,6 +19994,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webdriverio/-/webdriverio-6.12.1.tgz", "integrity": "sha1-W28RZzc716FUQZ2Kkw7x/9qdBTc=", "dev": true, + "license": "MIT", "dependencies": { "@types/puppeteer-core": "^5.4.0", "@wdio/config": "6.12.1", @@ -18333,6 +20029,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha1-WVRGDHZKjaIJS6NVS/g55rmnyG0=", "dev": true, + "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -18348,6 +20045,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/serialize-error/-/serialize-error-8.1.0.tgz", "integrity": "sha1-OgaZcMcS94Y0lC3dUPu8Dq6+L2c=", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -18363,6 +20061,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -18375,15 +20074,17 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha1-JWtOGIK+feu/AdBfCqIDl3jqCAo=", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=12" } }, "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha1-/6ksHGGNGMh48GiSu9wzc8caAdk=", + "version": "5.93.0", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack/-/webpack-5.93.0.tgz", + "integrity": "sha1-LonscDVXm9+6l2DSbGOsXDRipeU=", "dev": true, + "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", @@ -18391,10 +20092,10 @@ "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", + "enhanced-resolve": "^5.17.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -18431,6 +20132,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha1-N8HWnI2FIUxaZeWJN49TrsZNqzE=", "dev": true, + "license": "MIT", "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -18478,6 +20180,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/commander/-/commander-7.2.0.tgz", "integrity": "sha1-o2y1fQtQHOEI5NIFWaFQo5HZerc=", "dev": true, + "license": "MIT", "engines": { "node": ">= 10" } @@ -18487,6 +20190,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack-merge/-/webpack-merge-5.10.0.tgz", "integrity": "sha1-o61ddzJB6caCgDq/Yo1M1iuKQXc=", "dev": true, + "license": "MIT", "dependencies": { "clone-deep": "^4.0.1", "flat": "^5.0.2", @@ -18501,6 +20205,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha1-LU2quEUf1LJAzCcFX/agwszqDN4=", "dev": true, + "license": "MIT", "engines": { "node": ">=10.13.0" } @@ -18510,6 +20215,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", "integrity": "sha1-0DdgN4ndlVW4mq7H63iEXEkIm8U=", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -18523,6 +20229,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha1-9QqIh3w8AWUqFbYirp6Xld96YP4=", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -18541,6 +20248,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/tapable/-/tapable-2.2.1.tgz", "integrity": "sha1-GWenPvQGCoLxKrlq+G1S/bdu7KA=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -18550,6 +20258,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", "integrity": "sha1-52NfWX/YcCCFhiaAWicp+naYrFM=", "dev": true, + "license": "MIT", "dependencies": { "iconv-lite": "0.6.3" }, @@ -18562,6 +20271,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha1-pS+AvzjaGVLrXGgXkHGYcaGnJQE=", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -18574,6 +20284,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", "integrity": "sha1-X6GnYjhn/xr2yj3HKta4pCCL66c=", "dev": true, + "license": "MIT", "engines": { "node": ">=12" } @@ -18583,6 +20294,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/whatwg-url/-/whatwg-url-11.0.0.tgz", "integrity": "sha1-CoSe67X68hGbkBu3b9eVwoSNQBg=", "dev": true, + "license": "MIT", "dependencies": { "tr46": "^3.0.0", "webidl-conversions": "^7.0.0" @@ -18595,6 +20307,7 @@ "version": "2.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/which/-/which-2.0.2.tgz", "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -18610,6 +20323,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha1-3x1MIGhUNp7PPJpImPGyP72dFdM=", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } @@ -18619,6 +20333,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/widest-line/-/widest-line-3.1.0.tgz", "integrity": "sha1-gpIzO79my0X/DeFgOxNreuFJbso=", "dev": true, + "license": "MIT", "dependencies": { "string-width": "^4.0.0" }, @@ -18630,13 +20345,15 @@ "version": "2.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wildcard/-/wildcard-2.0.1.tgz", "integrity": "sha1-WrENAkhxmJVINrY0n3T/+WHhD2c=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha1-0sRcbdT7zmIaZvE2y+Mor9BBCzQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -18646,6 +20363,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -18664,6 +20382,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -18681,6 +20400,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -18696,6 +20416,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -18707,13 +20428,15 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -18729,6 +20452,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -18740,18 +20464,21 @@ "version": "1.1.4", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/color-name/-/color-name-1.1.4.tgz", "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "license": "ISC" }, "node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/write-file-atomic/-/write-file-atomic-4.0.2.tgz", "integrity": "sha1-qd8Brlt3hYoCf9LoB2juQzVV/P0=", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" @@ -18761,10 +20488,11 @@ } }, "node_modules/ws": { - "version": "6.2.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-6.2.2.tgz", - "integrity": "sha1-3Vzb1XqZeZFgl2UtePHMX66gwy4=", + "version": "6.2.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-6.2.3.tgz", + "integrity": "sha1-zMluSt1f1v7bxJGQMHXIXFoR2e4=", "dev": true, + "license": "MIT", "dependencies": { "async-limiter": "~1.0.0" } @@ -18773,13 +20501,15 @@ "version": "1.0.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/xml/-/xml-1.0.1.tgz", "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/xml-name-validator": { "version": "4.0.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/xml-name-validator/-/xml-name-validator-4.0.0.tgz", "integrity": "sha1-eaAG4uYxSahgDxVDDwpHJdFSSDU=", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12" } @@ -18789,6 +20519,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/xmlbuilder/-/xmlbuilder-12.0.0.tgz", "integrity": "sha1-4u1nXgaDSgid37hNuW4sKwP3jBo=", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0" } @@ -18797,13 +20528,15 @@ "version": "2.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha1-Bg/hvLf5x2/ioX24apvDq4lCEMs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/xtend/-/xtend-4.0.2.tgz", "integrity": "sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4" } @@ -18813,6 +20546,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/y18n/-/y18n-5.0.8.tgz", "integrity": "sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU=", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -18821,13 +20555,15 @@ "version": "3.1.1", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yallist/-/yallist-3.1.1.tgz", "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs/-/yargs-16.2.0.tgz", "integrity": "sha1-HIK/D2tqZur85+8w43b0mhJHf2Y=", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -18846,6 +20582,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha1-kJa87r+ZDSG7MfqVFuDt4pSnfTU=", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -18855,6 +20592,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha1-LrfcOwKJcY/ClfNidThFxBoMlO4=", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -18863,6 +20601,7 @@ "version": "2.10.0", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -18873,6 +20612,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yazl/-/yazl-2.5.1.tgz", "integrity": "sha1-o9ZdPdZZpbCTeFDoYJ8i//orXDU=", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3" } @@ -18882,6 +20622,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yn/-/yn-3.1.1.tgz", "integrity": "sha1-HodAGgnXZ8HV6rJqbkwYUYLS61A=", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -18891,6 +20632,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha1-ApTrPe4FAo0x7hpfosVWpqrxChs=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -18903,6 +20645,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/zip-stream/-/zip-stream-4.1.1.tgz", "integrity": "sha1-Ezf+l026/9L6mhuglmKmaTK9cTU=", "dev": true, + "license": "MIT", "dependencies": { "archiver-utils": "^3.0.4", "compress-commons": "^4.1.2", @@ -18917,6 +20660,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/archiver-utils/-/archiver-utils-3.0.4.tgz", "integrity": "sha1-oNIB8c+PznrztaBa6gozcynpbsc=", "dev": true, + "license": "MIT", "dependencies": { "glob": "^7.2.3", "graceful-fs": "^4.2.0", @@ -18938,6 +20682,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -18954,10 +20699,11 @@ } }, "node_modules/zod": { - "version": "3.22.4", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/zod/-/zod-3.22.4.tgz", - "integrity": "sha1-8xw6k4b2Gx8iivVvqpJV6EXPP/8=", + "version": "3.23.8", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/zod/-/zod-3.23.8.tgz", + "integrity": "sha1-43uVe11SB5dp+4CXCZtZLw70Bn0=", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -18997,6 +20743,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/jest-junit/-/jest-junit-16.0.0.tgz", "integrity": "sha1-2DjoxWHPn91+tU9jAgd37uQTZ4U=", "dev": true, + "license": "Apache-2.0", "dependencies": { "mkdirp": "^1.0.4", "strip-ansi": "^6.0.1", @@ -19038,6 +20785,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", "integrity": "sha1-Si99tCIJwEJccaFHbvG9ttzYNvY=", "dev": true, + "license": "MIT", "dependencies": { "comment-parser": "1.4.1", "esquery": "^1.5.0", @@ -19052,6 +20800,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", "integrity": "sha1-MIMMHKgf1fPCcU5STEMD4BlPnNM=", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.5.1", "@typescript-eslint/scope-manager": "6.21.0", @@ -19087,6 +20836,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/parser/-/parser-6.21.0.tgz", "integrity": "sha1-r4/PZv7uLtyGvF0c9F4zsGML81s=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/scope-manager": "6.21.0", "@typescript-eslint/types": "6.21.0", @@ -19115,6 +20865,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", "integrity": "sha1-6oqb/I8VBKasXVmm3zCNOgYworE=", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "6.21.0", "@typescript-eslint/visitor-keys": "6.21.0" @@ -19132,6 +20883,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", "integrity": "sha1-ZHMoHP7U2sq+gAToUhzuC9nUwB4=", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/typescript-estree": "6.21.0", "@typescript-eslint/utils": "6.21.0", @@ -19159,6 +20911,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/types/-/types-6.21.0.tgz", "integrity": "sha1-IFckxRI6j+9+zRlQdfpuhbrDQ20=", "dev": true, + "license": "MIT", "engines": { "node": "^16.0.0 || >=18.0.0" }, @@ -19172,6 +20925,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", "integrity": "sha1-xHrnkB2zuL3cPs1z2v8tCJVojEY=", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@typescript-eslint/types": "6.21.0", "@typescript-eslint/visitor-keys": "6.21.0", @@ -19200,6 +20954,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/utils/-/utils-6.21.0.tgz", "integrity": "sha1-RxTnprOedzwcjpfsWH9SCEDNgTQ=", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", @@ -19225,6 +20980,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", "integrity": "sha1-h6mdB3qlB+IOI4sR1WzCat5F/kc=", "dev": true, + "license": "MIT", "dependencies": { "@typescript-eslint/types": "6.21.0", "eslint-visitor-keys": "^3.4.1" @@ -19242,6 +20998,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -19251,6 +21008,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/comment-parser/-/comment-parser-1.4.1.tgz", "integrity": "sha1-va/q03lhrAeb4R637GXE0CHq+cw=", "dev": true, + "license": "MIT", "engines": { "node": ">= 12.0.0" } @@ -19260,6 +21018,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/debug/-/debug-4.3.5.tgz", "integrity": "sha1-6DRE7Ouf7dSh2lbWca4kRqAabh4=", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -19277,6 +21036,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -19289,6 +21049,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", "integrity": "sha1-d8hxMJxO2TdYo7L984TcYYnPhgU=", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@es-joy/jsdoccomment": "~0.41.0", "are-docs-informative": "^0.0.2", @@ -19312,6 +21073,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/minimatch/-/minimatch-9.0.3.tgz", "integrity": "sha1-puAMPeRMOlQr+q5wq/wiQgptqCU=", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -19326,13 +21088,15 @@ "version": "2.1.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ms/-/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "dev": true, + "license": "MIT" }, "src/JSInterop/Microsoft.JSInterop.JS/src/node_modules/semver": { "version": "7.6.2", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/semver/-/semver-7.6.2.tgz", "integrity": "sha1-Hjs0dZ+Jbo8U1hNHMs55iusMbhM=", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -19345,6 +21109,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", "integrity": "sha1-ojr58xMhFUZdrCFcCZMD5M6sV5Q=", "dev": true, + "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -19430,13 +21195,15 @@ "version": "9.6.61", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-9.6.61.tgz", "integrity": "sha1-KfEk7d1BxMdCgb0LRV1okQn8Ki0=", - "dev": true + "dev": true, + "license": "MIT" }, "src/SignalR/clients/ts/FunctionalTests/node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha1-QszvLFcf29D2cYsdH15uXvAG9hE=", + "version": "5.5.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha1-4bCjw5QZCDigsWjncbCtVqCvD6o=", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -19449,13 +21216,15 @@ "version": "14.18.63", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/node/-/node-14.18.63.tgz", "integrity": "sha1-F4j6jag427X56plLg0J4IF22yis=", - "dev": true + "dev": true, + "license": "MIT" }, "src/SignalR/clients/ts/node_modules/glob": { "version": "7.2.3", "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/glob/-/glob-7.2.3.tgz", "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -19476,6 +21245,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -19491,6 +21261,7 @@ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-4.9.5.tgz", "integrity": "sha1-CVl5+bzA0J2jJNWNA86Pg3TL5lo=", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -19521,9 +21292,10 @@ } }, "src/SignalR/clients/ts/signalr/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-7.5.9.tgz", - "integrity": "sha1-VPp9sp9MfOxosd3TqJ3gmZQrtZE=", + "version": "7.5.10", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ws/-/ws-7.5.10.tgz", + "integrity": "sha1-WLXCDcKBYz9sGRE/ObNJvYvVWNk=", + "license": "MIT", "engines": { "node": ">=8.3.0" }, diff --git a/src/submodules/Node-Externals b/src/submodules/Node-Externals index a1b1b1bb0163..eb33ea21fa10 160000 --- a/src/submodules/Node-Externals +++ b/src/submodules/Node-Externals @@ -1 +1 @@ -Subproject commit a1b1b1bb01630a6109adf5767d9a2770c6dc5639 +Subproject commit eb33ea21fa1013d5e97951725e9d5c52c5a6a026 From 79f745dfd906db54916bf3da2430720eaeda6254 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:48:05 +0000 Subject: [PATCH 177/257] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240715.1 (#56821) Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24362.1 -> To Version 9.0.0-alpha.1.24365.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e10aedff1f88..6119eb0b4849 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -339,9 +339,9 @@ 0d51607fb791c51a14b552ed24fe3430c252148b - + https://github.com/dotnet/source-build-reference-packages - 2fa4c4f8c0b17b48d2f37839563d6862d1974736 + 4d5ba7206ed1d56612b36560334494652ed486b2 diff --git a/eng/Versions.props b/eng/Versions.props index a1ae1b903b34..bdbd592c6614 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -172,7 +172,7 @@ 9.0.0-alpha.1.24358.3 - 9.0.0-alpha.1.24362.1 + 9.0.0-alpha.1.24365.1 2.2.0-beta.24327.2 From 13d056acf67915be1bf76cfbb25d6b33dee72aa7 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Tue, 16 Jul 2024 20:31:30 +0200 Subject: [PATCH 178/257] [Infrastructure] Update jquery-validation periodically (#56725) Adds a Github action to update jquery-validation automatically to a newer version on a monthly basis. --- .github/workflows/update-jquery-validate.yml | 54 +++++++++++++++ src/Identity/UI/jquery-validate-versions.json | 4 ++ .../Pages/V4/_ValidationScriptsPartial.cshtml | 4 +- .../Pages/V5/_ValidationScriptsPartial.cshtml | 4 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- src/Identity/UI/update-jquery-validate.mjs | 60 +++++++++++++++++ .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- src/Mvc/build/copy-files.mjs | 34 ++++++++++ src/Mvc/build/package-lock.json | 31 +++++++++ src/Mvc/build/package.json | 12 ++++ .../build/update-identity-ui-integrity.mjs | 32 +++++++++ .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- .../jquery-validation/dist/jquery.validate.js | 65 +++++++++++++++---- .../dist/jquery.validate.min.js | 6 +- 31 files changed, 885 insertions(+), 190 deletions(-) create mode 100644 .github/workflows/update-jquery-validate.yml create mode 100644 src/Identity/UI/jquery-validate-versions.json create mode 100644 src/Identity/UI/update-jquery-validate.mjs create mode 100644 src/Mvc/build/copy-files.mjs create mode 100644 src/Mvc/build/package-lock.json create mode 100644 src/Mvc/build/package.json create mode 100644 src/Mvc/build/update-identity-ui-integrity.mjs diff --git a/.github/workflows/update-jquery-validate.yml b/.github/workflows/update-jquery-validate.yml new file mode 100644 index 000000000000..839a28f24f5a --- /dev/null +++ b/.github/workflows/update-jquery-validate.yml @@ -0,0 +1,54 @@ +name: Update jquery-validation + +on: + schedule: + - cron: '0 0 1 * *' # Run on the first day of the month + workflow_dispatch: # Allow manual runs + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + update-jquery-validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Set RepoRoot + run: echo "RepoRoot=$(pwd)" >> $GITHUB_ENV + + - name: Update dependencies + working-directory: ${{ env.RepoRoot }}/src/Mvc/build + run: | + npm install --no-lockfile + npm run build + npm run update-identity-ui-scripts + echo "JQUERY_VALIDATE_VERSION=$(npm ls jquery-validation --json | jq -r '.dependencies["jquery-validation"].version')" >> $GITHUB_ENV + + - name: Update script tags + working-directory: ${{ env.RepoRoot }}/src/Identity/UI + run: node update-jquery-validate.mjs + + - name: Create Pull Request + uses: dotnet/actions-create-pull-request@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update jquery.validate to ${{ env.JQUERY_VALIDATE_VERSION }} + title: '[Templates][Identity] Update jquery-validation to ${{ env.JQUERY_VALIDATE_VERSION }}' + body: | + Updates the jquery-validation scripts to ${{ env.JQUERY_VALIDATE_VERSION }} + branch: update-jquery-validate-to-${{ env.JQUERY_VALIDATE_VERSION }} + paths: | + **/jquery.validate.js + **/jquery.validate.min.js + **/*.cshtml + src/Identity/UI/jquery-validate-versions.json diff --git a/src/Identity/UI/jquery-validate-versions.json b/src/Identity/UI/jquery-validate-versions.json new file mode 100644 index 000000000000..93e60afcb759 --- /dev/null +++ b/src/Identity/UI/jquery-validate-versions.json @@ -0,0 +1,4 @@ +{ + "currentVersion": "1.20.0", + "integrity": "sha256-ic6hxNWCB3IBDsXq0z5KpKHmcJc1anmnh0xGOi0C5Dw=" +} \ No newline at end of file diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml index b242171a9adb..b11e2f5af1f2 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml @@ -3,11 +3,11 @@ - -