getta 1.0.10 → 1.0.12
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/production.analysis.txt +12 -12
- package/dist/types/cjs/main.d.cts.map +1 -1
- package/dist/types/esm/main.d.ts.map +1 -1
- package/dist/types/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/main.ts +15 -8
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -239,7 +239,14 @@ export class Getta {
|
|
|
239
239
|
|
|
240
240
|
if (!redirects && !retries) {
|
|
241
241
|
this._log?.(consts.REQUEST_SENT, {
|
|
242
|
-
context: {
|
|
242
|
+
context: {
|
|
243
|
+
fetchMethod: rest.method,
|
|
244
|
+
fetchRedirets: redirects,
|
|
245
|
+
fetchRequestHeaders: rest.headers,
|
|
246
|
+
fetchRetries: retries,
|
|
247
|
+
fetchUrl: endpoint,
|
|
248
|
+
...context,
|
|
249
|
+
},
|
|
243
250
|
stats: { startTime: context.startTime },
|
|
244
251
|
});
|
|
245
252
|
}
|
|
@@ -312,7 +319,7 @@ export class Getta {
|
|
|
312
319
|
const endTime = this._performance.now();
|
|
313
320
|
|
|
314
321
|
this._log?.(consts.REQUEST_FAILED, {
|
|
315
|
-
context: { error,
|
|
322
|
+
context: { error, fetchUrl: endpoint, ...rest },
|
|
316
323
|
stats: { duration: startTime ? endTime - startTime : 0, endTime, startTime },
|
|
317
324
|
});
|
|
318
325
|
|
|
@@ -452,12 +459,12 @@ export class Getta {
|
|
|
452
459
|
|
|
453
460
|
this._log?.(consts.RESPONSE_RECEIVED, {
|
|
454
461
|
context: {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
462
|
+
fetchMethod: method,
|
|
463
|
+
fetchRedirects: redirects,
|
|
464
|
+
fetchResponseHeaders: headers,
|
|
465
|
+
fetchResponseStatus: status,
|
|
466
|
+
fetchRetries: retries,
|
|
467
|
+
fetchUrl: endpoint,
|
|
461
468
|
...otherContext,
|
|
462
469
|
},
|
|
463
470
|
stats: { duration, endTime, startTime },
|