react-devbelt 0.4.0 → 0.4.1
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-SYBN2CEO.js → chunk-VVSEYZHW.js} +10 -5
- package/dist/chunk-VVSEYZHW.js.map +1 -0
- package/dist/core.js +9 -4
- package/dist/core.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/install.js +1 -1
- package/dist/plugins.js +1 -1
- package/dist/{toolbar-entry-XIKTJ2OG.js → toolbar-entry-4FUDASJW.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-SYBN2CEO.js.map +0 -1
- /package/dist/{toolbar-entry-XIKTJ2OG.js.map → toolbar-entry-4FUDASJW.js.map} +0 -0
|
@@ -1215,16 +1215,21 @@ function installFetchLog() {
|
|
|
1215
1215
|
let id = null;
|
|
1216
1216
|
const startedAt = performance.now();
|
|
1217
1217
|
try {
|
|
1218
|
-
const
|
|
1218
|
+
const source = typeof Request !== "undefined" && input instanceof Request;
|
|
1219
|
+
const headers = new Headers(source ? input.headers : void 0);
|
|
1220
|
+
new Headers(init?.headers).forEach(
|
|
1221
|
+
(value, name) => headers.set(name, value)
|
|
1222
|
+
);
|
|
1223
|
+
const rawUrl = source ? input.url : input instanceof URL ? input.href : String(input);
|
|
1219
1224
|
id = add({
|
|
1220
|
-
method:
|
|
1221
|
-
url: new URL(
|
|
1225
|
+
method: (init?.method ?? (source ? input.method : "GET")).toUpperCase(),
|
|
1226
|
+
url: new URL(rawUrl, window.location.href).href,
|
|
1222
1227
|
status: null,
|
|
1223
1228
|
startedAt: Date.now(),
|
|
1224
1229
|
duration: null,
|
|
1225
1230
|
pageUrl: window.location.href,
|
|
1226
1231
|
viewport: describeViewport(),
|
|
1227
|
-
requestHeaders: headersToRecord(
|
|
1232
|
+
requestHeaders: headersToRecord(headers),
|
|
1228
1233
|
// Only what the caller passed as `init.body` is read back; a Request
|
|
1229
1234
|
// body is a stream and cannot be read without consuming it.
|
|
1230
1235
|
requestBody: capInMemory(serializeBody(init?.body)),
|
|
@@ -8158,4 +8163,4 @@ export {
|
|
|
8158
8163
|
storage,
|
|
8159
8164
|
defaultPlugins
|
|
8160
8165
|
};
|
|
8161
|
-
//# sourceMappingURL=chunk-
|
|
8166
|
+
//# sourceMappingURL=chunk-VVSEYZHW.js.map
|