From 96eed8500e47c309af1bd37bed2547ca9db3ed02 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 10:21:50 +0000
Subject: [PATCH 01/11] Initial plan
From ecb9b33c5c7fc4e5c37eed1e26dfdb926b62f15f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 10:25:38 +0000
Subject: [PATCH 02/11] Add bodyRegex support for MockStdioResponsePlugin
Add a new `bodyRegex` property to `MockStdioRequest` that allows users
to match stdin bodies using regular expressions, in addition to the
existing `bodyFragment` (case-insensitive contains) matching.
When both `bodyFragment` and `bodyRegex` are specified on a mock, both
conditions must match (AND logic). A mock is considered a startup mock
only when neither property is set.
Updated JSON schemas (v2.1.0 and v2.2.0) to include the new property.
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
.../Models/MockStdioResponse.cs | 12 +++++-
.../Mocking/MockStdioResponsePlugin.cs | 37 ++++++++++++++++---
...kstdioresponseplugin.mocksfile.schema.json | 6 ++-
...kstdioresponseplugin.mocksfile.schema.json | 6 ++-
4 files changed, 51 insertions(+), 10 deletions(-)
diff --git a/DevProxy.Abstractions/Models/MockStdioResponse.cs b/DevProxy.Abstractions/Models/MockStdioResponse.cs
index 4a39a24e..fcdcc110 100644
--- a/DevProxy.Abstractions/Models/MockStdioResponse.cs
+++ b/DevProxy.Abstractions/Models/MockStdioResponse.cs
@@ -34,11 +34,19 @@ public object Clone()
public class MockStdioRequest
{
///
- /// A fragment of the stdin body to match.
- /// If null or empty, the mock matches any stdin (or is applied immediately on startup).
+ /// A fragment of the stdin body to match (case-insensitive contains).
+ /// If null or empty and is also null or empty,
+ /// the mock matches any stdin (or is applied immediately on startup).
///
public string? BodyFragment { get; set; }
+ ///
+ /// A regular expression pattern to match against the stdin body.
+ /// If null or empty and is also null or empty,
+ /// the mock matches any stdin (or is applied immediately on startup).
+ ///
+ public string? BodyRegex { get; set; }
+
///
/// The Nth occurrence to match. If null, matches every occurrence.
///
diff --git a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
index 09a38322..95b272fc 100644
--- a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
+++ b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
@@ -202,7 +202,8 @@ private void ApplyStartupMocks(StdioRequestArgs e)
// Find mocks without stdin patterns (startup mocks)
var startupMocks = Configuration.Mocks
- .Where(m => string.IsNullOrEmpty(m.Request?.BodyFragment))
+ .Where(m => string.IsNullOrEmpty(m.Request?.BodyFragment) &&
+ string.IsNullOrEmpty(m.Request?.BodyRegex))
.ToList();
foreach (var mock in startupMocks)
@@ -249,14 +250,25 @@ Configuration.Mocks is null ||
return false;
}
- if (string.IsNullOrEmpty(mockResponse.Request.BodyFragment))
+ var hasBodyFragment = !string.IsNullOrEmpty(mockResponse.Request.BodyFragment);
+ var hasBodyRegex = !string.IsNullOrEmpty(mockResponse.Request.BodyRegex);
+
+ if (!hasBodyFragment && !hasBodyRegex)
{
- // No body fragment means startup mock, handled separately
+ // No body fragment or regex means startup mock, handled separately
return false;
}
// Check if stdin contains the body fragment
- if (!stdinBody.Contains(mockResponse.Request.BodyFragment, StringComparison.OrdinalIgnoreCase))
+ if (hasBodyFragment &&
+ !stdinBody.Contains(mockResponse.Request.BodyFragment!, StringComparison.OrdinalIgnoreCase))
+ {
+ return false;
+ }
+
+ // Check if stdin matches the body regex
+ if (hasBodyRegex &&
+ !Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase))
{
return false;
}
@@ -267,7 +279,7 @@ Configuration.Mocks is null ||
if (mockResponse?.Request is not null)
{
- var mockKey = mockResponse.Request.BodyFragment ?? "default";
+ var mockKey = GetMockKey(mockResponse);
_ = _appliedMocks.AddOrUpdate(mockKey, 1, (_, value) => ++value);
}
@@ -282,13 +294,26 @@ private bool IsNthRequest(MockStdioResponse mockResponse)
return true;
}
- var mockKey = mockResponse.Request.BodyFragment ?? "default";
+ var mockKey = GetMockKey(mockResponse);
_ = _appliedMocks.TryGetValue(mockKey, out var nth);
nth++;
return mockResponse.Request.Nth == nth;
}
+ private static string GetMockKey(MockStdioResponse mockResponse)
+ {
+ var fragment = mockResponse.Request?.BodyFragment;
+ var regex = mockResponse.Request?.BodyRegex;
+
+ if (!string.IsNullOrEmpty(fragment) && !string.IsNullOrEmpty(regex))
+ {
+ return $"{fragment}|{regex}";
+ }
+
+ return fragment ?? regex ?? "default";
+ }
+
private void ProcessMockResponse(StdioRequestArgs e, MockStdioResponse matchingResponse)
{
// Replace placeholders in the response with values from stdin
diff --git a/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
index 23582644..c3a1b7e4 100644
--- a/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
+++ b/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
@@ -20,7 +20,11 @@
"properties": {
"bodyFragment": {
"type": "string",
- "description": "(Optional) A fragment of the stdin body to match. If null or empty, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
+ },
+ "bodyRegex": {
+ "type": "string",
+ "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
diff --git a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
index 23582644..c3a1b7e4 100644
--- a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
+++ b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
@@ -20,7 +20,11 @@
"properties": {
"bodyFragment": {
"type": "string",
- "description": "(Optional) A fragment of the stdin body to match. If null or empty, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
+ },
+ "bodyRegex": {
+ "type": "string",
+ "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
From bfae8d3800a540b5a67612da8adb6fbceda9bf39 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 10:26:40 +0000
Subject: [PATCH 03/11] Add timeout to regex matching to prevent ReDoS
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
index 95b272fc..a621fa95 100644
--- a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
+++ b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
@@ -268,7 +268,7 @@ Configuration.Mocks is null ||
// Check if stdin matches the body regex
if (hasBodyRegex &&
- !Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase))
+ !Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(5)))
{
return false;
}
From 869ee6e762b62f645805d8d5ea8b9f7ed538e4e5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 10:28:32 +0000
Subject: [PATCH 04/11] Final: all checks pass
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
DevProxy/packages.lock.json | 275 ++++++++++++++++++++++++++++++++++--
1 file changed, 263 insertions(+), 12 deletions(-)
diff --git a/DevProxy/packages.lock.json b/DevProxy/packages.lock.json
index d55e4a3e..1c0d4603 100644
--- a/DevProxy/packages.lock.json
+++ b/DevProxy/packages.lock.json
@@ -10,7 +10,9 @@
"dependencies": {
"Azure.Core": "1.44.1",
"Microsoft.Identity.Client": "4.67.2",
- "Microsoft.Identity.Client.Extensions.Msal": "4.67.2"
+ "Microsoft.Identity.Client.Extensions.Msal": "4.67.2",
+ "System.Memory": "4.5.5",
+ "System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
@@ -20,9 +22,13 @@
"contentHash": "YruNASPuiCjLOVxO09lpQT4e2OYvpsoD0e5NGEQKOcPCu143RDzWTNlpzcxhArBgAS0FPwQ+OEGZOWhwgWHvOA==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Sqlite.Core": "9.0.4",
+ "Microsoft.Extensions.Caching.Memory": "9.0.4",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
"Microsoft.Extensions.DependencyModel": "9.0.4",
+ "Microsoft.Extensions.Logging": "9.0.4",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.10",
- "SQLitePCLRaw.core": "2.1.10"
+ "SQLitePCLRaw.core": "2.1.10",
+ "System.Text.Json": "9.0.4"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
@@ -68,6 +74,8 @@
"resolved": "1.12.0",
"contentHash": "aIEu2O3xFOdwIVH0AJsIHPIMH1YuX18nzu7BHyaDNQ6NWSk4Zyrs9Pp6y8SATuSbvdtmvue4mj/QZ3838srbwA==",
"dependencies": {
+ "Microsoft.Extensions.Diagnostics.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Logging.Configuration": "9.0.0",
"OpenTelemetry.Api.ProviderBuilderExtensions": "1.12.0"
}
},
@@ -114,7 +122,9 @@
"resolved": "0.1.5",
"contentHash": "HiICGm0e44+i4aVHpLn+aphmSC2eQnDvlTttw1rE0hntOZKoLGRy37sydqqbRP1ZokMf3Mt0GEgSWxDwnucKGg==",
"dependencies": {
- "BouncyCastle.Cryptography": "2.4.0"
+ "BouncyCastle.Cryptography": "2.4.0",
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.1",
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"Azure.Core": {
@@ -124,7 +134,12 @@
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.ClientModel": "1.1.0",
- "System.Memory.Data": "6.0.0"
+ "System.Diagnostics.DiagnosticSource": "6.0.1",
+ "System.Memory.Data": "6.0.0",
+ "System.Numerics.Vectors": "4.5.0",
+ "System.Text.Encodings.Web": "6.0.0",
+ "System.Text.Json": "6.0.10",
+ "System.Threading.Tasks.Extensions": "4.5.4"
}
},
"BouncyCastle.Cryptography": {
@@ -156,7 +171,9 @@
"contentHash": "+5IAX0aicQYCRfN4pAjad+JPwdEYoVEM3Z1Cl8/EiEv3FVHQHdd8TJQpQIslQDDQS/UsUMb0MsOXwqOh+TJtRw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Abstractions": "9.0.4",
- "Microsoft.EntityFrameworkCore.Analyzers": "9.0.4"
+ "Microsoft.EntityFrameworkCore.Analyzers": "9.0.4",
+ "Microsoft.Extensions.Caching.Memory": "9.0.4",
+ "Microsoft.Extensions.Logging": "9.0.4"
}
},
"Microsoft.EntityFrameworkCore.Abstractions": {
@@ -174,7 +191,10 @@
"resolved": "9.0.4",
"contentHash": "OjJ+xh/wQff5b0wiC3SPvoQqTA2boZeJQf+15+3+OJPtjBKzvxuwr25QRIu1p1t+K8ryQ8pzaoZ7eOpXfNzVGA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "9.0.4"
+ "Microsoft.EntityFrameworkCore": "9.0.4",
+ "Microsoft.Extensions.Caching.Memory": "9.0.4",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Logging": "9.0.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
@@ -184,8 +204,12 @@
"dependencies": {
"Microsoft.Data.Sqlite.Core": "9.0.4",
"Microsoft.EntityFrameworkCore.Relational": "9.0.4",
+ "Microsoft.Extensions.Caching.Memory": "9.0.4",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
"Microsoft.Extensions.DependencyModel": "9.0.4",
- "SQLitePCLRaw.core": "2.1.10"
+ "Microsoft.Extensions.Logging": "9.0.4",
+ "SQLitePCLRaw.core": "2.1.10",
+ "System.Text.Json": "9.0.4"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
@@ -193,17 +217,190 @@
"resolved": "6.0.5",
"contentHash": "Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw=="
},
+ "Microsoft.Extensions.Caching.Abstractions": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "imcZ5BGhBw5mNsWLepBbqqumWaFe0GtvyCvne2/2wsDIBRa2+Lhx4cU/pKt/4BwOizzUEOls2k1eOJQXHGMalg==",
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Caching.Memory": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "G5rEq1Qez5VJDTEyRsRUnewAspKjaY57VGsdZ8g8Ja6sXXzoiI3PpTd1t43HjHqNWD5A06MQveb2lscn+2CU+w==",
+ "dependencies": {
+ "Microsoft.Extensions.Caching.Abstractions": "9.0.4",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Logging.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Options": "9.0.4",
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Configuration": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "KIVBrMbItnCJDd1RF4KEaE8jZwDJcDUJW5zXpbwQ05HNYTK1GveHxHK0B3SjgDJuR48GRACXAO+BLhL8h34S7g==",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Configuration.Abstractions": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "0LN/DiIKvBrkqp7gkF3qhGIeZk6/B63PthAHjQsxymJfIBcz0kbf4/p/t4lMgggVxZ+flRi5xvTwlpPOoZk8fg==",
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Configuration.Binder": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "cdrjcl9RIcwt3ECbnpP0Gt1+pkjdW90mq5yFYy8D9qRj2NqFFcv3yDp141iEamsd9E218sGxK8WHaIOcrqgDJg==",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Configuration.FileExtensions": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "UY864WQ3AS2Fkc8fYLombWnjrXwYt+BEHHps0hY4sxlgqaVW06AxbpgRZjfYf8PyRbplJqruzZDB/nSLT+7RLQ==",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration": "9.0.4",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.4",
+ "Microsoft.Extensions.FileProviders.Physical": "9.0.4",
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Configuration.Json": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "vVXI70CgT/dmXV3MM+n/BR2rLXEoAyoK0hQT+8MrbCMuJBiLRxnTtSrksNiASWCwOtxo/Tyy7CO8AGthbsYxnw==",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration": "9.0.4",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Configuration.FileExtensions": "9.0.4",
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "f2MTUaS2EQ3lX4325ytPAISZqgBfXmY0WvgD80ji6Z20AoDNiCESxsqo6mFRwHJD/jfVKRw9FsW6+86gNre3ug==",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "UI0TQPVkS78bFdjkTodmkH0Fe8lXv9LnhGFKgKrsgUJ5a5FVdFRcgjIkBVLbGgdRhxWirxH/8IXUtEyYJx6GQg=="
+ },
"Microsoft.Extensions.DependencyModel": {
"type": "Transitive",
"resolved": "9.0.4",
"contentHash": "ACtnvl3H3M/f8Z42980JxsNu7V9PPbzys4vBs83ZewnsgKd7JeYK18OMPo0g+MxAHrpgMrjmlinXDiaSRPcVnA=="
},
+ "Microsoft.Extensions.Diagnostics.Abstractions": {
+ "type": "Transitive",
+ "resolved": "9.0.0",
+ "contentHash": "1K8P7XzuzX8W8pmXcZjcrqS6x5eSSdvhQohmcpgiQNY/HlDAlnrhR9dvlURfFz428A+RTCJpUyB+aKTA6AgVcQ==",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Options": "9.0.0"
+ }
+ },
+ "Microsoft.Extensions.FileProviders.Abstractions": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "gQN2o/KnBfVk6Bd71E2YsvO5lsqrqHmaepDGk+FB/C4aiQY9B0XKKNKfl5/TqcNOs9OEithm4opiMHAErMFyEw==",
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.FileProviders.Physical": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "qkQ9V7KFZdTWNThT7ke7E/Jad38s46atSs3QUYZB8f3thBTrcrousdY4Y/tyCtcH5YjsPSiByjuN+L8W/ThMQg==",
+ "dependencies": {
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.4",
+ "Microsoft.Extensions.FileSystemGlobbing": "9.0.4",
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.FileSystemGlobbing": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ=="
+ },
+ "Microsoft.Extensions.Logging": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "xW6QPYsqhbuWBO9/1oA43g/XPKbohJx+7G8FLQgQXIriYvY7s+gxr2wjQJfRoPO900dvvv2vVH7wZovG+M1m6w==",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection": "9.0.4",
+ "Microsoft.Extensions.Logging.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Options": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Logging.Abstractions": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "0MXlimU4Dud6t+iNi5NEz3dO2w1HXdhoOLaYFuLPCjAsvlPQGwOT6V2KZRMLEhCAm/stSZt1AUv0XmDdkjvtbw==",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Logging.Configuration": {
+ "type": "Transitive",
+ "resolved": "9.0.0",
+ "contentHash": "H05HiqaNmg6GjH34ocYE9Wm1twm3Oz2aXZko8GTwGBzM7op2brpAA8pJ5yyD1OpS1mXUtModBYOlcZ/wXeWsSg==",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration": "9.0.0",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Configuration.Binder": "9.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Logging": "9.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Options": "9.0.0",
+ "Microsoft.Extensions.Options.ConfigurationExtensions": "9.0.0"
+ }
+ },
+ "Microsoft.Extensions.Options": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "fiFI2+58kicqVZyt/6obqoFwHiab7LC4FkQ3mmiBJ28Yy4fAvy2+v9MRnSvvlOO8chTOjKsdafFl/K9veCPo5g==",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4",
+ "Microsoft.Extensions.Primitives": "9.0.4"
+ }
+ },
+ "Microsoft.Extensions.Options.ConfigurationExtensions": {
+ "type": "Transitive",
+ "resolved": "9.0.0",
+ "contentHash": "Ob3FXsXkcSMQmGZi7qP07EQ39kZpSBlTcAZLbJLdI4FIf0Jug8biv2HTavWmnTirchctPlq9bl/26CXtQRguzA==",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Configuration.Binder": "9.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
+ "Microsoft.Extensions.Options": "9.0.0",
+ "Microsoft.Extensions.Primitives": "9.0.0"
+ }
+ },
+ "Microsoft.Extensions.Primitives": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "SPFyMjyku1nqTFFJ928JAMd0QnRe4xjE7KeKnZMWXf3xk+6e0WiOZAluYtLdbJUXtsl2cCRSi8cBquJ408k8RA=="
+ },
"Microsoft.Identity.Client": {
"type": "Transitive",
"resolved": "4.67.2",
"contentHash": "37t0TfekfG6XM8kue/xNaA66Qjtti5Qe1xA41CK+bEd8VD76/oXJc+meFJHGzygIC485dCpKoamG/pDfb9Qd7Q==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.35.0"
+ "Microsoft.IdentityModel.Abstractions": "6.35.0",
+ "System.Diagnostics.DiagnosticSource": "6.0.1"
}
},
"Microsoft.Identity.Client.Extensions.Msal": {
@@ -249,6 +446,7 @@
"resolved": "8.9.0",
"contentHash": "qK6kW5qZvDj7E5RLWQ9gzJxQe5GUz7+7bXrLQQydSDF9hTf5Ip2qHuAQW3Fg9GND6jkjTr7IXAZFmBHadNQi4Q==",
"dependencies": {
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.2",
"Microsoft.IdentityModel.Logging": "8.9.0"
}
},
@@ -286,13 +484,17 @@
"OpenTelemetry.Api": {
"type": "Transitive",
"resolved": "1.12.0",
- "contentHash": "Xt0qldi+iE2szGrM3jAqzEMEJd48YBtqI6mge0+ArXTZg3aTpRmyhL6CKKl3bLioaFSSVbBpEbPin8u6Z46Yrw=="
+ "contentHash": "Xt0qldi+iE2szGrM3jAqzEMEJd48YBtqI6mge0+ArXTZg3aTpRmyhL6CKKl3bLioaFSSVbBpEbPin8u6Z46Yrw==",
+ "dependencies": {
+ "System.Diagnostics.DiagnosticSource": "9.0.0"
+ }
},
"OpenTelemetry.Api.ProviderBuilderExtensions": {
"type": "Transitive",
"resolved": "1.12.0",
"contentHash": "t6Vk1143BfiisCWYbRcyzkAuN6Aq5RkYtfOSMoqCIRMvtN9p1e1xzc0nWQ+fccNGOVgHn3aMK5xFn2+iWMcr8A==",
"dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
"OpenTelemetry.Api": "1.12.0"
}
},
@@ -318,7 +520,10 @@
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.10",
- "contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw=="
+ "contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw==",
+ "dependencies": {
+ "System.Memory": "4.5.3"
+ }
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
@@ -359,19 +564,61 @@
"resolved": "1.1.0",
"contentHash": "UocOlCkxLZrG2CKMAAImPcldJTxeesHnHGHwhJ0pNlZEvEXcWKuQvVOER2/NiOkJGRJk978SNdw3j6/7O9H1lg==",
"dependencies": {
- "System.Memory.Data": "1.0.2"
+ "System.Memory.Data": "1.0.2",
+ "System.Text.Json": "6.0.9"
}
},
+ "System.Diagnostics.DiagnosticSource": {
+ "type": "Transitive",
+ "resolved": "9.0.0",
+ "contentHash": "ddppcFpnbohLWdYKr/ZeLZHmmI+DXFgZ3Snq+/E7SwcdW4UnvxmaugkwGywvGVWkHPGCSZjCP+MLzu23AL5SDw=="
+ },
+ "System.Memory": {
+ "type": "Transitive",
+ "resolved": "4.5.5",
+ "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
+ },
"System.Memory.Data": {
"type": "Transitive",
"resolved": "6.0.0",
- "contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ=="
+ "contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ==",
+ "dependencies": {
+ "System.Text.Json": "6.0.0"
+ }
+ },
+ "System.Numerics.Vectors": {
+ "type": "Transitive",
+ "resolved": "4.5.0",
+ "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
+ },
+ "System.Runtime.CompilerServices.Unsafe": {
+ "type": "Transitive",
+ "resolved": "6.0.0",
+ "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Security.Cryptography.ProtectedData": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "wLBKzFnDCxP12VL9ANydSYhk59fC4cvOr9ypYQLPnAj48NQIhqnjdD2yhP8yEKyBJEjERWS9DisKL7rX5eU25Q=="
},
+ "System.Text.Encodings.Web": {
+ "type": "Transitive",
+ "resolved": "6.0.0",
+ "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ }
+ },
+ "System.Text.Json": {
+ "type": "Transitive",
+ "resolved": "9.0.4",
+ "contentHash": "pYtmpcO6R3Ef1XilZEHgXP2xBPVORbYEzRP7dl0IAAbN8Dm+kfwio8aCKle97rAWXOExr292MuxWYurIuwN62g=="
+ },
+ "System.Threading.Tasks.Extensions": {
+ "type": "Transitive",
+ "resolved": "4.5.4",
+ "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
+ },
"YamlDotNet": {
"type": "Transitive",
"resolved": "16.3.0",
@@ -382,6 +629,10 @@
"dependencies": {
"Markdig": "[0.41.3, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[9.0.4, )",
+ "Microsoft.Extensions.Configuration": "[9.0.4, )",
+ "Microsoft.Extensions.Configuration.Binder": "[9.0.4, )",
+ "Microsoft.Extensions.Configuration.Json": "[9.0.4, )",
+ "Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.OpenApi.Readers": "[1.6.24, )",
"Newtonsoft.Json.Schema": "[4.0.1, )",
"Scriban": "[6.2.1, )",
From f2e510ac555c2e932ba694312f43a65d1432bb13 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 12:55:29 +0000
Subject: [PATCH 05/11] Change bodyFragment/bodyRegex to either/or instead of
AND logic
When both bodyFragment and bodyRegex are specified, bodyRegex takes
precedence. The schema and docs now indicate they are mutually
exclusive options for matching stdin body content.
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
.../Models/MockStdioResponse.cs | 10 +++---
.../Mocking/MockStdioResponsePlugin.cs | 32 ++++++++-----------
...kstdioresponseplugin.mocksfile.schema.json | 4 +--
...kstdioresponseplugin.mocksfile.schema.json | 4 +--
4 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/DevProxy.Abstractions/Models/MockStdioResponse.cs b/DevProxy.Abstractions/Models/MockStdioResponse.cs
index fcdcc110..b25dca59 100644
--- a/DevProxy.Abstractions/Models/MockStdioResponse.cs
+++ b/DevProxy.Abstractions/Models/MockStdioResponse.cs
@@ -35,15 +35,15 @@ public class MockStdioRequest
{
///
/// A fragment of the stdin body to match (case-insensitive contains).
- /// If null or empty and is also null or empty,
- /// the mock matches any stdin (or is applied immediately on startup).
+ /// Use either or , not both.
+ /// If neither is specified, the mock matches any stdin (or is applied immediately on startup).
///
public string? BodyFragment { get; set; }
///
- /// A regular expression pattern to match against the stdin body.
- /// If null or empty and is also null or empty,
- /// the mock matches any stdin (or is applied immediately on startup).
+ /// A regular expression pattern to match against the stdin body (case-insensitive).
+ /// Use either or , not both.
+ /// If neither is specified, the mock matches any stdin (or is applied immediately on startup).
///
public string? BodyRegex { get; set; }
diff --git a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
index a621fa95..8eb7ef8a 100644
--- a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
+++ b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
@@ -259,18 +259,20 @@ Configuration.Mocks is null ||
return false;
}
- // Check if stdin contains the body fragment
- if (hasBodyFragment &&
- !stdinBody.Contains(mockResponse.Request.BodyFragment!, StringComparison.OrdinalIgnoreCase))
+ // Use bodyRegex if specified, otherwise use bodyFragment (either/or)
+ if (hasBodyRegex)
{
- return false;
+ if (!Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(5)))
+ {
+ return false;
+ }
}
-
- // Check if stdin matches the body regex
- if (hasBodyRegex &&
- !Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(5)))
+ else if (hasBodyFragment)
{
- return false;
+ if (!stdinBody.Contains(mockResponse.Request.BodyFragment!, StringComparison.OrdinalIgnoreCase))
+ {
+ return false;
+ }
}
// Check Nth condition
@@ -303,15 +305,9 @@ private bool IsNthRequest(MockStdioResponse mockResponse)
private static string GetMockKey(MockStdioResponse mockResponse)
{
- var fragment = mockResponse.Request?.BodyFragment;
- var regex = mockResponse.Request?.BodyRegex;
-
- if (!string.IsNullOrEmpty(fragment) && !string.IsNullOrEmpty(regex))
- {
- return $"{fragment}|{regex}";
- }
-
- return fragment ?? regex ?? "default";
+ return mockResponse.Request?.BodyRegex
+ ?? mockResponse.Request?.BodyFragment
+ ?? "default";
}
private void ProcessMockResponse(StdioRequestArgs e, MockStdioResponse matchingResponse)
diff --git a/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
index c3a1b7e4..ce3adb86 100644
--- a/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
+++ b/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
@@ -20,11 +20,11 @@
"properties": {
"bodyFragment": {
"type": "string",
- "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). Use either bodyFragment or bodyRegex, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"bodyRegex": {
"type": "string",
- "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). Use either bodyRegex or bodyFragment, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
diff --git a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
index c3a1b7e4..ce3adb86 100644
--- a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
+++ b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
@@ -20,11 +20,11 @@
"properties": {
"bodyFragment": {
"type": "string",
- "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). Use either bodyFragment or bodyRegex, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"bodyRegex": {
"type": "string",
- "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). If neither bodyFragment nor bodyRegex is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). Use either bodyRegex or bodyFragment, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
From db1f6e9ae4cb9c14e29603ab3fa45c853c483ea5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 12:57:59 +0000
Subject: [PATCH 06/11] =?UTF-8?q?Revert=20v2.1.0=20schema=20changes=20?=
=?UTF-8?q?=E2=80=94=20only=20ship=20bodyRegex=20in=20v2.2.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
.../v2.1.0/mockstdioresponseplugin.mocksfile.schema.json | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
index ce3adb86..23582644 100644
--- a/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
+++ b/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json
@@ -20,11 +20,7 @@
"properties": {
"bodyFragment": {
"type": "string",
- "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). Use either bodyFragment or bodyRegex, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
- },
- "bodyRegex": {
- "type": "string",
- "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). Use either bodyRegex or bodyFragment, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A fragment of the stdin body to match. If null or empty, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
From 99233ad9bf8fab54bfe70dafa6ec7ed9090f3db6 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Feb 2026 14:00:00 +0000
Subject: [PATCH 07/11] Revert unintended packages.lock.json changes
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
DevProxy/packages.lock.json | 275 ++----------------------------------
1 file changed, 12 insertions(+), 263 deletions(-)
diff --git a/DevProxy/packages.lock.json b/DevProxy/packages.lock.json
index 1c0d4603..d55e4a3e 100644
--- a/DevProxy/packages.lock.json
+++ b/DevProxy/packages.lock.json
@@ -10,9 +10,7 @@
"dependencies": {
"Azure.Core": "1.44.1",
"Microsoft.Identity.Client": "4.67.2",
- "Microsoft.Identity.Client.Extensions.Msal": "4.67.2",
- "System.Memory": "4.5.5",
- "System.Threading.Tasks.Extensions": "4.5.4"
+ "Microsoft.Identity.Client.Extensions.Msal": "4.67.2"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
@@ -22,13 +20,9 @@
"contentHash": "YruNASPuiCjLOVxO09lpQT4e2OYvpsoD0e5NGEQKOcPCu143RDzWTNlpzcxhArBgAS0FPwQ+OEGZOWhwgWHvOA==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Sqlite.Core": "9.0.4",
- "Microsoft.Extensions.Caching.Memory": "9.0.4",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
"Microsoft.Extensions.DependencyModel": "9.0.4",
- "Microsoft.Extensions.Logging": "9.0.4",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.10",
- "SQLitePCLRaw.core": "2.1.10",
- "System.Text.Json": "9.0.4"
+ "SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect": {
@@ -74,8 +68,6 @@
"resolved": "1.12.0",
"contentHash": "aIEu2O3xFOdwIVH0AJsIHPIMH1YuX18nzu7BHyaDNQ6NWSk4Zyrs9Pp6y8SATuSbvdtmvue4mj/QZ3838srbwA==",
"dependencies": {
- "Microsoft.Extensions.Diagnostics.Abstractions": "9.0.0",
- "Microsoft.Extensions.Logging.Configuration": "9.0.0",
"OpenTelemetry.Api.ProviderBuilderExtensions": "1.12.0"
}
},
@@ -122,9 +114,7 @@
"resolved": "0.1.5",
"contentHash": "HiICGm0e44+i4aVHpLn+aphmSC2eQnDvlTttw1rE0hntOZKoLGRy37sydqqbRP1ZokMf3Mt0GEgSWxDwnucKGg==",
"dependencies": {
- "BouncyCastle.Cryptography": "2.4.0",
- "Microsoft.Extensions.Logging.Abstractions": "8.0.1",
- "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ "BouncyCastle.Cryptography": "2.4.0"
}
},
"Azure.Core": {
@@ -134,12 +124,7 @@
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.ClientModel": "1.1.0",
- "System.Diagnostics.DiagnosticSource": "6.0.1",
- "System.Memory.Data": "6.0.0",
- "System.Numerics.Vectors": "4.5.0",
- "System.Text.Encodings.Web": "6.0.0",
- "System.Text.Json": "6.0.10",
- "System.Threading.Tasks.Extensions": "4.5.4"
+ "System.Memory.Data": "6.0.0"
}
},
"BouncyCastle.Cryptography": {
@@ -171,9 +156,7 @@
"contentHash": "+5IAX0aicQYCRfN4pAjad+JPwdEYoVEM3Z1Cl8/EiEv3FVHQHdd8TJQpQIslQDDQS/UsUMb0MsOXwqOh+TJtRw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Abstractions": "9.0.4",
- "Microsoft.EntityFrameworkCore.Analyzers": "9.0.4",
- "Microsoft.Extensions.Caching.Memory": "9.0.4",
- "Microsoft.Extensions.Logging": "9.0.4"
+ "Microsoft.EntityFrameworkCore.Analyzers": "9.0.4"
}
},
"Microsoft.EntityFrameworkCore.Abstractions": {
@@ -191,10 +174,7 @@
"resolved": "9.0.4",
"contentHash": "OjJ+xh/wQff5b0wiC3SPvoQqTA2boZeJQf+15+3+OJPtjBKzvxuwr25QRIu1p1t+K8ryQ8pzaoZ7eOpXfNzVGA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "9.0.4",
- "Microsoft.Extensions.Caching.Memory": "9.0.4",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
- "Microsoft.Extensions.Logging": "9.0.4"
+ "Microsoft.EntityFrameworkCore": "9.0.4"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
@@ -204,12 +184,8 @@
"dependencies": {
"Microsoft.Data.Sqlite.Core": "9.0.4",
"Microsoft.EntityFrameworkCore.Relational": "9.0.4",
- "Microsoft.Extensions.Caching.Memory": "9.0.4",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
"Microsoft.Extensions.DependencyModel": "9.0.4",
- "Microsoft.Extensions.Logging": "9.0.4",
- "SQLitePCLRaw.core": "2.1.10",
- "System.Text.Json": "9.0.4"
+ "SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
@@ -217,190 +193,17 @@
"resolved": "6.0.5",
"contentHash": "Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw=="
},
- "Microsoft.Extensions.Caching.Abstractions": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "imcZ5BGhBw5mNsWLepBbqqumWaFe0GtvyCvne2/2wsDIBRa2+Lhx4cU/pKt/4BwOizzUEOls2k1eOJQXHGMalg==",
- "dependencies": {
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.Caching.Memory": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "G5rEq1Qez5VJDTEyRsRUnewAspKjaY57VGsdZ8g8Ja6sXXzoiI3PpTd1t43HjHqNWD5A06MQveb2lscn+2CU+w==",
- "dependencies": {
- "Microsoft.Extensions.Caching.Abstractions": "9.0.4",
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4",
- "Microsoft.Extensions.Logging.Abstractions": "9.0.4",
- "Microsoft.Extensions.Options": "9.0.4",
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.Configuration": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "KIVBrMbItnCJDd1RF4KEaE8jZwDJcDUJW5zXpbwQ05HNYTK1GveHxHK0B3SjgDJuR48GRACXAO+BLhL8h34S7g==",
- "dependencies": {
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.Configuration.Abstractions": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "0LN/DiIKvBrkqp7gkF3qhGIeZk6/B63PthAHjQsxymJfIBcz0kbf4/p/t4lMgggVxZ+flRi5xvTwlpPOoZk8fg==",
- "dependencies": {
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.Configuration.Binder": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "cdrjcl9RIcwt3ECbnpP0Gt1+pkjdW90mq5yFYy8D9qRj2NqFFcv3yDp141iEamsd9E218sGxK8WHaIOcrqgDJg==",
- "dependencies": {
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4"
- }
- },
- "Microsoft.Extensions.Configuration.FileExtensions": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "UY864WQ3AS2Fkc8fYLombWnjrXwYt+BEHHps0hY4sxlgqaVW06AxbpgRZjfYf8PyRbplJqruzZDB/nSLT+7RLQ==",
- "dependencies": {
- "Microsoft.Extensions.Configuration": "9.0.4",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.4",
- "Microsoft.Extensions.FileProviders.Physical": "9.0.4",
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.Configuration.Json": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "vVXI70CgT/dmXV3MM+n/BR2rLXEoAyoK0hQT+8MrbCMuJBiLRxnTtSrksNiASWCwOtxo/Tyy7CO8AGthbsYxnw==",
- "dependencies": {
- "Microsoft.Extensions.Configuration": "9.0.4",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.4",
- "Microsoft.Extensions.Configuration.FileExtensions": "9.0.4",
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.4"
- }
- },
- "Microsoft.Extensions.DependencyInjection": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "f2MTUaS2EQ3lX4325ytPAISZqgBfXmY0WvgD80ji6Z20AoDNiCESxsqo6mFRwHJD/jfVKRw9FsW6+86gNre3ug==",
- "dependencies": {
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4"
- }
- },
- "Microsoft.Extensions.DependencyInjection.Abstractions": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "UI0TQPVkS78bFdjkTodmkH0Fe8lXv9LnhGFKgKrsgUJ5a5FVdFRcgjIkBVLbGgdRhxWirxH/8IXUtEyYJx6GQg=="
- },
"Microsoft.Extensions.DependencyModel": {
"type": "Transitive",
"resolved": "9.0.4",
"contentHash": "ACtnvl3H3M/f8Z42980JxsNu7V9PPbzys4vBs83ZewnsgKd7JeYK18OMPo0g+MxAHrpgMrjmlinXDiaSRPcVnA=="
},
- "Microsoft.Extensions.Diagnostics.Abstractions": {
- "type": "Transitive",
- "resolved": "9.0.0",
- "contentHash": "1K8P7XzuzX8W8pmXcZjcrqS6x5eSSdvhQohmcpgiQNY/HlDAlnrhR9dvlURfFz428A+RTCJpUyB+aKTA6AgVcQ==",
- "dependencies": {
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
- "Microsoft.Extensions.Options": "9.0.0"
- }
- },
- "Microsoft.Extensions.FileProviders.Abstractions": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "gQN2o/KnBfVk6Bd71E2YsvO5lsqrqHmaepDGk+FB/C4aiQY9B0XKKNKfl5/TqcNOs9OEithm4opiMHAErMFyEw==",
- "dependencies": {
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.FileProviders.Physical": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "qkQ9V7KFZdTWNThT7ke7E/Jad38s46atSs3QUYZB8f3thBTrcrousdY4Y/tyCtcH5YjsPSiByjuN+L8W/ThMQg==",
- "dependencies": {
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.4",
- "Microsoft.Extensions.FileSystemGlobbing": "9.0.4",
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.FileSystemGlobbing": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ=="
- },
- "Microsoft.Extensions.Logging": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "xW6QPYsqhbuWBO9/1oA43g/XPKbohJx+7G8FLQgQXIriYvY7s+gxr2wjQJfRoPO900dvvv2vVH7wZovG+M1m6w==",
- "dependencies": {
- "Microsoft.Extensions.DependencyInjection": "9.0.4",
- "Microsoft.Extensions.Logging.Abstractions": "9.0.4",
- "Microsoft.Extensions.Options": "9.0.4"
- }
- },
- "Microsoft.Extensions.Logging.Abstractions": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "0MXlimU4Dud6t+iNi5NEz3dO2w1HXdhoOLaYFuLPCjAsvlPQGwOT6V2KZRMLEhCAm/stSZt1AUv0XmDdkjvtbw==",
- "dependencies": {
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4"
- }
- },
- "Microsoft.Extensions.Logging.Configuration": {
- "type": "Transitive",
- "resolved": "9.0.0",
- "contentHash": "H05HiqaNmg6GjH34ocYE9Wm1twm3Oz2aXZko8GTwGBzM7op2brpAA8pJ5yyD1OpS1mXUtModBYOlcZ/wXeWsSg==",
- "dependencies": {
- "Microsoft.Extensions.Configuration": "9.0.0",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.0",
- "Microsoft.Extensions.Configuration.Binder": "9.0.0",
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
- "Microsoft.Extensions.Logging": "9.0.0",
- "Microsoft.Extensions.Logging.Abstractions": "9.0.0",
- "Microsoft.Extensions.Options": "9.0.0",
- "Microsoft.Extensions.Options.ConfigurationExtensions": "9.0.0"
- }
- },
- "Microsoft.Extensions.Options": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "fiFI2+58kicqVZyt/6obqoFwHiab7LC4FkQ3mmiBJ28Yy4fAvy2+v9MRnSvvlOO8chTOjKsdafFl/K9veCPo5g==",
- "dependencies": {
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.4",
- "Microsoft.Extensions.Primitives": "9.0.4"
- }
- },
- "Microsoft.Extensions.Options.ConfigurationExtensions": {
- "type": "Transitive",
- "resolved": "9.0.0",
- "contentHash": "Ob3FXsXkcSMQmGZi7qP07EQ39kZpSBlTcAZLbJLdI4FIf0Jug8biv2HTavWmnTirchctPlq9bl/26CXtQRguzA==",
- "dependencies": {
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.0",
- "Microsoft.Extensions.Configuration.Binder": "9.0.0",
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
- "Microsoft.Extensions.Options": "9.0.0",
- "Microsoft.Extensions.Primitives": "9.0.0"
- }
- },
- "Microsoft.Extensions.Primitives": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "SPFyMjyku1nqTFFJ928JAMd0QnRe4xjE7KeKnZMWXf3xk+6e0WiOZAluYtLdbJUXtsl2cCRSi8cBquJ408k8RA=="
- },
"Microsoft.Identity.Client": {
"type": "Transitive",
"resolved": "4.67.2",
"contentHash": "37t0TfekfG6XM8kue/xNaA66Qjtti5Qe1xA41CK+bEd8VD76/oXJc+meFJHGzygIC485dCpKoamG/pDfb9Qd7Q==",
"dependencies": {
- "Microsoft.IdentityModel.Abstractions": "6.35.0",
- "System.Diagnostics.DiagnosticSource": "6.0.1"
+ "Microsoft.IdentityModel.Abstractions": "6.35.0"
}
},
"Microsoft.Identity.Client.Extensions.Msal": {
@@ -446,7 +249,6 @@
"resolved": "8.9.0",
"contentHash": "qK6kW5qZvDj7E5RLWQ9gzJxQe5GUz7+7bXrLQQydSDF9hTf5Ip2qHuAQW3Fg9GND6jkjTr7IXAZFmBHadNQi4Q==",
"dependencies": {
- "Microsoft.Extensions.Logging.Abstractions": "8.0.2",
"Microsoft.IdentityModel.Logging": "8.9.0"
}
},
@@ -484,17 +286,13 @@
"OpenTelemetry.Api": {
"type": "Transitive",
"resolved": "1.12.0",
- "contentHash": "Xt0qldi+iE2szGrM3jAqzEMEJd48YBtqI6mge0+ArXTZg3aTpRmyhL6CKKl3bLioaFSSVbBpEbPin8u6Z46Yrw==",
- "dependencies": {
- "System.Diagnostics.DiagnosticSource": "9.0.0"
- }
+ "contentHash": "Xt0qldi+iE2szGrM3jAqzEMEJd48YBtqI6mge0+ArXTZg3aTpRmyhL6CKKl3bLioaFSSVbBpEbPin8u6Z46Yrw=="
},
"OpenTelemetry.Api.ProviderBuilderExtensions": {
"type": "Transitive",
"resolved": "1.12.0",
"contentHash": "t6Vk1143BfiisCWYbRcyzkAuN6Aq5RkYtfOSMoqCIRMvtN9p1e1xzc0nWQ+fccNGOVgHn3aMK5xFn2+iWMcr8A==",
"dependencies": {
- "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
"OpenTelemetry.Api": "1.12.0"
}
},
@@ -520,10 +318,7 @@
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.10",
- "contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw==",
- "dependencies": {
- "System.Memory": "4.5.3"
- }
+ "contentHash": "Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw=="
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
@@ -564,61 +359,19 @@
"resolved": "1.1.0",
"contentHash": "UocOlCkxLZrG2CKMAAImPcldJTxeesHnHGHwhJ0pNlZEvEXcWKuQvVOER2/NiOkJGRJk978SNdw3j6/7O9H1lg==",
"dependencies": {
- "System.Memory.Data": "1.0.2",
- "System.Text.Json": "6.0.9"
+ "System.Memory.Data": "1.0.2"
}
},
- "System.Diagnostics.DiagnosticSource": {
- "type": "Transitive",
- "resolved": "9.0.0",
- "contentHash": "ddppcFpnbohLWdYKr/ZeLZHmmI+DXFgZ3Snq+/E7SwcdW4UnvxmaugkwGywvGVWkHPGCSZjCP+MLzu23AL5SDw=="
- },
- "System.Memory": {
- "type": "Transitive",
- "resolved": "4.5.5",
- "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
- },
"System.Memory.Data": {
"type": "Transitive",
"resolved": "6.0.0",
- "contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ==",
- "dependencies": {
- "System.Text.Json": "6.0.0"
- }
- },
- "System.Numerics.Vectors": {
- "type": "Transitive",
- "resolved": "4.5.0",
- "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
- },
- "System.Runtime.CompilerServices.Unsafe": {
- "type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
+ "contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ=="
},
"System.Security.Cryptography.ProtectedData": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "wLBKzFnDCxP12VL9ANydSYhk59fC4cvOr9ypYQLPnAj48NQIhqnjdD2yhP8yEKyBJEjERWS9DisKL7rX5eU25Q=="
},
- "System.Text.Encodings.Web": {
- "type": "Transitive",
- "resolved": "6.0.0",
- "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
- "dependencies": {
- "System.Runtime.CompilerServices.Unsafe": "6.0.0"
- }
- },
- "System.Text.Json": {
- "type": "Transitive",
- "resolved": "9.0.4",
- "contentHash": "pYtmpcO6R3Ef1XilZEHgXP2xBPVORbYEzRP7dl0IAAbN8Dm+kfwio8aCKle97rAWXOExr292MuxWYurIuwN62g=="
- },
- "System.Threading.Tasks.Extensions": {
- "type": "Transitive",
- "resolved": "4.5.4",
- "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
- },
"YamlDotNet": {
"type": "Transitive",
"resolved": "16.3.0",
@@ -629,10 +382,6 @@
"dependencies": {
"Markdig": "[0.41.3, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[9.0.4, )",
- "Microsoft.Extensions.Configuration": "[9.0.4, )",
- "Microsoft.Extensions.Configuration.Binder": "[9.0.4, )",
- "Microsoft.Extensions.Configuration.Json": "[9.0.4, )",
- "Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.OpenApi.Readers": "[1.6.24, )",
"Newtonsoft.Json.Schema": "[4.0.1, )",
"Scriban": "[6.2.1, )",
From dc8678ef643e9a4aa155e2f47fd5244bb1eb7d67 Mon Sep 17 00:00:00 2001
From: Waldek Mastykarz
Date: Tue, 24 Feb 2026 09:21:46 +0100
Subject: [PATCH 08/11] Update
schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
index ce3adb86..3579f028 100644
--- a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
+++ b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json
@@ -20,11 +20,11 @@
"properties": {
"bodyFragment": {
"type": "string",
- "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). Use either bodyFragment or bodyRegex, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A fragment of the stdin body to match (case-insensitive contains). You can specify bodyFragment, bodyRegex, or both; if both are specified, bodyRegex takes precedence. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"bodyRegex": {
"type": "string",
- "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). Use either bodyRegex or bodyFragment, not both. If neither is specified, the mock matches any stdin or is applied immediately on startup."
+ "description": "(Optional) A regular expression pattern to match against the stdin body (case-insensitive). You can specify bodyRegex, bodyFragment, or both; if both are specified, bodyRegex takes precedence. If neither is specified, the mock matches any stdin or is applied immediately on startup."
},
"nth": {
"type": "integer",
From 1b09c056c1acbd8a4d4c241acda878ec73933f56 Mon Sep 17 00:00:00 2001
From: Waldek Mastykarz
Date: Tue, 24 Feb 2026 09:22:19 +0100
Subject: [PATCH 09/11] Update
DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
.../Mocking/MockStdioResponsePlugin.cs | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
index 8eb7ef8a..71587e16 100644
--- a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
+++ b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
@@ -262,8 +262,21 @@ Configuration.Mocks is null ||
// Use bodyRegex if specified, otherwise use bodyFragment (either/or)
if (hasBodyRegex)
{
- if (!Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(5)))
+ try
{
+ if (!Regex.IsMatch(stdinBody, mockResponse.Request.BodyRegex!, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(5)))
+ {
+ return false;
+ }
+ }
+ catch (RegexMatchTimeoutException ex)
+ {
+ _logger.LogError(ex, "Regex match timed out for body regex pattern '{Pattern}'. Treating as non-matching mock.", mockResponse.Request.BodyRegex);
+ return false;
+ }
+ catch (ArgumentException ex)
+ {
+ _logger.LogError(ex, "Invalid body regex pattern '{Pattern}'. Treating as non-matching mock.", mockResponse.Request.BodyRegex);
return false;
}
}
From 7a4a47a4b7c71021436ed2efbf9b35384f1e8e48 Mon Sep 17 00:00:00 2001
From: Waldek Mastykarz
Date: Tue, 24 Feb 2026 09:22:30 +0100
Subject: [PATCH 10/11] Update
DevProxy.Abstractions/Models/MockStdioResponse.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
DevProxy.Abstractions/Models/MockStdioResponse.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/DevProxy.Abstractions/Models/MockStdioResponse.cs b/DevProxy.Abstractions/Models/MockStdioResponse.cs
index b25dca59..47e01132 100644
--- a/DevProxy.Abstractions/Models/MockStdioResponse.cs
+++ b/DevProxy.Abstractions/Models/MockStdioResponse.cs
@@ -35,14 +35,16 @@ public class MockStdioRequest
{
///
/// A fragment of the stdin body to match (case-insensitive contains).
- /// Use either or , not both.
+ /// Prefer using either or , not both.
+ /// If both are specified, takes precedence and is ignored.
/// If neither is specified, the mock matches any stdin (or is applied immediately on startup).
///
public string? BodyFragment { get; set; }
///
/// A regular expression pattern to match against the stdin body (case-insensitive).
- /// Use either or , not both.
+ /// Prefer using either or , not both.
+ /// If both are specified, takes precedence and is ignored.
/// If neither is specified, the mock matches any stdin (or is applied immediately on startup).
///
public string? BodyRegex { get; set; }
From db7f952576d3f8e04d75502d4dfed929b40fadb4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 24 Feb 2026 08:49:53 +0000
Subject: [PATCH 11/11] Fix build: use Logger instead of _logger in regex error
handling
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
---
DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
index 71587e16..885b2207 100644
--- a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
+++ b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs
@@ -271,12 +271,12 @@ Configuration.Mocks is null ||
}
catch (RegexMatchTimeoutException ex)
{
- _logger.LogError(ex, "Regex match timed out for body regex pattern '{Pattern}'. Treating as non-matching mock.", mockResponse.Request.BodyRegex);
+ Logger.LogError(ex, "Regex match timed out for body regex pattern '{Pattern}'. Treating as non-matching mock.", mockResponse.Request.BodyRegex);
return false;
}
catch (ArgumentException ex)
{
- _logger.LogError(ex, "Invalid body regex pattern '{Pattern}'. Treating as non-matching mock.", mockResponse.Request.BodyRegex);
+ Logger.LogError(ex, "Invalid body regex pattern '{Pattern}'. Treating as non-matching mock.", mockResponse.Request.BodyRegex);
return false;
}
}