@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/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 match = options?.pathPattern.exec(request.url.replace(options.baseURL, ""));
1223
- return { ...match?.groups };
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");