@anthonyhaussman/opencode-agy-auth 1.2.7-alpha.3 → 1.2.7-alpha.4

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/index.js CHANGED
@@ -21198,8 +21198,13 @@ function createV2HttpRequestHook(state = {}) {
21198
21198
  event.url = cleanUrl;
21199
21199
  }
21200
21200
  if (event.request && typeof event.request === "object") {
21201
- if (typeof event.request.url === "string") {
21202
- event.request.url = cleanUrl;
21201
+ if (typeof Request !== "undefined" && event.request instanceof Request) {
21202
+ event.request = new Request(cleanUrl, event.request);
21203
+ } else if (typeof event.request.url === "string") {
21204
+ try {
21205
+ event.request.url = cleanUrl;
21206
+ } catch {
21207
+ }
21203
21208
  }
21204
21209
  }
21205
21210
  }