@picked/sentry 0.0.50-next.3 → 0.0.50

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 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"){if(e.level==="info"){t.captureMessage(typeof e.data=="string"?e.data:JSON.stringify(e.data),{tags:{picked:!0}});return}t.captureException(e.data,{captureContext:{tags:{picked:!0}}})}if(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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@sentry/browser`),t=require(`@picked/client`);var n=()=>({name:`sentry-plugin`,setup:n=>{if((0,t.supportsWindow)())try{n.eventBus.watch(t=>{if(t.type===`exception`){if(t.level===`info`){(0,e.captureMessage)(typeof t.data==`string`?t.data:JSON.stringify(t.data),{tags:{picked:!0}});return}(0,e.captureException)(t.data,{captureContext:{tags:{picked:!0}}})}t.type===`session`&&(0,e.setTag)(`picked.id`,t.id),t.type===`feature_decide`&&(0,e.setTag)(`picked.feature.${t.feature.id}`,t.feature.bucket),t.type===`user_decide`&&(0,e.setTag)(`picked.is_user`,t.value)})}catch{}}});exports.sentryPlugin=n;
package/dist/esm/index.js CHANGED
@@ -1,41 +1,22 @@
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 = () => ({
4
- name: "sentry-plugin",
5
- setup: (e) => {
6
- if (s())
7
- try {
8
- e.eventBus.watch((t) => {
9
- if (t.type === "exception") {
10
- if (t.level === "info") {
11
- a(
12
- typeof t.data == "string" ? t.data : JSON.stringify(t.data),
13
- {
14
- tags: {
15
- picked: !0
16
- }
17
- }
18
- );
19
- return;
20
- }
21
- p(t.data, {
22
- captureContext: {
23
- tags: {
24
- picked: !0
25
- }
26
- }
27
- });
28
- }
29
- if (t.type === "session" && i("picked.id", t.id), t.type === "feature_decide") {
30
- const r = `picked.feature.${t.feature.id}`;
31
- i(r, t.feature.bucket);
32
- }
33
- t.type === "user_decide" && i("picked.is_user", t.value);
34
- });
35
- } catch {
36
- }
37
- }
1
+ import { captureException as e, captureMessage as t, setTag as n } from "@sentry/browser";
2
+ import { supportsWindow as r } from "@picked/client";
3
+ //#region src/index.ts
4
+ var i = () => ({
5
+ name: "sentry-plugin",
6
+ setup: (i) => {
7
+ if (r()) try {
8
+ i.eventBus.watch((r) => {
9
+ if (r.type === "exception") {
10
+ if (r.level === "info") {
11
+ t(typeof r.data == "string" ? r.data : JSON.stringify(r.data), { tags: { picked: !0 } });
12
+ return;
13
+ }
14
+ e(r.data, { captureContext: { tags: { picked: !0 } } });
15
+ }
16
+ r.type === "session" && n("picked.id", r.id), r.type === "feature_decide" && n(`picked.feature.${r.feature.id}`, r.feature.bucket), r.type === "user_decide" && n("picked.is_user", r.value);
17
+ });
18
+ } catch {}
19
+ }
38
20
  });
39
- export {
40
- d as sentryPlugin
41
- };
21
+ //#endregion
22
+ export { i as sentryPlugin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@picked/sentry",
3
3
  "description": "Sentry plugin",
4
- "version": "0.0.50-next.3",
4
+ "version": "0.0.50",
5
5
  "devDependencies": {
6
6
  "@picked/client": "workspace:*",
7
7
  "@picked/svelte": "workspace:*",
@@ -11,13 +11,13 @@
11
11
  "@size-limit/preset-small-lib": "^12.0.0",
12
12
  "@types/jsdom": "^21.1.7",
13
13
  "@types/node": "^22",
14
- "@vitest/coverage-v8": "^4.0.17",
14
+ "@vitest/coverage-v8": "^4.1.0",
15
15
  "size-limit": "^12.0.0",
16
16
  "tsup": "^8.5.0",
17
17
  "tsx": "^4.20.3",
18
- "vite": "^7.3.1",
18
+ "vite": "^8.0.1",
19
19
  "vite-plugin-dts": "^4.5.4",
20
- "vitest": "^4.0.17"
20
+ "vitest": "^4.1.0"
21
21
  },
22
22
  "exports": {
23
23
  ".": {
@@ -41,7 +41,7 @@
41
41
  "main": "./dist/cjs/index.js",
42
42
  "module": "./dist/esm/index.js",
43
43
  "peerDependencies": {
44
- "@picked/client": "0.0.50-next.3",
44
+ "@picked/client": "0.0.50",
45
45
  "@sentry/browser": "^10"
46
46
  },
47
47
  "private": false,