@zimic/interceptor 1.1.3-canary.1 → 1.1.3-canary.2
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-5JHZWURB.mjs → chunk-KIM2YGPM.mjs} +8 -8
- package/dist/chunk-KIM2YGPM.mjs.map +1 -0
- package/dist/{chunk-NWA64QXK.js → chunk-WBOIAXNW.js} +8 -8
- package/dist/chunk-WBOIAXNW.js.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 +6 -6
- package/dist/http.js.map +1 -1
- package/dist/http.mjs +6 -6
- package/dist/http.mjs.map +1 -1
- package/dist/server.js +6 -6
- package/dist/server.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-5JHZWURB.mjs.map +0 -1
- package/dist/chunk-NWA64QXK.js.map +0 -1
package/dist/http.mjs
CHANGED
|
@@ -840,7 +840,7 @@ var LocalHttpRequestHandler = class {
|
|
|
840
840
|
};
|
|
841
841
|
var LocalHttpRequestHandler_default = LocalHttpRequestHandler;
|
|
842
842
|
|
|
843
|
-
// ../zimic-utils/dist/chunk-
|
|
843
|
+
// ../zimic-utils/dist/chunk-VPHA4ZCK.mjs
|
|
844
844
|
function createPathCharactersToEscapeRegex() {
|
|
845
845
|
return /([.(){}+$])/g;
|
|
846
846
|
}
|
|
@@ -851,10 +851,10 @@ function preparePathForRegex(path) {
|
|
|
851
851
|
return encodedPath.replace(/^\/+/g, "").replace(/\/+$/g, "").replace(createPathCharactersToEscapeRegex(), "\\$1");
|
|
852
852
|
}
|
|
853
853
|
function createPathParamRegex() {
|
|
854
|
-
return /(?<escape>\\)?:(?<identifier>[$_\p{ID_Start}][$\p{ID_Continue}]+)/gu;
|
|
854
|
+
return /(?<escape>\\)?:(?<identifier>[$_\p{ID_Start}][$\p{ID_Continue}]+)(?!\\[*+?])/gu;
|
|
855
855
|
}
|
|
856
856
|
function createRepeatingPathParamRegex() {
|
|
857
|
-
return /(?<escape>\\)?:(?<identifier>[$_\p{ID_Start}][$\p{ID_Continue}]+)
|
|
857
|
+
return /(?<escape>\\)?:(?<identifier>[$_\p{ID_Start}][$\p{ID_Continue}]+)\\\+/gu;
|
|
858
858
|
}
|
|
859
859
|
function createOptionalPathParamRegex() {
|
|
860
860
|
return /(?<leadingSlash>\/)?(?<escape>\\)?:(?<identifier>[$_\p{ID_Start}][$\p{ID_Continue}]+)\?(?<trailingSlash>\/)?/gu;
|
|
@@ -867,7 +867,7 @@ function createRegexFromPath(path) {
|
|
|
867
867
|
createOptionalRepeatingPathParamRegex(),
|
|
868
868
|
(_match, leadingSlash, escape, identifier, trailingSlash) => {
|
|
869
869
|
if (escape) {
|
|
870
|
-
return
|
|
870
|
+
return `${leadingSlash ?? ""}:${identifier}\\*${trailingSlash ?? ""}`;
|
|
871
871
|
}
|
|
872
872
|
const hasSegmentBeforePrefix = leadingSlash === "/";
|
|
873
873
|
const prefixExpression = hasSegmentBeforePrefix ? "/?" : leadingSlash;
|
|
@@ -884,12 +884,12 @@ function createRegexFromPath(path) {
|
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
).replace(createRepeatingPathParamRegex(), (_match, escape, identifier) => {
|
|
887
|
-
return escape ? `:${identifier}
|
|
887
|
+
return escape ? `:${identifier}\\+` : `(?<${identifier}>.+)`;
|
|
888
888
|
}).replace(
|
|
889
889
|
createOptionalPathParamRegex(),
|
|
890
890
|
(_match, leadingSlash, escape, identifier, trailingSlash) => {
|
|
891
891
|
if (escape) {
|
|
892
|
-
return
|
|
892
|
+
return `${leadingSlash ?? ""}:${identifier}\\?${trailingSlash ?? ""}`;
|
|
893
893
|
}
|
|
894
894
|
const hasSegmentBeforePrefix = leadingSlash === "/";
|
|
895
895
|
const prefixExpression = hasSegmentBeforePrefix ? "/?" : leadingSlash;
|