getta 1.0.12 → 1.0.13
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 +14 -14
- 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 +4 -2
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -245,6 +245,7 @@ export class Getta {
|
|
|
245
245
|
fetchRequestHeaders: rest.headers,
|
|
246
246
|
fetchRetries: retries,
|
|
247
247
|
fetchUrl: endpoint,
|
|
248
|
+
logEntryName: 'FETCH_REQUEST_SENT',
|
|
248
249
|
...context,
|
|
249
250
|
},
|
|
250
251
|
stats: { startTime: context.startTime },
|
|
@@ -319,7 +320,7 @@ export class Getta {
|
|
|
319
320
|
const endTime = this._performance.now();
|
|
320
321
|
|
|
321
322
|
this._log?.(consts.REQUEST_FAILED, {
|
|
322
|
-
context: { error, fetchUrl: endpoint, ...rest },
|
|
323
|
+
context: { error, fetchUrl: endpoint, logEntryName: 'FETCH_REQUEST_FAILED', ...rest },
|
|
323
324
|
stats: { duration: startTime ? endTime - startTime : 0, endTime, startTime },
|
|
324
325
|
});
|
|
325
326
|
|
|
@@ -461,10 +462,11 @@ export class Getta {
|
|
|
461
462
|
context: {
|
|
462
463
|
fetchMethod: method,
|
|
463
464
|
fetchRedirects: redirects,
|
|
464
|
-
fetchResponseHeaders: headers,
|
|
465
|
+
fetchResponseHeaders: Object.fromEntries(headers.entries()),
|
|
465
466
|
fetchResponseStatus: status,
|
|
466
467
|
fetchRetries: retries,
|
|
467
468
|
fetchUrl: endpoint,
|
|
469
|
+
logEntryName: 'FETCH_RESPONSE_RECEIVED',
|
|
468
470
|
...otherContext,
|
|
469
471
|
},
|
|
470
472
|
stats: { duration, endTime, startTime },
|