@zimic/interceptor 1.1.0-canary.2 → 1.1.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5XPJX7EC.js → chunk-QDNKVSEG.js} +7 -7
- package/dist/chunk-QDNKVSEG.js.map +1 -0
- package/dist/{chunk-OQONGS2R.mjs → chunk-RDMXECNU.mjs} +7 -7
- package/dist/chunk-RDMXECNU.mjs.map +1 -0
- package/dist/cli.js +18 -18
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/http.js +5 -5
- package/dist/http.js.map +1 -1
- package/dist/http.mjs +5 -5
- package/dist/http.mjs.map +1 -1
- package/dist/server.js +6 -6
- package/dist/server.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-5XPJX7EC.js.map +0 -1
- package/dist/chunk-OQONGS2R.mjs.map +0 -1
package/dist/http.mjs
CHANGED
|
@@ -931,7 +931,7 @@ var LocalHttpRequestHandler = class {
|
|
|
931
931
|
};
|
|
932
932
|
var LocalHttpRequestHandler_default = LocalHttpRequestHandler;
|
|
933
933
|
|
|
934
|
-
// ../zimic-utils/dist/chunk-
|
|
934
|
+
// ../zimic-utils/dist/chunk-FPJJAH7P.mjs
|
|
935
935
|
function getExtraPatternsToEscape() {
|
|
936
936
|
return /([.(){}+$])/g;
|
|
937
937
|
}
|
|
@@ -991,10 +991,10 @@ function createParametrizedPathPattern(path) {
|
|
|
991
991
|
if (escape) {
|
|
992
992
|
return `:${identifier}`;
|
|
993
993
|
}
|
|
994
|
-
const
|
|
995
|
-
const prefixExpression =
|
|
996
|
-
const
|
|
997
|
-
const suffixExpression =
|
|
994
|
+
const hasSegmentBeforePrefix = leadingSlash === "/";
|
|
995
|
+
const prefixExpression = hasSegmentBeforePrefix ? "/?" : leadingSlash;
|
|
996
|
+
const hasSegmentAfterSuffix = trailingSlash === "/";
|
|
997
|
+
const suffixExpression = hasSegmentAfterSuffix ? "/?" : trailingSlash;
|
|
998
998
|
if (prefixExpression && suffixExpression) {
|
|
999
999
|
return `(?:${prefixExpression}(?<${identifier}>[^\\/]+?)?${suffixExpression})`;
|
|
1000
1000
|
} else if (prefixExpression) {
|