@zimic/interceptor 1.1.2-canary.2 → 1.1.2-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-CSKTIZSC.mjs → chunk-IZWPQ4OM.mjs} +9 -4
- package/dist/chunk-IZWPQ4OM.mjs.map +1 -0
- package/dist/{chunk-GM3MDVNT.js → chunk-XX2J7SRC.js} +9 -4
- package/dist/chunk-XX2J7SRC.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 +7 -2
- package/dist/http.js.map +1 -1
- package/dist/http.mjs +7 -2
- 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/src/http/interceptorWorker/HttpInterceptorWorker.ts +10 -2
- package/dist/chunk-CSKTIZSC.mjs.map +0 -1
- package/dist/chunk-GM3MDVNT.js.map +0 -1
package/dist/http.mjs
CHANGED
|
@@ -1219,8 +1219,13 @@ var HttpInterceptorWorker = class _HttpInterceptorWorker {
|
|
|
1219
1219
|
return HTTP_INTERCEPTOR_RESPONSE_HIDDEN_PROPERTIES.has(property);
|
|
1220
1220
|
}
|
|
1221
1221
|
static parseRawPathParams(request, options) {
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1222
|
+
const requestPath = request.url.replace(options?.baseURL ?? "", "");
|
|
1223
|
+
const paramsMatch = options?.pathPattern.exec(requestPath);
|
|
1224
|
+
const params = {};
|
|
1225
|
+
for (const [paramName, paramValue] of Object.entries(paramsMatch?.groups ?? {})) {
|
|
1226
|
+
params[paramName] = typeof paramValue === "string" ? decodeURIComponent(paramValue) : void 0;
|
|
1227
|
+
}
|
|
1228
|
+
return params;
|
|
1224
1229
|
}
|
|
1225
1230
|
static async parseRawBody(resource) {
|
|
1226
1231
|
const contentType = resource.headers.get("content-type");
|