@picked/sentry 0.0.1-dev.1764358457580 → 0.0.1-dev.1764619864065

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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@sentry/svelte");let n=!1;function k({dsn:e,environment:r,release:i,assetsOrigin:t,filterKeys:y=[]}){n||!e||!r||!i||(c.init({dsn:e,environment:r,release:i,debug:r==="development",tracesSampleRate:.1,sendDefaultPii:!1,allowUrls:t?[t]:void 0,attachStacktrace:!0,tracePropagationTargets:t?[t]:void 0,integrations:[c.thirdPartyErrorFilterIntegration({filterKeys:[...y],behaviour:"drop-error-if-contains-third-party-frames"})],beforeSend(o){var s,d,l,u,p,f,g;if((((d=(s=o.exception)==null?void 0:s.values)==null?void 0:d.length)??0)>0){const a=(f=(p=(u=(l=o.exception)==null?void 0:l.values)==null?void 0:u[0])==null?void 0:p.stacktrace)==null?void 0:f.frames;if(a!=null&&a.some(h=>!h.abs_path&&!h.filename))return null}try{const a=(g=globalThis.window.Picked.session)==null?void 0:g.id;a&&(o.tags={...o.tags,pickedId:a})}catch{}return o}}),n=!0)}function S(e){!n||!e||c.withScope(r=>{var i;try{const t=(i=globalThis.window.Picked.session)==null?void 0:i.id;t&&r.setTag("pickedId",t)}catch{}c.captureException(e)})}function b(e){!n||!e||c.withScope(r=>{var i;try{const t=(i=globalThis.window.Picked.session)==null?void 0:i.id;t&&r.setTag("pickedId",t)}catch{}c.captureMessage(e)})}exports.captureException=S;exports.captureMessage=b;exports.initSentry=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@sentry/svelte");let f=!1;function k({dsn:r,environment:a,release:i,assetsOrigin:t,filterKeys:S=[]}){f||!r||!a||!i||!t||(s.init({dsn:r,environment:a,release:i,debug:a==="development",tracesSampleRate:.1,sendDefaultPii:!1,allowUrls:[t],attachStacktrace:!0,tracePropagationTargets:[t],integrations:[s.thirdPartyErrorFilterIntegration({filterKeys:[...S],behaviour:"drop-error-if-contains-third-party-frames"})],tracesSampler:e=>{var u,l;const n=(u=e.location)==null?void 0:u.href;if(n&&n.startsWith(t))return 1;const p=(l=e.transactionContext)==null?void 0:l.name;return typeof p=="string"&&p.startsWith(t)?1:0},beforeSend(e){var u,l,d,h,y;const n=((u=e.exception)==null?void 0:u.values)??[],p=((d=(l=n==null?void 0:n[0])==null?void 0:l.stacktrace)==null?void 0:d.frames)??[];if(p.length>0){if(!p.some(o=>{const g=o.filename||"",b=o.abs_path||"";return o.in_app===!0||g.startsWith(t)||b.startsWith(t)}))return null}else{const c=(h=e.request)==null?void 0:h.url,o=e.transaction;if(!(typeof c=="string"&&c.startsWith(t)||typeof o=="string"&&o.startsWith(t)))return null}try{const c=(y=globalThis.window.Picked.session)==null?void 0:y.id;c&&(e.tags={...e.tags,pickedId:c})}catch{}return e}}),f=!0)}function m(r){!f||!r||s.withScope(a=>{var i;try{const t=(i=globalThis.window.Picked.session)==null?void 0:i.id;t&&a.setTag("pickedId",t)}catch{}s.captureException(r)})}function w(r){!f||!r||s.withScope(a=>{var i;try{const t=(i=globalThis.window.Picked.session)==null?void 0:i.id;t&&a.setTag("pickedId",t)}catch{}s.captureMessage(r)})}exports.captureException=m;exports.captureMessage=w;exports.initSentry=k;
@@ -1,71 +1,86 @@
1
- import { init as w, thirdPartyErrorFilterIntegration as y, withScope as g, captureException as b, captureMessage as I } from "@sentry/svelte";
2
- let o = !1;
3
- function P({
1
+ import { init as b, thirdPartyErrorFilterIntegration as w, withScope as m, captureException as I, captureMessage as P } from "@sentry/svelte";
2
+ let u = !1;
3
+ function W({
4
4
  dsn: e,
5
5
  environment: a,
6
6
  release: i,
7
7
  assetsOrigin: t,
8
- filterKeys: k = []
8
+ filterKeys: y = []
9
9
  }) {
10
- o || !e || !a || !i || (w({
10
+ u || !e || !a || !i || !t || (b({
11
11
  dsn: e,
12
12
  environment: a,
13
13
  release: i,
14
14
  debug: a === "development",
15
15
  tracesSampleRate: 0.1,
16
16
  sendDefaultPii: !1,
17
- allowUrls: t ? [t] : void 0,
17
+ allowUrls: [t],
18
18
  attachStacktrace: !0,
19
- tracePropagationTargets: t ? [t] : void 0,
19
+ tracePropagationTargets: [t],
20
20
  integrations: [
21
- y({
22
- filterKeys: [...k],
21
+ w({
22
+ filterKeys: [...y],
23
23
  behaviour: "drop-error-if-contains-third-party-frames"
24
24
  })
25
25
  ],
26
- beforeSend(c) {
27
- var n, s, d, p, l, u, f;
28
- if ((((s = (n = c.exception) == null ? void 0 : n.values) == null ? void 0 : s.length) ?? 0) > 0) {
29
- const r = (u = (l = (p = (d = c.exception) == null ? void 0 : d.values) == null ? void 0 : p[0]) == null ? void 0 : l.stacktrace) == null ? void 0 : u.frames;
30
- if (r != null && r.some((h) => !h.abs_path && !h.filename))
26
+ tracesSampler: (r) => {
27
+ var p, f;
28
+ const n = (p = r.location) == null ? void 0 : p.href;
29
+ if (n && n.startsWith(t))
30
+ return 1;
31
+ const s = (f = r.transactionContext) == null ? void 0 : f.name;
32
+ return typeof s == "string" && s.startsWith(t) ? 1 : 0;
33
+ },
34
+ beforeSend(r) {
35
+ var p, f, l, d, h;
36
+ const n = ((p = r.exception) == null ? void 0 : p.values) ?? [], s = ((l = (f = n == null ? void 0 : n[0]) == null ? void 0 : f.stacktrace) == null ? void 0 : l.frames) ?? [];
37
+ if (s.length > 0) {
38
+ if (!s.some((o) => {
39
+ const g = o.filename || "", k = o.abs_path || "";
40
+ return o.in_app === !0 || g.startsWith(t) || k.startsWith(t);
41
+ }))
42
+ return null;
43
+ } else {
44
+ const c = (d = r.request) == null ? void 0 : d.url, o = r.transaction;
45
+ if (!(typeof c == "string" && c.startsWith(t) || typeof o == "string" && o.startsWith(t)))
31
46
  return null;
32
47
  }
33
48
  try {
34
- const r = (f = globalThis.window.Picked.session) == null ? void 0 : f.id;
35
- r && (c.tags = {
36
- ...c.tags,
37
- pickedId: r
49
+ const c = (h = globalThis.window.Picked.session) == null ? void 0 : h.id;
50
+ c && (r.tags = {
51
+ ...r.tags,
52
+ pickedId: c
38
53
  });
39
54
  } catch {
40
55
  }
41
- return c;
56
+ return r;
42
57
  }
43
- }), o = !0);
58
+ }), u = !0);
44
59
  }
45
- function S(e) {
46
- !o || !e || g((a) => {
60
+ function F(e) {
61
+ !u || !e || m((a) => {
47
62
  var i;
48
63
  try {
49
64
  const t = (i = globalThis.window.Picked.session) == null ? void 0 : i.id;
50
65
  t && a.setTag("pickedId", t);
51
66
  } catch {
52
67
  }
53
- b(e);
68
+ I(e);
54
69
  });
55
70
  }
56
- function T(e) {
57
- !o || !e || g((a) => {
71
+ function x(e) {
72
+ !u || !e || m((a) => {
58
73
  var i;
59
74
  try {
60
75
  const t = (i = globalThis.window.Picked.session) == null ? void 0 : i.id;
61
76
  t && a.setTag("pickedId", t);
62
77
  } catch {
63
78
  }
64
- I(e);
79
+ P(e);
65
80
  });
66
81
  }
67
82
  export {
68
- S as captureException,
69
- T as captureMessage,
70
- P as initSentry
83
+ F as captureException,
84
+ x as captureMessage,
85
+ W as initSentry
71
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/svelte/index.ts"],"names":[],"mappings":"AAQA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE;YACN,OAAO,CAAC,EAAE;gBACR,EAAE,EAAE,MAAM,CAAA;aACX,CAAA;SACF,CAAA;KACF;CACF;AAID,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,WAAW,EACX,OAAO,EACP,YAAY,EACZ,UAAe,GAChB,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,GAAG,IAAI,CAqDP;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAiBrD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAiBpD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/svelte/index.ts"],"names":[],"mappings":"AASA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE;YACN,OAAO,CAAC,EAAE;gBACR,EAAE,EAAE,MAAM,CAAA;aACX,CAAA;SACF,CAAA;KACF;CACF;AAID,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,WAAW,EACX,OAAO,EACP,YAAY,EACZ,UAAe,GAChB,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,GAAG,IAAI,CAmFP;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAiBrD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAiBpD"}
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.1764358457580",
4
+ "version": "0.0.1-dev.1764619864065",
5
5
  "dependencies": {
6
6
  "@sentry/svelte": "^10.27.0",
7
7
  "@sentry/vercel-edge": "^10.27.0",
@@ -13,7 +13,7 @@
13
13
  "@rollup/plugin-replace": "^6.0.2",
14
14
  "@types/jsdom": "^21.1.7",
15
15
  "@types/node": "^22",
16
- "@vitest/coverage-v8": "^3.2.3",
16
+ "@vitest/coverage-v8": "^3.2.4",
17
17
  "tsup": "^8.5.0",
18
18
  "vite": "^6.4.1",
19
19
  "vite-plugin-dts": "^4.5.4",