@picked/sentry 0.0.1-dev.1764358457580
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/edge/index.js +1 -0
- package/dist/cjs/svelte/index.js +1 -0
- package/dist/cjs/vite/index.js +1 -0
- package/dist/esm/edge/index.js +17 -0
- package/dist/esm/svelte/index.js +71 -0
- package/dist/esm/vite/index.js +4 -0
- package/dist/types/edge/index.d.ts +7 -0
- package/dist/types/edge/index.d.ts.map +1 -0
- package/dist/types/svelte/index.d.ts +19 -0
- package/dist/types/svelte/index.d.ts.map +1 -0
- package/dist/types/vite/index.d.ts +2 -0
- package/dist/types/vite/index.d.ts.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@sentry/vercel-edge");function o(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const c=o(i);function u({dsn:t,environment:e,release:r}){!t||!e||!r||c.init({dsn:t,environment:e,release:r,tracesSampleRate:e==="production"?.1:1})}exports.Sentry=c;exports.initSentry=u;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@sentry/vite-plugin");Object.defineProperty(exports,"sentryVitePlugin",{enumerable:!0,get:()=>e.sentryVitePlugin});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as o from "@sentry/vercel-edge";
|
|
2
|
+
function p({
|
|
3
|
+
dsn: r,
|
|
4
|
+
environment: t,
|
|
5
|
+
release: i
|
|
6
|
+
}) {
|
|
7
|
+
!r || !t || !i || o.init({
|
|
8
|
+
dsn: r,
|
|
9
|
+
environment: t,
|
|
10
|
+
release: i,
|
|
11
|
+
tracesSampleRate: t === "production" ? 0.1 : 1
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
o as Sentry,
|
|
16
|
+
p as initSentry
|
|
17
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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({
|
|
4
|
+
dsn: e,
|
|
5
|
+
environment: a,
|
|
6
|
+
release: i,
|
|
7
|
+
assetsOrigin: t,
|
|
8
|
+
filterKeys: k = []
|
|
9
|
+
}) {
|
|
10
|
+
o || !e || !a || !i || (w({
|
|
11
|
+
dsn: e,
|
|
12
|
+
environment: a,
|
|
13
|
+
release: i,
|
|
14
|
+
debug: a === "development",
|
|
15
|
+
tracesSampleRate: 0.1,
|
|
16
|
+
sendDefaultPii: !1,
|
|
17
|
+
allowUrls: t ? [t] : void 0,
|
|
18
|
+
attachStacktrace: !0,
|
|
19
|
+
tracePropagationTargets: t ? [t] : void 0,
|
|
20
|
+
integrations: [
|
|
21
|
+
y({
|
|
22
|
+
filterKeys: [...k],
|
|
23
|
+
behaviour: "drop-error-if-contains-third-party-frames"
|
|
24
|
+
})
|
|
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))
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const r = (f = globalThis.window.Picked.session) == null ? void 0 : f.id;
|
|
35
|
+
r && (c.tags = {
|
|
36
|
+
...c.tags,
|
|
37
|
+
pickedId: r
|
|
38
|
+
});
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
return c;
|
|
42
|
+
}
|
|
43
|
+
}), o = !0);
|
|
44
|
+
}
|
|
45
|
+
function S(e) {
|
|
46
|
+
!o || !e || g((a) => {
|
|
47
|
+
var i;
|
|
48
|
+
try {
|
|
49
|
+
const t = (i = globalThis.window.Picked.session) == null ? void 0 : i.id;
|
|
50
|
+
t && a.setTag("pickedId", t);
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
b(e);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function T(e) {
|
|
57
|
+
!o || !e || g((a) => {
|
|
58
|
+
var i;
|
|
59
|
+
try {
|
|
60
|
+
const t = (i = globalThis.window.Picked.session) == null ? void 0 : i.id;
|
|
61
|
+
t && a.setTag("pickedId", t);
|
|
62
|
+
} catch {
|
|
63
|
+
}
|
|
64
|
+
I(e);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
S as captureException,
|
|
69
|
+
T as captureMessage,
|
|
70
|
+
P as initSentry
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/edge/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,WAAW,EACX,OAAO,GACR,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,IAAI,CAWP;AAED,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
Picked: {
|
|
4
|
+
session?: {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare function initSentry({ dsn, environment, release, assetsOrigin, filterKeys, }: {
|
|
11
|
+
dsn?: string;
|
|
12
|
+
environment?: string;
|
|
13
|
+
release?: string;
|
|
14
|
+
assetsOrigin?: string;
|
|
15
|
+
filterKeys?: string[];
|
|
16
|
+
}): void;
|
|
17
|
+
export declare function captureException(error: unknown): void;
|
|
18
|
+
export declare function captureMessage(message: string): void;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@picked/sentry",
|
|
3
|
+
"description": "Sentry Plugin",
|
|
4
|
+
"version": "0.0.1-dev.1764358457580",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@sentry/svelte": "^10.27.0",
|
|
7
|
+
"@sentry/vercel-edge": "^10.27.0",
|
|
8
|
+
"@sentry/vite-plugin": "^2.23.0"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@repo/eslint-config": "workspace:*",
|
|
12
|
+
"@repo/typescript-config": "workspace:*",
|
|
13
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
14
|
+
"@types/jsdom": "^21.1.7",
|
|
15
|
+
"@types/node": "^22",
|
|
16
|
+
"@vitest/coverage-v8": "^3.2.3",
|
|
17
|
+
"tsup": "^8.5.0",
|
|
18
|
+
"vite": "^6.4.1",
|
|
19
|
+
"vite-plugin-dts": "^4.5.4",
|
|
20
|
+
"vitest": "^3.2.4"
|
|
21
|
+
},
|
|
22
|
+
"exports": {
|
|
23
|
+
"./edge": {
|
|
24
|
+
"types": "./dist/types/edge/index.d.ts",
|
|
25
|
+
"import": "./dist/esm/edge/index.js",
|
|
26
|
+
"require": "./dist/cjs/edge/index.js",
|
|
27
|
+
"default": "./dist/esm/edge/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./svelte": {
|
|
30
|
+
"types": "./dist/types/svelte/index.d.ts",
|
|
31
|
+
"import": "./dist/esm/svelte/index.js",
|
|
32
|
+
"require": "./dist/cjs/svelte/index.js",
|
|
33
|
+
"default": "./dist/esm/svelte/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./vite": {
|
|
36
|
+
"types": "./dist/types/vite/index.d.ts",
|
|
37
|
+
"import": "./dist/esm/vite/index.js",
|
|
38
|
+
"require": "./dist/cjs/vite/index.js",
|
|
39
|
+
"default": "./dist/esm/vite/index.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist"
|
|
44
|
+
],
|
|
45
|
+
"main": "./dist/cjs/index.js",
|
|
46
|
+
"module": "./dist/esm/index.js",
|
|
47
|
+
"peerDependencies": {},
|
|
48
|
+
"private": false,
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "vite build",
|
|
51
|
+
"dev": "vite build --watch",
|
|
52
|
+
"lint": "eslint .",
|
|
53
|
+
"lint-files": "eslint",
|
|
54
|
+
"lint:format": "eslint . --fix",
|
|
55
|
+
"lint:report": "eslint . -o './.reports/eslint.json' -f json || true",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:coverage": "vitest run --coverage",
|
|
58
|
+
"test:packaged-types": "attw --pack",
|
|
59
|
+
"test:watch": "vitest",
|
|
60
|
+
"type-check": "tsc -p . --noEmit"
|
|
61
|
+
},
|
|
62
|
+
"type": "module",
|
|
63
|
+
"types": "./dist/types/index.d.ts"
|
|
64
|
+
}
|