@vpmedia/simplify 1.41.0 → 1.43.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.41.0",
3
+ "version": "1.43.0",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "iOS >= 14"
39
39
  ],
40
40
  "dependencies": {
41
- "@types/node": "^24.7.2",
41
+ "@types/node": "^24.8.1",
42
42
  "eventemitter3": "^5.0.1"
43
43
  },
44
44
  "optionalDependencies": {
@@ -3,8 +3,6 @@ import { AbstractLogHandler } from './AbstractLogHandler.js';
3
3
  import { LOG_LEVEL_DEBUG, LOG_LEVEL_WARNING } from './const.js';
4
4
  import { getLogLevelName } from './util.js';
5
5
 
6
- const BREADCRUMB_CATEGORY = 'log';
7
-
8
6
  export class SentryLogHandler extends AbstractLogHandler {
9
7
  /**
10
8
  * Console log handler.
@@ -30,14 +28,15 @@ export class SentryLogHandler extends AbstractLogHandler {
30
28
  const levelName = getLogLevelName(level);
31
29
  const logMessage = `[${logger.name}] ${message}`;
32
30
  const breadcrumb = {
33
- category: BREADCRUMB_CATEGORY,
31
+ type: 'default',
32
+ category: 'console',
34
33
  message: logMessage,
35
34
  level: levelName,
36
- data: extra,
35
+ data: { extra },
37
36
  };
38
37
  if (logger.level < level) {
39
38
  // only capture breadcrumbs if logger is silenced with this level,
40
- // so no console logs are present for Sentry.
39
+ // so no console logs are present for Sentry to capture directly.
41
40
  addBreadcrumb(breadcrumb);
42
41
  }
43
42
  if (error) {
@@ -55,7 +55,6 @@ export const fetchRetry = async (resource, fetchOptions, retryOptions) => {
55
55
  try {
56
56
  const response = await fetch(resource, fetchOptions);
57
57
  if (!response.ok) {
58
- logger.warn('failure', response);
59
58
  throw new FetchError(
60
59
  `fetch ${response.url} returned status ${response.status}`,
61
60
  resource,
@@ -63,12 +62,11 @@ export const fetchRetry = async (resource, fetchOptions, retryOptions) => {
63
62
  response
64
63
  );
65
64
  }
66
- logger.info('success', response);
65
+ logger.info('response', response);
67
66
  return response;
68
67
  } catch (error) {
69
68
  const typedError = error instanceof Error ? error : new Error(String(error));
70
- logger.error('error', typedError);
71
- logger.info('errorDetails', getErrorDetails(typedError));
69
+ logger.debug('error', getErrorDetails(typedError));
72
70
  retryOptions.numTries -= 1;
73
71
  if (
74
72
  retryOptions.numTries === 0 ||
@@ -1 +1 @@
1
- {"version":3,"file":"SentryLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/SentryLogHandler.js"],"names":[],"mappings":"AAOA;IACE;;;OAGG;IACH,oBAFW,MAAM,EAIhB;CAoCF;mCAjDkC,yBAAyB"}
1
+ {"version":3,"file":"SentryLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/SentryLogHandler.js"],"names":[],"mappings":"AAKA;IACE;;;OAGG;IACH,oBAFW,MAAM,EAIhB;CAqCF;mCAhDkC,yBAAyB"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../src/util/fetchRetry.js"],"names":[],"mappings":"AAYA,yBAA0B,CAAC,CAAC;AAE5B;IACE;;;;;;OAMG;IACH,qBALW,MAAM,YACN,MAAM,GAAG,GAAG,GAAG,OAAO,gBACtB,WAAW,YACX,QAAQ,EAQlB;IAHC,iCAAwB;IACxB,0BAAgC;IAChC,mBAAwB;CAE3B;AASM,qCALI,MAAM,GAAG,GAAG,GAAG,OAAO,iBACtB,WAAW,iBACX;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAC9E,OAAO,CAAC,QAAQ,CAAC,CAkD7B"}
1
+ {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../src/util/fetchRetry.js"],"names":[],"mappings":"AAYA,yBAA0B,CAAC,CAAC;AAE5B;IACE;;;;;;OAMG;IACH,qBALW,MAAM,YACN,MAAM,GAAG,GAAG,GAAG,OAAO,gBACtB,WAAW,YACX,QAAQ,EAQlB;IAHC,iCAAwB;IACxB,0BAAgC;IAChC,mBAAwB;CAE3B;AASM,qCALI,MAAM,GAAG,GAAG,GAAG,OAAO,iBACtB,WAAW,iBACX;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAC9E,OAAO,CAAC,QAAQ,CAAC,CAgD7B"}