@goliapkg/sentori-solid 0.1.1 → 0.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAA;AAErC,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAA;AAE7C,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAE9D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAGjD;AAeD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAkBvD;AAED,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,IAAI,YAAY,EAChC,WAAW,EACX,OAAO,EACP,OAAO,GACR,MAAM,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAA;AAErC,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAA;AAE7C,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAE9D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAMjD;AAeD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAkBvD;AAED,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,IAAI,YAAY,EAChC,WAAW,EACX,OAAO,EACP,OAAO,GACR,MAAM,8BAA8B,CAAA"}
package/lib/index.js CHANGED
@@ -23,7 +23,7 @@
23
23
  * ship a giant API. Most users will just need `initSentori` +
24
24
  * `captureException`.
25
25
  */
26
- import { setActiveSpan, startSpan } from '@goliapkg/sentori-core';
26
+ import { coerceError, setActiveSpan, startSpan } from '@goliapkg/sentori-core';
27
27
  import { captureException as captureExceptionJs, captureStep, initSentori as initSentoriJs, } from '@goliapkg/sentori-javascript';
28
28
  export function initSentori(options) {
29
29
  initSentoriJs(options);
@@ -44,7 +44,10 @@ export function initSentori(options) {
44
44
  * into a monitoring service.)
45
45
  */
46
46
  export function sentoriOnCatch(err) {
47
- const e = err instanceof Error ? err : new Error(String(err));
47
+ // `coerceError` JSON-stringifies plain-object throws (`throw {code:
48
+ // 'auth/expired'}`) so the dashboard shows the real payload instead
49
+ // of `[object Object]`. See @goliapkg/sentori-core/coerce-error.
50
+ const e = coerceError(err);
48
51
  captureExceptionJs(e);
49
52
  }
50
53
  /**
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAmB,MAAM,wBAAwB,CAAA;AAClF,OAAO,EACL,gBAAgB,IAAI,kBAAkB,EACtC,WAAW,EACX,WAAW,IAAI,aAAa,GAE7B,MAAM,8BAA8B,CAAA;AAIrC,MAAM,UAAU,WAAW,CAAC,OAA4B;IACtD,aAAa,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,MAAM,CAAC,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAC7D,kBAAkB,CAAC,CAAC,CAAC,CAAA;AACvB,CAAC;AAED;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,YAAY,EAChC,WAAW,EACX,OAAO,EACP,OAAO,GACR,MAAM,8BAA8B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goliapkg/sentori-solid",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "SolidJS adapter for Sentori — ErrorBoundary helper, solid-router navigation tracing.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://sentori.golia.jp",
@@ -47,8 +47,8 @@
47
47
  }
48
48
  },
49
49
  "dependencies": {
50
- "@goliapkg/sentori-core": "0.6.0",
51
- "@goliapkg/sentori-javascript": "0.4.1"
50
+ "@goliapkg/sentori-core": "0.7.0",
51
+ "@goliapkg/sentori-javascript": "0.4.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/bun": "latest",
package/src/index.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  * `captureException`.
25
25
  */
26
26
 
27
- import { setActiveSpan, startSpan, type SpanHandle } from '@goliapkg/sentori-core'
27
+ import { coerceError, setActiveSpan, startSpan, type SpanHandle } from '@goliapkg/sentori-core'
28
28
  import {
29
29
  captureException as captureExceptionJs,
30
30
  captureStep,
@@ -54,7 +54,10 @@ export function initSentori(options: SentoriSolidOptions): void {
54
54
  * into a monitoring service.)
55
55
  */
56
56
  export function sentoriOnCatch(err: unknown): void {
57
- const e = err instanceof Error ? err : new Error(String(err))
57
+ // `coerceError` JSON-stringifies plain-object throws (`throw {code:
58
+ // 'auth/expired'}`) so the dashboard shows the real payload instead
59
+ // of `[object Object]`. See @goliapkg/sentori-core/coerce-error.
60
+ const e = coerceError(err)
58
61
  captureExceptionJs(e)
59
62
  }
60
63