@picked/sentry 0.0.1-dev.1765398246270 → 0.0.1-dev.1765411047807

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.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@sentry/core"),c=require("@picked/client"),u=({client:r,globalScope:i})=>({name:"sentry-plugin",setup:s=>{if(c.supportsWindow())try{s.eventBus.watch(e=>{if(e.type==="exception"){const t=new a.Scope;t.setTag("picked",!0),e.level==="info"&&r.captureMessage(typeof e.data=="string"?e.data:JSON.stringify(e.data),"info",void 0,t),r.captureException(e.data,void 0,t)}if(e.type==="session"&&i.setTag("picked.id",e.id),e.type==="feature_decide"){const t=`picked.feature.${e.feature.id}`;i.setTag(t,e.feature.bucket)}e.type==="user_decide"&&i.setTag("picked.is_user",e.value)})}catch{}}});exports.sentryPlugin=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@sentry/core"),u=require("@picked/client"),d=({client:r,globalScope:t})=>({name:"sentry-plugin",setup:s=>{if(!u.supportsWindow())return;const i=new c.Scope;i.setTag("picked",!0);try{s.eventBus.watch(e=>{if(e.type==="exception"&&(e.level==="info"&&r.captureMessage(typeof e.data=="string"?e.data:JSON.stringify(e.data),"info",void 0,i),r.captureException(e.data,void 0,i)),e.type==="session"&&t.setTag("picked.id",e.id),e.type==="feature_decide"){const a=`picked.feature.${e.feature.id}`;t.setTag(a,e.feature.bucket)}e.type==="user_decide"&&t.setTag("picked.is_user",e.value)})}catch{}}});exports.sentryPlugin=d;
package/dist/esm/index.js CHANGED
@@ -1,33 +1,32 @@
1
- import { Scope as s } from "@sentry/core";
2
- import { supportsWindow as p } from "@picked/client";
3
- const c = ({
1
+ import { Scope as p } from "@sentry/core";
2
+ import { supportsWindow as d } from "@picked/client";
3
+ const o = ({
4
4
  client: a,
5
- globalScope: e
5
+ globalScope: t
6
6
  }) => ({
7
7
  name: "sentry-plugin",
8
8
  setup: (r) => {
9
- if (p())
10
- try {
11
- r.eventBus.watch((i) => {
12
- if (i.type === "exception") {
13
- const t = new s();
14
- t.setTag("picked", !0), i.level === "info" && a.captureMessage(
15
- typeof i.data == "string" ? i.data : JSON.stringify(i.data),
16
- "info",
17
- void 0,
18
- t
19
- ), a.captureException(i.data, void 0, t);
20
- }
21
- if (i.type === "session" && e.setTag("picked.id", i.id), i.type === "feature_decide") {
22
- const t = `picked.feature.${i.feature.id}`;
23
- e.setTag(t, i.feature.bucket);
24
- }
25
- i.type === "user_decide" && e.setTag("picked.is_user", i.value);
26
- });
27
- } catch {
28
- }
9
+ if (!d())
10
+ return;
11
+ const e = new p();
12
+ e.setTag("picked", !0);
13
+ try {
14
+ r.eventBus.watch((i) => {
15
+ if (i.type === "exception" && (i.level === "info" && a.captureMessage(
16
+ typeof i.data == "string" ? i.data : JSON.stringify(i.data),
17
+ "info",
18
+ void 0,
19
+ e
20
+ ), a.captureException(i.data, void 0, e)), i.type === "session" && t.setTag("picked.id", i.id), i.type === "feature_decide") {
21
+ const s = `picked.feature.${i.feature.id}`;
22
+ t.setTag(s, i.feature.bucket);
23
+ }
24
+ i.type === "user_decide" && t.setTag("picked.is_user", i.value);
25
+ });
26
+ } catch {
27
+ }
29
28
  }
30
29
  });
31
30
  export {
32
- c as sentryPlugin
31
+ o as sentryPlugin
33
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5D,eAAO,MAAM,YAAY,GAAI,0BAG1B;IACD,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,KAAK,CAAA;CACnB,KAAG,MA+DH,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5D,eAAO,MAAM,YAAY,GAAI,0BAG1B;IACD,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,KAAK,CAAA;CACnB,KAAG,MAqEH,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@picked/sentry",
3
3
  "description": "Sentry plugin",
4
- "version": "0.0.1-dev.1765398246270",
4
+ "version": "0.0.1-dev.1765411047807",
5
5
  "dependencies": {},
6
6
  "devDependencies": {
7
7
  "@picked/client": "workspace:*",
@@ -33,7 +33,7 @@
33
33
  "main": "./dist/cjs/index.js",
34
34
  "module": "./dist/esm/index.js",
35
35
  "peerDependencies": {
36
- "@picked/client": "0.0.1-dev.1765398246270"
36
+ "@picked/client": "0.0.1-dev.1765411047807"
37
37
  },
38
38
  "private": false,
39
39
  "scripts": {