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

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 t=require("@sentry/browser"),a=require("@picked/client"),s=()=>({name:"sentry-plugin",setup:i=>{if(a.supportsWindow())try{i.eventBus.watch(e=>{if(e.type==="exception"&&(e.level==="info"&&t.captureMessage(typeof e.data=="string"?e.data:JSON.stringify(e.data),{tags:{picked:!0}}),t.captureException(e.data,{captureContext:{tags:{picked:!0}}})),e.type==="session"&&t.setTag("picked.id",e.id),e.type==="feature_decide"){const r=`picked.feature.${e.feature.id}`;t.setTag(r,e.feature.bucket)}e.type==="user_decide"&&t.setTag("picked.is_user",e.value)})}catch{}}});exports.sentryPlugin=s;
package/dist/esm/index.js CHANGED
@@ -1,33 +1,34 @@
1
- import { Scope as s } from "@sentry/core";
2
- import { supportsWindow as p } from "@picked/client";
3
- const c = ({
4
- client: a,
5
- globalScope: e
6
- }) => ({
1
+ import { captureMessage as a, captureException as p, setTag as i } from "@sentry/browser";
2
+ import { supportsWindow as s } from "@picked/client";
3
+ const d = () => ({
7
4
  name: "sentry-plugin",
8
- setup: (r) => {
9
- if (p())
5
+ setup: (e) => {
6
+ if (s())
10
7
  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);
8
+ e.eventBus.watch((t) => {
9
+ if (t.type === "exception" && (t.level === "info" && a(
10
+ typeof t.data == "string" ? t.data : JSON.stringify(t.data),
11
+ {
12
+ tags: {
13
+ picked: !0
14
+ }
15
+ }
16
+ ), p(t.data, {
17
+ captureContext: {
18
+ tags: {
19
+ picked: !0
20
+ }
21
+ }
22
+ })), t.type === "session" && i("picked.id", t.id), t.type === "feature_decide") {
23
+ const r = `picked.feature.${t.feature.id}`;
24
+ i(r, t.feature.bucket);
20
25
  }
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
+ t.type === "user_decide" && i("picked.is_user", t.value);
26
27
  });
27
28
  } catch {
28
29
  }
29
30
  }
30
31
  });
31
32
  export {
32
- c as sentryPlugin
33
+ d as sentryPlugin
33
34
  };
@@ -1,7 +1,3 @@
1
- import { Client, Scope } from '@sentry/core';
2
1
  import { Plugin } from '@picked/client';
3
- export declare const sentryPlugin: ({ client, globalScope, }: {
4
- client: Client;
5
- globalScope: Scope;
6
- }) => Plugin;
2
+ export declare const sentryPlugin: () => Plugin;
7
3
  //# sourceMappingURL=index.d.ts.map
@@ -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":"AACA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5D,eAAO,MAAM,YAAY,QAAO,MAoE/B,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.1765490623116",
5
5
  "dependencies": {},
6
6
  "devDependencies": {
7
7
  "@picked/client": "workspace:*",
@@ -9,7 +9,7 @@
9
9
  "@repo/eslint-config": "workspace:*",
10
10
  "@repo/typescript-config": "workspace:*",
11
11
  "@rollup/plugin-replace": "^6.0.2",
12
- "@sentry/core": "^10.5.0",
12
+ "@sentry/browser": "10.30.0",
13
13
  "@types/jsdom": "^21.1.7",
14
14
  "@types/node": "^22",
15
15
  "@vitest/coverage-v8": "^3.2.4",
@@ -33,7 +33,8 @@
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.1765490623116",
37
+ "@sentry/browser": "10.30.0"
37
38
  },
38
39
  "private": false,
39
40
  "scripts": {