@lark.js/sentry 0.0.1 → 0.0.3
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/core/bus.cjs +1 -1
- package/dist/core/bus.js +1 -1
- package/dist/core/handle-error.cjs +1 -1
- package/dist/core/handle-error.js +1 -1
- package/dist/core/handle-events.cjs +1 -1
- package/dist/core/handle-events.js +1 -1
- package/dist/core/handle-http.cjs +1 -1
- package/dist/core/handle-http.js +1 -1
- package/dist/core/identity.cjs +1 -1
- package/dist/core/identity.js +1 -1
- package/dist/core/sdk-lifecycle.cjs +1 -1
- package/dist/core/sdk-lifecycle.js +1 -1
- package/dist/core/setup.cjs +1 -1
- package/dist/core/setup.js +1 -1
- package/dist/core/white-screen.cjs +1 -1
- package/dist/core/white-screen.js +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/plugins/exposure/index.cjs +1 -1
- package/dist/plugins/exposure/index.js +1 -1
- package/dist/plugins/index.cjs +1 -0
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/performance/perf.cjs +1 -0
- package/dist/plugins/performance/perf.js +1 -0
- package/dist/plugins/{record → screen-record}/index.d.ts +0 -1
- package/dist/plugins/screen-record/recorder.cjs +1 -0
- package/dist/plugins/screen-record/recorder.js +1 -0
- package/dist/public/public-ip.cjs +1 -1
- package/dist/public/public-ip.js +1 -1
- package/dist/reporter/index.cjs +1 -1
- package/dist/reporter/index.js +1 -1
- package/dist/reporter/network-listener.cjs +1 -1
- package/dist/reporter/network-listener.js +1 -1
- package/dist/reporter/offline-cache.cjs +1 -1
- package/dist/reporter/offline-cache.js +1 -1
- package/dist/reporter/send-preflight.cjs +1 -1
- package/dist/reporter/send-preflight.js +1 -1
- package/dist/reporter/server-recovery.cjs +1 -1
- package/dist/reporter/server-recovery.js +1 -1
- package/dist/reporter/transports.cjs +1 -1
- package/dist/reporter/transports.js +1 -1
- package/dist/utils/click-data.cjs +1 -1
- package/dist/utils/click-data.js +1 -1
- package/dist/utils/sentry.cjs +1 -1
- package/dist/utils/sentry.js +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +1 -1
- package/package.json +5 -15
- package/dist/plugins/perf/perf.cjs +0 -1
- package/dist/plugins/perf/perf.js +0 -1
- package/dist/plugins/record/recorder.cjs +0 -1
- package/dist/plugins/record/recorder.js +0 -1
- /package/dist/plugins/{perf → performance}/first-screen-paint.cjs +0 -0
- /package/dist/plugins/{perf → performance}/first-screen-paint.js +0 -0
- /package/dist/plugins/{perf → performance}/index.cjs +0 -0
- /package/dist/plugins/{perf → performance}/index.d.ts +0 -0
- /package/dist/plugins/{perf → performance}/index.js +0 -0
- /package/dist/plugins/{perf → performance}/navigation-timing.cjs +0 -0
- /package/dist/plugins/{perf → performance}/navigation-timing.js +0 -0
- /package/dist/plugins/{perf → performance}/performance-observer-support.cjs +0 -0
- /package/dist/plugins/{perf → performance}/performance-observer-support.js +0 -0
- /package/dist/plugins/{perf → performance}/resource-element-fallback.cjs +0 -0
- /package/dist/plugins/{perf → performance}/resource-element-fallback.js +0 -0
- /package/dist/plugins/{perf → performance}/resource-timing.cjs +0 -0
- /package/dist/plugins/{perf → performance}/resource-timing.js +0 -0
- /package/dist/plugins/{record → screen-record}/index.cjs +0 -0
- /package/dist/plugins/{record → screen-record}/index.js +0 -0
- /package/dist/plugins/{record → screen-record}/recorder.d.ts +0 -0
package/dist/core/bus.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs"),require("../utils/sentry.cjs");var e=require("../utils/logger.cjs");const r=new Map;exports.clearSubscriptions=()=>{r.clear()},exports.pub=(t,s)=>{const n=r.get(t);if(n)try{for(const e of n)e(s)}catch(r){e.sentryLogger.error("lark
|
|
1
|
+
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs"),require("../utils/sentry.cjs");var e=require("../utils/logger.cjs");const r=new Map;exports.clearSubscriptions=()=>{r.clear()},exports.pub=(t,s)=>{const n=r.get(t);if(n)try{for(const e of n)e(s)}catch(r){e.sentryLogger.error("@lark.js/sentry","Error executing event handler",r)}},exports.sub=(e,t)=>{const s=r.get(e);return s?(s.add(t),()=>{s.delete(t)}):(r.set(e,new Set([t])),()=>{r.get(e)?.delete(t)})};
|
package/dist/core/bus.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants/index.js";import"../types/enums.js";import"../utils/sentry.js";import{sentryLogger as e}from"../utils/logger.js";const t=new Map,r=(r,s)=>{const n=t.get(r);if(n)try{for(const e of n)e(s)}catch(t){e.error("lark
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import"../utils/sentry.js";import{sentryLogger as e}from"../utils/logger.js";const t=new Map,r=(r,s)=>{const n=t.get(r);if(n)try{for(const e of n)e(s)}catch(t){e.error("@lark.js/sentry","Error executing event handler",t)}},s=(e,r)=>{const s=t.get(e);return s?(s.add(r),()=>{s.delete(r)}):(t.set(e,new Set([r])),()=>{t.get(e)?.delete(r)})},n=()=>{t.clear()};export{n as clearSubscriptions,r as pub,s as sub};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../types/enums.cjs"),r=require("../utils/base64.cjs");require("../constants/index.cjs");var s=require("../utils/event2breadcrumb.cjs"),t=require("../utils/sentry.cjs"),o=require("../utils/is-ignored-error.cjs"),a=require("../utils/is-type.cjs"),n=require("../utils/logger.cjs"),u=require("../reporter/index.cjs"),
|
|
1
|
+
"use strict";var e=require("../types/enums.cjs"),r=require("../utils/base64.cjs");require("../constants/index.cjs");var s=require("../utils/event2breadcrumb.cjs"),t=require("../utils/sentry.cjs"),o=require("../utils/is-ignored-error.cjs"),a=require("../utils/is-type.cjs"),n=require("../utils/logger.cjs"),u=require("../reporter/index.cjs"),c=require("./breadcrumb.cjs"),d=require("./handle-code-error.cjs");function i(o){const a={...o,status:e.Status.Error};c.default.push({...a,userAction:s.default(e.EventType.Error)});const n=r.base64v2(`${e.EventType.Error}-${a.name}-${a.message}`);!t.default.options.repeatCodeError&&t.default.codeErrors.has(n)||(t.default.codeErrors.add(n),u.default.send(a))}exports.handleError=({extra:E,...l})=>{n.sentryLogger.error("@lark.js/sentry","Error captured",E),a.isErrorEvent(E)?o.default(E.message)||d.handleCodeError(E):a.isIExtendedErrorEvent(E)?function(o,a){const{localName:n,src:d,href:i}=o.target,E={...a,type:e.EventType.Resource,status:e.Status.Error,name:n,src:d,href:i,message:o.message};c.default.push({...E,userAction:s.default(e.EventType.Resource)});const l=r.base64v2(`${e.EventType.Resource}-${n}-${d||i}`);!t.default.options.repeatCodeError&&t.default.codeErrors.has(l)||(t.default.codeErrors.add(l),u.default.send(E))}(E,l):a.isError(E)?function(r,s){const{name:t,message:a,stack:n}=r;if(o.default(a))return;i({...s,type:e.EventType.Error,name:t,message:a,extra:n||r})}(E,l):function(r,s){const t="string"==typeof r?r:JSON.stringify(r);if(o.default(t))return;i({...s,type:e.EventType.Error,name:"Unknown Error",message:t,extra:r})}(E,l)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Status as r,EventType as e}from"../types/enums.js";import{base64v2 as
|
|
1
|
+
import{Status as r,EventType as e}from"../types/enums.js";import{base64v2 as s}from"../utils/base64.js";import"../constants/index.js";import o from"../utils/event2breadcrumb.js";import t from"../utils/sentry.js";import n from"../utils/is-ignored-error.js";import{isErrorEvent as m,isIExtendedErrorEvent as i,isError as a}from"../utils/is-type.js";import{sentryLogger as c}from"../utils/logger.js";import p from"../reporter/index.js";import u from"./breadcrumb.js";import{handleCodeError as d}from"./handle-code-error.js";const f=({extra:f,...g})=>{c.error("@lark.js/sentry","Error captured",f),m(f)?n(f.message)||d(f):i(f)?function(n,m){const{localName:i,src:a,href:c}=n.target,d={...m,type:e.Resource,status:r.Error,name:i,src:a,href:c,message:n.message};u.push({...d,userAction:o(e.Resource)});const f=s(`${e.Resource}-${i}-${a||c}`);!t.options.repeatCodeError&&t.codeErrors.has(f)||(t.codeErrors.add(f),p.send(d))}(f,g):a(f)?function(r,s){const{name:o,message:t,stack:m}=r;if(n(t))return;E({...s,type:e.Error,name:o,message:t,extra:m||r})}(f,g):function(r,s){const o="string"==typeof r?r:JSON.stringify(r);if(n(o))return;E({...s,type:e.Error,name:"Unknown Error",message:o,extra:r})}(f,g)};function E(n){const m={...n,status:r.Error};u.push({...m,userAction:o(e.Error)});const i=s(`${e.Error}-${m.name}-${m.message}`);!t.options.repeatCodeError&&t.codeErrors.has(i)||(t.codeErrors.add(i),p.send(m))}export{f as handleError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../types/enums.cjs");require("../constants/index.cjs");var r=require("../utils/click-data.cjs"),t=require("../utils/event2breadcrumb.cjs"),s=require("../utils/sentry.cjs"),n=require("../utils/is-type.cjs"),a=require("../utils/logger.cjs"),i=require("../reporter/index.cjs"),u=require("./breadcrumb.cjs"),c=require("./white-screen.cjs"),
|
|
1
|
+
"use strict";var e=require("../types/enums.cjs");require("../constants/index.cjs");var r=require("../utils/click-data.cjs"),t=require("../utils/event2breadcrumb.cjs"),s=require("../utils/sentry.cjs"),n=require("../utils/is-type.cjs"),a=require("../utils/logger.cjs"),i=require("../reporter/index.cjs"),u=require("./breadcrumb.cjs"),c=require("./white-screen.cjs"),l=require("./handle-code-error.cjs"),d=require("./handle-error.cjs");exports.handleClick=({extra:n,...a})=>{if(!(n instanceof MouseEvent))return;const c=r.getDeclarativeClickData(n);if(!c)return;const l={...a,type:e.EventType.Click,name:c.ev||c.msg,message:c.msg||c.ev,status:e.Status.OK,extra:c};u.default.push({...l,userAction:t.default(e.EventType.Click)}),s.default.options.enableClick&&i.default.send(l)},exports.handleUnhandledRejection=e=>{a.sentryLogger.error("@lark.js/sentry","Unhandled rejection captured",e.extra),n.isIExtendedErrorEvent(e.extra)?l.handleCodeError(e.extra):d.handleError(e)},exports.handleWhiteScreen=e=>{c.default(()=>{i.default.send(e)})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Status as r,EventType as e}from"../types/enums.js";import"../constants/index.js";import{getDeclarativeClickData as t}from"../utils/click-data.js";import
|
|
1
|
+
import{Status as r,EventType as e}from"../types/enums.js";import"../constants/index.js";import{getDeclarativeClickData as t}from"../utils/click-data.js";import s from"../utils/event2breadcrumb.js";import o from"../utils/sentry.js";import{isIExtendedErrorEvent as i}from"../utils/is-type.js";import{sentryLogger as m}from"../utils/logger.js";import n from"../reporter/index.js";import a from"./breadcrumb.js";import p from"./white-screen.js";import{handleCodeError as c}from"./handle-code-error.js";import{handleError as l}from"./handle-error.js";const u=r=>{m.error("@lark.js/sentry","Unhandled rejection captured",r.extra),i(r.extra)?c(r.extra):l(r)},f=r=>{p(()=>{n.send(r)})},j=({extra:i,...m})=>{if(!(i instanceof MouseEvent))return;const p=t(i);if(!p)return;const c={...m,type:e.Click,name:p.ev||p.msg,message:p.msg||p.ev,status:r.OK,extra:p};a.push({...c,userAction:s(e.Click)}),o.options.enableClick&&n.send(c)};export{j as handleClick,u as handleUnhandledRejection,f as handleWhiteScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../types/enums.cjs");require("../constants/index.cjs");var t=require("../utils/event2breadcrumb.cjs"),
|
|
1
|
+
"use strict";var e=require("../types/enums.cjs");require("../constants/index.cjs");var t=require("../utils/event2breadcrumb.cjs"),s=require("../utils/get-base-data.cjs"),r=require("../utils/sentry.cjs"),a=require("../utils/transform-http-data.cjs"),u=require("../utils/logger.cjs"),i=require("../reporter/index.cjs"),n=require("./breadcrumb.cjs");exports.handleHttp=d=>{const o=a.default(d),{id:m,name:l,time:c,timestamp:p,message:f,status:g,type:j}=o;g===e.Status.Error?u.sentryLogger.error("@lark.js/sentry",`Request error: ${l}`,d):u.sentryLogger.info("@lark.js/sentry",`Request complete: ${l}`,d),o.api.includes(r.default.options.dsn)||n.default.push({id:m,name:l,time:c,timestamp:p,message:f,status:g,type:j,userAction:t.default(j)}),g!==e.Status.Error?r.default.options.enableHttpPerformance&&i.default.send({...s.default(),type:e.EventType.Performance,name:`HTTP ${o.method}`,message:o.api,status:e.Status.OK,value:o.elapsedTime,extra:{method:o.method,statusCode:o.statusCode,serverTiming:o.serverTiming??[]}}):i.default.send(o)};
|
package/dist/core/handle-http.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Status as e,EventType as t}from"../types/enums.js";import"../constants/index.js";import s from"../utils/event2breadcrumb.js";import r from"../utils/get-base-data.js";import m from"../utils/sentry.js";import o from"../utils/transform-http-data.js";import{sentryLogger as i}from"../utils/logger.js";import a from"../reporter/index.js";import n from"./breadcrumb.js";const p=p=>{const u=o(p),{id:d,name:l,time:f,timestamp:
|
|
1
|
+
import{Status as e,EventType as t}from"../types/enums.js";import"../constants/index.js";import s from"../utils/event2breadcrumb.js";import r from"../utils/get-base-data.js";import m from"../utils/sentry.js";import o from"../utils/transform-http-data.js";import{sentryLogger as i}from"../utils/logger.js";import a from"../reporter/index.js";import n from"./breadcrumb.js";const p=p=>{const u=o(p),{id:d,name:l,time:f,timestamp:j,message:c,status:g,type:y}=u;g===e.Error?i.error("@lark.js/sentry",`Request error: ${l}`,p):i.info("@lark.js/sentry",`Request complete: ${l}`,p),u.api.includes(m.options.dsn)||n.push({id:d,name:l,time:f,timestamp:j,message:c,status:g,type:y,userAction:s(y)}),g!==e.Error?m.options.enableHttpPerformance&&a.send({...r(),type:t.Performance,name:`HTTP ${u.method}`,message:u.api,status:e.OK,value:u.elapsedTime,extra:{method:u.method,statusCode:u.statusCode,serverTiming:u.serverTiming??[]}}):a.send(u)};export{p as handleHttp};
|
package/dist/core/identity.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("../constants/index.cjs");require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),
|
|
1
|
+
"use strict";var t=require("../constants/index.cjs");require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),s=require("../utils/logger.cjs");const r="lark_sentry_anonymous_id";exports.getIdentity=function(){const{anonymousId:s,visitorId:r,userId:n}=e.default.options;return{anonymousId:s,visitorId:r,userId:n,hasAnonymousId:s!==t.UNKNOWN,hasVisitorId:r!==t.UNKNOWN}},exports.initIdentity=async function(){if(!e.default.options.enableFingerprint)return;const t=function(){try{return localStorage.getItem(r)??""}catch{return""}}();if(t)e.default.setOptions({anonymousId:t});else try{const t=await async function(){const t=await import("@fingerprintjs/fingerprintjs"),e=await t.default.load();return(await e.get()).visitorId}();!function(t){try{localStorage.setItem(r,t)}catch{s.sentryLogger.error("@lark.js/sentry","Failed to persist anonymous id")}}(t),e.default.setOptions({anonymousId:t})}catch(t){s.sentryLogger.error("@lark.js/sentry","Failed to collect fingerprint.js visitor id",t)}},exports.setUserId=function(t){e.default.setOptions({userId:t})},exports.setVisitorId=function(t){e.default.setOptions({visitorId:t})};
|
package/dist/core/identity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UNKNOWN as t}from"../constants/index.js";import"../types/enums.js";import n from"../utils/sentry.js";import{sentryLogger as o}from"../utils/logger.js";const
|
|
1
|
+
import{UNKNOWN as t}from"../constants/index.js";import"../types/enums.js";import n from"../utils/sentry.js";import{sentryLogger as o}from"../utils/logger.js";const s="lark_sentry_anonymous_id";async function r(){if(!n.options.enableFingerprint)return;const t=function(){try{return localStorage.getItem(s)??""}catch{return""}}();if(t)n.setOptions({anonymousId:t});else try{const t=await async function(){const t=await import("@fingerprintjs/fingerprintjs"),n=await t.default.load();return(await n.get()).visitorId}();!function(t){try{localStorage.setItem(s,t)}catch{o.error("@lark.js/sentry","Failed to persist anonymous id")}}(t),n.setOptions({anonymousId:t})}catch(t){o.error("@lark.js/sentry","Failed to collect fingerprint.js visitor id",t)}}function i(t){n.setOptions({visitorId:t})}function e(t){n.setOptions({userId:t})}function a(){const{anonymousId:o,visitorId:s,userId:r}=n.options;return{anonymousId:o,visitorId:s,userId:r,hasAnonymousId:o!==t,hasVisitorId:s!==t}}export{a as getIdentity,r as initIdentity,e as setUserId,i as setVisitorId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../constants/index.cjs");require("../types/enums.cjs");var
|
|
1
|
+
"use strict";var e=require("../constants/index.cjs");require("../types/enums.cjs");var i=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs"),s=require("./identity.cjs"),n=require("./options-schema.cjs"),r=require("./plugin-registry.cjs"),o=require("./setup.cjs");let l=null;function u(){return null!==l}exports.destroy=function(){r.destroyPlugins(),l?.(),l=null},exports.init=function(r){const a=n.optionsSchema.parse({...e.DEFAULT_OPTIONS,...r});i.default.setOptions(a);const{dsn:d}=i.default.options;i.default.options.disabled?t.sentryLogger.info("@lark.js/sentry","SDK disabled by options"):""!==d?u()?t.sentryLogger.info("@lark.js/sentry","SDK already initialized"):(t.sentryLogger.info("@lark.js/sentry","SDK initialized",{options:i.default.options}),l=o.default(),s.initIdentity()):t.sentryLogger.error("@lark.js/sentry","Initialization failed: DSN is empty")},exports.isInitialized=u,exports.pluginEnable=function(e,i){const t=new e(i);return t.init(),r.registerPlugin(t),t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_OPTIONS as
|
|
1
|
+
import{DEFAULT_OPTIONS as i}from"../constants/index.js";import"../types/enums.js";import t from"../utils/sentry.js";import{sentryLogger as n}from"../utils/logger.js";import{initIdentity as o}from"./identity.js";import{optionsSchema as s}from"./options-schema.js";import{destroyPlugins as r,registerPlugin as e}from"./plugin-registry.js";import l from"./setup.js";let p=null;function m(){return null!==p}function a(){r(),p?.(),p=null}function f(r){const e=s.parse({...i,...r});t.setOptions(e);const{dsn:a}=t.options;t.options.disabled?n.info("@lark.js/sentry","SDK disabled by options"):""!==a?m()?n.info("@lark.js/sentry","SDK already initialized"):(n.info("@lark.js/sentry","SDK initialized",{options:t.options}),p=l(),o()):n.error("@lark.js/sentry","Initialization failed: DSN is empty")}function u(i,t){const n=new i(t);return n.init(),e(n),n}export{a as destroy,f as init,m as isInitialized,u as pluginEnable};
|
package/dist/core/setup.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/enums.cjs");require("../constants/index.cjs");var n=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs"),r=require("./bus.cjs"),s=require("./pv-lifecycle.cjs"),a=require("./handle-error.cjs"),i=require("./handle-route.cjs"),l=require("./handle-http.cjs"),u=require("./handle-events.cjs"),o=require("./decorate-publish.cjs");exports.default=function(){t.sentryLogger.info("lark
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/enums.cjs");require("../constants/index.cjs");var n=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs"),r=require("./bus.cjs"),s=require("./pv-lifecycle.cjs"),a=require("./handle-error.cjs"),i=require("./handle-route.cjs"),l=require("./handle-http.cjs"),u=require("./handle-events.cjs"),o=require("./decorate-publish.cjs");exports.default=function(){t.sentryLogger.info("@lark.js/sentry","Initializing SDK event subscriptions...");const c=[{enabled:n.default.options.enableXhr,type:e.EventType.Xhr,subscribe:()=>r.sub(e.EventType.Xhr,l.handleHttp),name:"Xhr"},{enabled:n.default.options.enableFetch,type:e.EventType.Fetch,subscribe:()=>r.sub(e.EventType.Fetch,l.handleHttp),name:"Fetch"},{enabled:n.default.options.enableError,type:e.EventType.Error,subscribe:()=>r.sub(e.EventType.Error,a.handleError),name:"Error"},{enabled:n.default.options.enableHistory,type:e.EventType.History,subscribe:()=>r.sub(e.EventType.History,i.handleHistory),name:"History"},{enabled:n.default.options.enableHashChange,type:e.EventType.HashChange,subscribe:()=>r.sub(e.EventType.HashChange,i.handleHashChange),name:"HashChange"},{enabled:n.default.options.enableUnhandledRejection,type:e.EventType.UnhandledRejection,subscribe:()=>r.sub(e.EventType.UnhandledRejection,u.handleUnhandledRejection),name:"UnhandledRejection"},{enabled:n.default.options.enableClick,type:e.EventType.Click,subscribe:()=>r.sub(e.EventType.Click,u.handleClick),name:"Click"},{enabled:n.default.options.enableWhiteScreen,type:e.EventType.WhiteScreen,subscribe:()=>r.sub(e.EventType.WhiteScreen,u.handleWhiteScreen),name:"WhiteScreen"}].filter(({enabled:e})=>e),d=[];c.forEach(({type:e,subscribe:n})=>{d.push(n()),d.push(o.default(e))}),s.initPageView();const p=()=>{s.flushCurrentPageDwell(!0)};return window.addEventListener("beforeunload",p),d.push(()=>{window.removeEventListener("beforeunload",p)}),t.sentryLogger.success("@lark.js/sentry","SDK setup completed",c.map(e=>({event:e.name,type:e.type}))),()=>{d.toReversed().forEach(e=>{e()}),s.resetPageView(),r.clearSubscriptions()}};
|
package/dist/core/setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EventType as e}from"../types/enums.js";import"../constants/index.js";import n from"../utils/sentry.js";import{sentryLogger as r}from"../utils/logger.js";import{sub as t,clearSubscriptions as
|
|
1
|
+
import{EventType as e}from"../types/enums.js";import"../constants/index.js";import n from"../utils/sentry.js";import{sentryLogger as r}from"../utils/logger.js";import{sub as t,clearSubscriptions as s}from"./bus.js";import{initPageView as o,flushCurrentPageDwell as i,resetPageView as a}from"./pv-lifecycle.js";import{handleError as l}from"./handle-error.js";import{handleHistory as p,handleHashChange as b}from"./handle-route.js";import{handleHttp as c}from"./handle-http.js";import{handleUnhandledRejection as h,handleClick as m,handleWhiteScreen as d}from"./handle-events.js";import u from"./decorate-publish.js";function y(){r.info("@lark.js/sentry","Initializing SDK event subscriptions...");const y=[{enabled:n.options.enableXhr,type:e.Xhr,subscribe:()=>t(e.Xhr,c),name:"Xhr"},{enabled:n.options.enableFetch,type:e.Fetch,subscribe:()=>t(e.Fetch,c),name:"Fetch"},{enabled:n.options.enableError,type:e.Error,subscribe:()=>t(e.Error,l),name:"Error"},{enabled:n.options.enableHistory,type:e.History,subscribe:()=>t(e.History,p),name:"History"},{enabled:n.options.enableHashChange,type:e.HashChange,subscribe:()=>t(e.HashChange,b),name:"HashChange"},{enabled:n.options.enableUnhandledRejection,type:e.UnhandledRejection,subscribe:()=>t(e.UnhandledRejection,h),name:"UnhandledRejection"},{enabled:n.options.enableClick,type:e.Click,subscribe:()=>t(e.Click,m),name:"Click"},{enabled:n.options.enableWhiteScreen,type:e.WhiteScreen,subscribe:()=>t(e.WhiteScreen,d),name:"WhiteScreen"}].filter(({enabled:e})=>e),f=[];y.forEach(({type:e,subscribe:n})=>{f.push(n()),f.push(u(e))}),o();const j=()=>{i(!0)};return window.addEventListener("beforeunload",j),f.push(()=>{window.removeEventListener("beforeunload",j)}),r.success("@lark.js/sentry","SDK setup completed",y.map(e=>({event:e.name,type:e.type}))),()=>{f.toReversed().forEach(e=>{e()}),a(),s()}}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/index.cjs"),t=require("../types/enums.cjs"),r=require("../utils/get-css-selectors.cjs"),n=require("../utils/get-base-data.cjs"),i=require("../utils/sentry.cjs"),s=require("../utils/logger.cjs");exports.default=function(o){const{hasSkeleton:l,rootCssSelectors:a}=i.default.options;let c=0;const u=new Set,d=new Set,f=e=>{const t=r.default(e),[n,i,s]=t;return l&&(1===c?t.forEach(e=>u.add(e)):t.forEach(e=>d.add(e))),a.includes(n)||a.includes(i)||a.includes(s)},m=()=>{if(c++,l&&c>0&&d.clear(),c>e.MAX_WHITE_SCREEN_SAMPLE_COUNT)return void S();const{innerWidth:t,innerHeight:r}=globalThis;let n=0;for(let e=1;e<=9;e++){const i=document.elementFromPoint(t*e/10,r/2),s=document.elementFromPoint(t/2,r*e/10);i&&!f(i)||n++,s&&!f(s)||n++}if(!l){if(n>=18)return void h();S()}if(l){if(1===c)return;if(Array.from(d).sort().join(",")===Array.from(u).sort().join(","))return void h();S()}},h=()=>{const e={...n.default(),type:t.EventType.WhiteScreen,status:t.Status.Error,name:"WhiteScreen",message:`sample count ${c}`,extra:"WhiteScreen"};s.sentryLogger.error("lark
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/index.cjs"),t=require("../types/enums.cjs"),r=require("../utils/get-css-selectors.cjs"),n=require("../utils/get-base-data.cjs"),i=require("../utils/sentry.cjs"),s=require("../utils/logger.cjs");exports.default=function(o){const{hasSkeleton:l,rootCssSelectors:a}=i.default.options;let c=0;const u=new Set,d=new Set,f=e=>{const t=r.default(e),[n,i,s]=t;return l&&(1===c?t.forEach(e=>u.add(e)):t.forEach(e=>d.add(e))),a.includes(n)||a.includes(i)||a.includes(s)},m=()=>{if(c++,l&&c>0&&d.clear(),c>e.MAX_WHITE_SCREEN_SAMPLE_COUNT)return void S();const{innerWidth:t,innerHeight:r}=globalThis;let n=0;for(let e=1;e<=9;e++){const i=document.elementFromPoint(t*e/10,r/2),s=document.elementFromPoint(t/2,r*e/10);i&&!f(i)||n++,s&&!f(s)||n++}if(!l){if(n>=18)return void h();S()}if(l){if(1===c)return;if(Array.from(d).sort().join(",")===Array.from(u).sort().join(","))return void h();S()}},h=()=>{const e={...n.default(),type:t.EventType.WhiteScreen,status:t.Status.Error,name:"WhiteScreen",message:`sample count ${c}`,extra:"WhiteScreen"};s.sentryLogger.error("@lark.js/sentry","White screen detected",e),o(e),S()},S=()=>{i.default.whiteScreenTimer&&(clearInterval(i.default.whiteScreenTimer),i.default.whiteScreenTimer=null)},T=()=>{i.default.whiteScreenTimer||(i.default.whiteScreenTimer=globalThis.setInterval(()=>{"requestIdleCallback"in globalThis?requestIdleCallback(e=>{(e.timeRemaining()>0||e.didTimeout)&&m()}):m()},e.WHITE_SCREEN_SAMPLE_INTERVAL))};return"complete"===document.readyState?T():globalThis.addEventListener("load",T,{once:!0}),{stop:S}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WHITE_SCREEN_SAMPLE_INTERVAL as e,MAX_WHITE_SCREEN_SAMPLE_COUNT as t}from"../constants/index.js";import{Status as r,EventType as n}from"../types/enums.js";import o from"../utils/get-css-selectors.js";import i from"../utils/get-base-data.js";import s from"../utils/sentry.js";import{sentryLogger as l}from"../utils/logger.js";function a(a){const{hasSkeleton:c,rootCssSelectors:m}=s.options;let d=0;const u=new Set,f=new Set,h=e=>{const t=o(e),[r,n,i]=t;return c&&(1===d?t.forEach(e=>u.add(e)):t.forEach(e=>f.add(e))),m.includes(r)||m.includes(n)||m.includes(i)},p=()=>{if(d++,c&&d>0&&f.clear(),d>t)return void g();const{innerWidth:e,innerHeight:r}=globalThis;let n=0;for(let t=1;t<=9;t++){const o=document.elementFromPoint(e*t/10,r/2),i=document.elementFromPoint(e/2,r*t/10);o&&!h(o)||n++,i&&!h(i)||n++}if(!c){if(n>=18)return void S();g()}if(c){if(1===d)return;if(Array.from(f).sort().join(",")===Array.from(u).sort().join(","))return void S();g()}},S=()=>{const e={...i(),type:n.WhiteScreen,status:r.Error,name:"WhiteScreen",message:`sample count ${d}`,extra:"WhiteScreen"};l.error("lark
|
|
1
|
+
import{WHITE_SCREEN_SAMPLE_INTERVAL as e,MAX_WHITE_SCREEN_SAMPLE_COUNT as t}from"../constants/index.js";import{Status as r,EventType as n}from"../types/enums.js";import o from"../utils/get-css-selectors.js";import i from"../utils/get-base-data.js";import s from"../utils/sentry.js";import{sentryLogger as l}from"../utils/logger.js";function a(a){const{hasSkeleton:c,rootCssSelectors:m}=s.options;let d=0;const u=new Set,f=new Set,h=e=>{const t=o(e),[r,n,i]=t;return c&&(1===d?t.forEach(e=>u.add(e)):t.forEach(e=>f.add(e))),m.includes(r)||m.includes(n)||m.includes(i)},p=()=>{if(d++,c&&d>0&&f.clear(),d>t)return void g();const{innerWidth:e,innerHeight:r}=globalThis;let n=0;for(let t=1;t<=9;t++){const o=document.elementFromPoint(e*t/10,r/2),i=document.elementFromPoint(e/2,r*t/10);o&&!h(o)||n++,i&&!h(i)||n++}if(!c){if(n>=18)return void S();g()}if(c){if(1===d)return;if(Array.from(f).sort().join(",")===Array.from(u).sort().join(","))return void S();g()}},S=()=>{const e={...i(),type:n.WhiteScreen,status:r.Error,name:"WhiteScreen",message:`sample count ${d}`,extra:"WhiteScreen"};l.error("@lark.js/sentry","White screen detected",e),a(e),g()},g=()=>{s.whiteScreenTimer&&(clearInterval(s.whiteScreenTimer),s.whiteScreenTimer=null)},T=()=>{s.whiteScreenTimer||(s.whiteScreenTimer=globalThis.setInterval(()=>{"requestIdleCallback"in globalThis?requestIdleCallback(e=>{(e.timeRemaining()>0||e.didTimeout)&&p()}):p()},e))};return"complete"===document.readyState?T():globalThis.addEventListener("load",T,{once:!0}),{stop:g}}export{a as default};
|
package/dist/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="0.0.3",r={version:e};exports.default=r,exports.version=e;
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a="0.0.
|
|
1
|
+
var a="0.0.3",e={version:a};export{e as default,a as version};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../types/enums.cjs"),t=require("../../types/plugin.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../types/enums.cjs"),t=require("../../types/plugin.cjs"),s=require("../../reporter/index.cjs");require("../../constants/index.cjs");var r=require("../../utils/get-base-data.cjs");require("../../utils/sentry.cjs");var a=require("../../utils/logger.cjs"),i=require("zod");const o=i.z.object({target:i.z.custom(e=>"Element"in globalThis&&e instanceof globalThis.Element),threshold:i.z.number().min(0).max(1).optional(),params:i.z.record(i.z.string(),i.z.unknown()).optional()});class n extends t.SentryPlugin{ioMap=new Map;targetMap=new Map;constructor(){super(e.EventType.Exposure)}init(){a.sentryLogger.info("@lark.js/sentry","Exposure plugin initialized")}initObserver(e){return new IntersectionObserver(e=>{e.forEach(e=>{const t=this.targetMap.get(e.target);if(t)if(e.isIntersecting)t.showTime=Date.now();else{if(!t.showTime)return;const e=Date.now();this.sendEvent(t,e),delete t.showTime}})},{threshold:e})}sendEvent(t,a){t.showTime&&s.default.send({...r.default(),type:e.EventType.Exposure,name:"Exposure",message:"Element Exposure",status:e.Status.OK,extra:{threshold:t.threshold,observeTime:t.observeTime,showTime:t.showTime,showEndTime:a,duration:a-t.showTime,params:t.params}})}observe(e){(Array.isArray(e)?e:[e]).map(e=>o.parse(e)).forEach(e=>{const t=e.threshold||.5,s=this.ioMap.get(t)??this.initObserver(t);this.ioMap.set(t,s),this.targetMap.has(e.target)||(s.observe(e.target),this.targetMap.set(e.target,{threshold:t,observeTime:Date.now(),params:e.params??{}}))})}unobserve(e){(Array.isArray(e)?e:[e]).forEach(e=>this.unobserveOne(e))}unobserveOne(e){const t=this.targetMap.get(e);if(!t)return;const s=this.ioMap.get(t.threshold);s&&s.unobserve(e),this.targetMap.delete(e)}destroy(){this.ioMap.forEach(e=>{e.disconnect()}),this.ioMap.clear(),this.targetMap.clear()}}exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EventType as e,Status as t}from"../../types/enums.js";import{SentryPlugin as s}from"../../types/plugin.js";import r from"../../reporter/index.js";import"../../constants/index.js";import o from"../../utils/get-base-data.js";import"../../utils/sentry.js";import{sentryLogger as i}from"../../utils/logger.js";import{z as a}from"zod";const n=a.object({target:a.custom(e=>"Element"in globalThis&&e instanceof globalThis.Element),threshold:a.number().min(0).max(1).optional(),params:a.record(a.string(),a.unknown()).optional()});class p extends s{ioMap=new Map;targetMap=new Map;constructor(){super(e.Exposure)}init(){i.info("lark
|
|
1
|
+
import{EventType as e,Status as t}from"../../types/enums.js";import{SentryPlugin as s}from"../../types/plugin.js";import r from"../../reporter/index.js";import"../../constants/index.js";import o from"../../utils/get-base-data.js";import"../../utils/sentry.js";import{sentryLogger as i}from"../../utils/logger.js";import{z as a}from"zod";const n=a.object({target:a.custom(e=>"Element"in globalThis&&e instanceof globalThis.Element),threshold:a.number().min(0).max(1).optional(),params:a.record(a.string(),a.unknown()).optional()});class p extends s{ioMap=new Map;targetMap=new Map;constructor(){super(e.Exposure)}init(){i.info("@lark.js/sentry","Exposure plugin initialized")}initObserver(e){return new IntersectionObserver(e=>{e.forEach(e=>{const t=this.targetMap.get(e.target);if(t)if(e.isIntersecting)t.showTime=Date.now();else{if(!t.showTime)return;const e=Date.now();this.sendEvent(t,e),delete t.showTime}})},{threshold:e})}sendEvent(s,i){s.showTime&&r.send({...o(),type:e.Exposure,name:"Exposure",message:"Element Exposure",status:t.OK,extra:{threshold:s.threshold,observeTime:s.observeTime,showTime:s.showTime,showEndTime:i,duration:i-s.showTime,params:s.params}})}observe(e){(Array.isArray(e)?e:[e]).map(e=>n.parse(e)).forEach(e=>{const t=e.threshold||.5,s=this.ioMap.get(t)??this.initObserver(t);this.ioMap.set(t,s),this.targetMap.has(e.target)||(s.observe(e.target),this.targetMap.set(e.target,{threshold:t,observeTime:Date.now(),params:e.params??{}}))})}unobserve(e){(Array.isArray(e)?e:[e]).forEach(e=>this.unobserveOne(e))}unobserveOne(e){const t=this.targetMap.get(e);if(!t)return;const s=this.ioMap.get(t.threshold);s&&s.unobserve(e),this.targetMap.delete(e)}destroy(){this.ioMap.forEach(e=>{e.disconnect()}),this.ioMap.clear(),this.targetMap.clear()}}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./exposure/index.cjs"),r=require("./performance/index.cjs"),c=require("./screen-record/index.cjs"),n=require("./screen-record/recorder.cjs");exports.ExposurePlugin=e.default,exports.PerformancePlugin=r.default,exports.ScreenRecordPlugin=c.default,exports.unzipScreenRecord=n.unzipScreenRecord;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as ExposurePlugin } from './exposure/index.js';
|
|
2
|
+
export { default as PerformancePlugin } from './performance/index.js';
|
|
3
|
+
export { default as ScreenRecordPlugin } from './screen-record/index.js';
|
|
4
|
+
export { unzipScreenRecord } from './screen-record/recorder.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as ExposurePlugin}from"./exposure/index.js";export{default as PerformancePlugin}from"./performance/index.js";export{default as ScreenRecordPlugin}from"./screen-record/index.js";export{unzipScreenRecord}from"./screen-record/recorder.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../../types/enums.cjs"),t=require("web-vitals");require("../../constants/index.cjs");var r=require("../../utils/get-base-data.cjs");require("../../utils/sentry.cjs");var s=require("../../utils/metric2perf-data.cjs"),n=require("../../utils/logger.cjs"),a=require("./first-screen-paint.cjs");exports.getWebVitals=function(i){n.sentryLogger.info("@lark.js/sentry","Starting web vitals monitoring...");const u=e=>{n.sentryLogger.success("@lark.js/sentry",`Metric: ${e.name}`,e,function(e){if("value"in e&&"number"==typeof e.value)return Math.round(e.value)}(e)),i(e)};t.onLCP(e=>{u(s.default(e))}),t.onFCP(e=>{u(s.default(e))}),t.onCLS(e=>{u(s.default(e))}),t.onINP(e=>{u(s.default(e))}),t.onTTFB(e=>{u(s.default(e))}),a.getFirstScreenPaint(t=>{const s={...r.default(),name:"FSP",value:t,type:e.EventType.Performance,message:"First screen paint"};u(s)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EventType as t}from"../../types/enums.js";import{onLCP as r,onFCP as e,onCLS as s,onINP as i,onTTFB as n}from"web-vitals";import"../../constants/index.js";import o from"../../utils/get-base-data.js";import"../../utils/sentry.js";import a from"../../utils/metric2perf-data.js";import{sentryLogger as m}from"../../utils/logger.js";import{getFirstScreenPaint as p}from"./first-screen-paint.js";function u(u){m.info("@lark.js/sentry","Starting web vitals monitoring...");const f=t=>{m.success("@lark.js/sentry",`Metric: ${t.name}`,t,function(t){if("value"in t&&"number"==typeof t.value)return Math.round(t.value)}(t)),u(t)};r(t=>{f(a(t))}),e(t=>{f(a(t))}),s(t=>{f(a(t))}),i(t=>{f(a(t))}),n(t=>{f(a(t))}),p(r=>{const e={...o(),name:"FSP",value:r,type:t.Performance,message:"First screen paint"};f(e)})}export{u as getWebVitals};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../../types/enums.cjs");require("../../constants/index.cjs");var r=require("../../utils/get-base-data.cjs"),t=require("../../utils/sentry.cjs"),n=require("../../utils/logger.cjs"),o=require("zod");let s=null;const c=o.z.object({timestamp:o.z.number()}).passthrough();function a(){}function i(e,r){const n=r-t.default.options.screenRecordDurationMs;return e.filter(e=>e.timestamp>=n)}function u(e){if(!e||!s)return"";const r=JSON.stringify(e);return function(e){let r="";return e.forEach(e=>{r+=String.fromCharCode(e)}),btoa(r)}(s.gzip(r))}exports.recorder=async function(o){n.sentryLogger.info("@lark.js/sentry","Initializing web recorder...");try{const[{record:d},l]=await Promise.all([import("@rrweb/record"),import("pako")]);s=l.default;let f=[];const p=d({emit(s,a){const d=c.safeParse(s);if(d.success&&(f=i([...f,d.data],d.data.timestamp),a&&(f=i(f,d.data.timestamp)),t.default.shouldScreenRecord&&f.length>0)){const s={...r.default(),name:"ScreenRecord",type:e.EventType.ScreenRecord,event:u(f),eventCount:f.length};n.sentryLogger.success("@lark.js/sentry","Screen record window packaged and sent",{eventCount:s.eventCount}),o.send(s),t.default.shouldScreenRecord=!1}},recordCanvas:!0,checkoutEveryNms:t.default.options.screenRecordDurationMs});return"function"==typeof p?p:a}catch(e){return n.sentryLogger.error("@lark.js/sentry","Failed to load web recorder",e),a}},exports.unzipScreenRecord=function(e){if(!e||!s)return null;const r=s.ungzip(function(e){const r=atob(e);return Uint8Array.from(r,e=>e.charCodeAt(0))}(e),{to:"string"});return JSON.parse(r)},exports.zip=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EventType as t}from"../../types/enums.js";import"../../constants/index.js";import r from"../../utils/get-base-data.js";import e from"../../utils/sentry.js";import{sentryLogger as n}from"../../utils/logger.js";import{z as o}from"zod";let s=null;const c=o.object({timestamp:o.number()}).passthrough();function i(){}function a(t,r){const n=r-e.options.screenRecordDurationMs;return t.filter(t=>t.timestamp>=n)}async function u(o){n.info("@lark.js/sentry","Initializing web recorder...");try{const[{record:u},m]=await Promise.all([import("@rrweb/record"),import("pako")]);s=m.default;let f=[];const l=u({emit(s,i){const u=c.safeParse(s);if(u.success&&(f=a([...f,u.data],u.data.timestamp),i&&(f=a(f,u.data.timestamp)),e.shouldScreenRecord&&f.length>0)){const s={...r(),name:"ScreenRecord",type:t.ScreenRecord,event:d(f),eventCount:f.length};n.success("@lark.js/sentry","Screen record window packaged and sent",{eventCount:s.eventCount}),o.send(s),e.shouldScreenRecord=!1}},recordCanvas:!0,checkoutEveryNms:e.options.screenRecordDurationMs});return"function"==typeof l?l:i}catch(t){return n.error("@lark.js/sentry","Failed to load web recorder",t),i}}function d(t){if(!t||!s)return"";const r=JSON.stringify(t);return function(t){let r="";return t.forEach(t=>{r+=String.fromCharCode(t)}),btoa(r)}(s.gzip(r))}function m(t){if(!t||!s)return null;const r=s.ungzip(function(t){const r=atob(t);return Uint8Array.from(r,t=>t.charCodeAt(0))}(t),{to:"string"});return JSON.parse(r)}export{u as recorder,m as unzipScreenRecord,d as zip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=/([0-9]{1,3}(?:\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){2,7})/gi;exports.getIPs=function(n=500){return new Promise(t=>{if("function"!=typeof globalThis.RTCPeerConnection)return void t([]);const a=new Set,c=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]}),o=()=>{c.onicecandidate=null,c.close(),t([...a])};c.onicecandidate=n=>{n.candidate&&function(n,t){(n.match(e)??[]).forEach(e=>{t.add(e)})}(n.candidate.candidate,a)},c.createDataChannel("lark
|
|
1
|
+
"use strict";const e=/([0-9]{1,3}(?:\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){2,7})/gi;exports.getIPs=function(n=500){return new Promise(t=>{if("function"!=typeof globalThis.RTCPeerConnection)return void t([]);const a=new Set,c=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]}),o=()=>{c.onicecandidate=null,c.close(),t([...a])};c.onicecandidate=n=>{n.candidate&&function(n,t){(n.match(e)??[]).forEach(e=>{t.add(e)})}(n.candidate.candidate,a)},c.createDataChannel("@lark.js/sentry-IP-probe"),c.createOffer().then(e=>c.setLocalDescription(e)).catch(o),setTimeout(o,Math.max(n,100))})};
|
package/dist/public/public-ip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=/([0-9]{1,3}(?:\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){2,7})/gi;function n(n=500){return new Promise(t=>{if("function"!=typeof globalThis.RTCPeerConnection)return void t([]);const a=new Set,c=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]}),o=()=>{c.onicecandidate=null,c.close(),t([...a])};c.onicecandidate=n=>{n.candidate&&function(n,t){(n.match(e)??[]).forEach(e=>{t.add(e)})}(n.candidate.candidate,a)},c.createDataChannel("lark
|
|
1
|
+
const e=/([0-9]{1,3}(?:\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){2,7})/gi;function n(n=500){return new Promise(t=>{if("function"!=typeof globalThis.RTCPeerConnection)return void t([]);const a=new Set,c=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]}),o=()=>{c.onicecandidate=null,c.close(),t([...a])};c.onicecandidate=n=>{n.candidate&&function(n,t){(n.match(e)??[]).forEach(e=>{t.add(e)})}(n.candidate.candidate,a)},c.createDataChannel("@lark.js/sentry-IP-probe"),c.createOffer().then(e=>c.setLocalDescription(e)).catch(o),setTimeout(o,Math.max(n,100))})}export{n as getIPs};
|
package/dist/reporter/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/data-structures.cjs");require("../types/enums.cjs");var t=require("../utils/sentry.cjs"),s=require("../utils/logger.cjs"),i=require("./batch.cjs"),r=require("./flush-scheduler.cjs"),n=require("./network-listener.cjs"),h=require("./offline-cache.cjs"),a=require("./promise.cjs"),u=require("./report-data.cjs"),l=require("./send-preflight.cjs"),c=require("./server-recovery.cjs"),o=require("./transports.cjs");class f{cbQueue=new e.CallbackQueue;id=crypto.randomUUID();events=[];timeoutID;retryTimer;isOnline=!0;isFlushing=!1;static#e;constructor(){n.initNetworkListener({setOnline:e=>{this.isOnline=e},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}static get instance(){return this.#e||(this.#e=new f),this.#e}loadOfflineCache(){this.events.unshift(...h.loadOfflineCache()),this.events=this.events.slice(-t.default.options.maxQueueLength)}saveOfflineCache(){h.saveOfflineCache(this.events)}handleServerError(){this.retryTimer=c.scheduleServerRecovery(this.retryTimer,{setOnline:e=>{this.isOnline=e},setRetryTimer:e=>{this.retryTimer=e},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}async flush(){if(0!==this.events.length&&!this.isFlushing){this.isFlushing=!0;try{if(!this.isOnline)return this.events=this.events.slice(-t.default.options.maxQueueLength),void this.saveOfflineCache();const e=this.takeBatch(),i=a.isPromise(e)?await e:e;if(0===i.length)return;const r=performance.now(),n=this.sendBatch(i);if(!(a.isPromise(n)?await n:n))return this.events=[...i,...this.events].slice(-t.default.options.maxQueueLength),void this.saveOfflineCache();t.default.options.afterSendData?.(i),s.sentryLogger.success("lark
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/data-structures.cjs");require("../types/enums.cjs");var t=require("../utils/sentry.cjs"),s=require("../utils/logger.cjs"),i=require("./batch.cjs"),r=require("./flush-scheduler.cjs"),n=require("./network-listener.cjs"),h=require("./offline-cache.cjs"),a=require("./promise.cjs"),u=require("./report-data.cjs"),l=require("./send-preflight.cjs"),c=require("./server-recovery.cjs"),o=require("./transports.cjs");class f{cbQueue=new e.CallbackQueue;id=crypto.randomUUID();events=[];timeoutID;retryTimer;isOnline=!0;isFlushing=!1;static#e;constructor(){n.initNetworkListener({setOnline:e=>{this.isOnline=e},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}static get instance(){return this.#e||(this.#e=new f),this.#e}loadOfflineCache(){this.events.unshift(...h.loadOfflineCache()),this.events=this.events.slice(-t.default.options.maxQueueLength)}saveOfflineCache(){h.saveOfflineCache(this.events)}handleServerError(){this.retryTimer=c.scheduleServerRecovery(this.retryTimer,{setOnline:e=>{this.isOnline=e},setRetryTimer:e=>{this.retryTimer=e},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}async flush(){if(0!==this.events.length&&!this.isFlushing){this.isFlushing=!0;try{if(!this.isOnline)return this.events=this.events.slice(-t.default.options.maxQueueLength),void this.saveOfflineCache();const e=this.takeBatch(),i=a.isPromise(e)?await e:e;if(0===i.length)return;const r=performance.now(),n=this.sendBatch(i);if(!(a.isPromise(n)?await n:n))return this.events=[...i,...this.events].slice(-t.default.options.maxQueueLength),void this.saveOfflineCache();t.default.options.afterSendData?.(i),s.sentryLogger.success("@lark.js/sentry","Batch report queued or sent",{count:i.length},Math.round(performance.now()-r))}finally{this.isFlushing=!1}this.scheduleNextFlush()}}takeBatch(){const e=t.default.options.cacheMaxLength,s=this.events.slice(0,e);return this.events=this.events.slice(e),i.applyBeforePushHook(s)}sendBatch(e){return!(o.isObjectOverSizeLimit(e,60)||!o.sendBeacon(e))||(t.default.options.useImageReport&&!o.isObjectOverSizeLimit(e,2)?(o.reportByImage(e,this.cbQueue),!0):o.reportByFetch(e,()=>this.handleServerError()))}scheduleNextFlush(){0!==this.events.length&&(this.timeoutID=r.scheduleFlush(this.timeoutID,100,()=>this.flush()))}async flushOfflineCache(){this.loadOfflineCache(),await this.flush()}async send(e,i=!1){const n=t.default.options;if(!l.shouldQueuePayload(e))return;const h=u.runBeforeReportHook(this.id,e),c=a.isPromise(h)?await h:h;if(c){if(s.sentryLogger.info("@lark.js/sentry",`Type: ${e.type}`,c),this.events.push(c),!this.isOnline)return this.events=this.events.slice(-n.maxQueueLength),void this.saveOfflineCache();this.timeoutID&&clearTimeout(this.timeoutID),i||this.events.length>=n.cacheMaxLength?await this.flush():this.timeoutID=r.scheduleFlush(this.timeoutID,n.cacheWaitingTime,()=>this.flush())}}}const d=f.instance;exports.DataReporter=f,exports.default=d;
|
package/dist/reporter/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CallbackQueue as t}from"../utils/data-structures.js";import"../types/enums.js";import e from"../utils/sentry.js";import{sentryLogger as s}from"../utils/logger.js";import{applyBeforePushHook as i}from"./batch.js";import{scheduleFlush as n}from"./flush-scheduler.js";import{initNetworkListener as h}from"./network-listener.js";import{loadOfflineCache as r,saveOfflineCache as o}from"./offline-cache.js";import{isPromise as a}from"./promise.js";import{runBeforeReportHook as l}from"./report-data.js";import{shouldQueuePayload as c}from"./send-preflight.js";import{scheduleServerRecovery as u}from"./server-recovery.js";import{isObjectOverSizeLimit as f,sendBeacon as m,reportByImage as p,reportByFetch as v}from"./transports.js";class d{cbQueue=new t;id=crypto.randomUUID();events=[];timeoutID;retryTimer;isOnline=!0;isFlushing=!1;static#t;constructor(){h({setOnline:t=>{this.isOnline=t},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}static get instance(){return this.#t||(this.#t=new d),this.#t}loadOfflineCache(){this.events.unshift(...r()),this.events=this.events.slice(-e.options.maxQueueLength)}saveOfflineCache(){o(this.events)}handleServerError(){this.retryTimer=u(this.retryTimer,{setOnline:t=>{this.isOnline=t},setRetryTimer:t=>{this.retryTimer=t},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}async flush(){if(0!==this.events.length&&!this.isFlushing){this.isFlushing=!0;try{if(!this.isOnline)return this.events=this.events.slice(-e.options.maxQueueLength),void this.saveOfflineCache();const t=this.takeBatch(),i=a(t)?await t:t;if(0===i.length)return;const n=performance.now(),h=this.sendBatch(i);if(!(a(h)?await h:h))return this.events=[...i,...this.events].slice(-e.options.maxQueueLength),void this.saveOfflineCache();e.options.afterSendData?.(i),s.success("lark
|
|
1
|
+
import{CallbackQueue as t}from"../utils/data-structures.js";import"../types/enums.js";import e from"../utils/sentry.js";import{sentryLogger as s}from"../utils/logger.js";import{applyBeforePushHook as i}from"./batch.js";import{scheduleFlush as n}from"./flush-scheduler.js";import{initNetworkListener as h}from"./network-listener.js";import{loadOfflineCache as r,saveOfflineCache as o}from"./offline-cache.js";import{isPromise as a}from"./promise.js";import{runBeforeReportHook as l}from"./report-data.js";import{shouldQueuePayload as c}from"./send-preflight.js";import{scheduleServerRecovery as u}from"./server-recovery.js";import{isObjectOverSizeLimit as f,sendBeacon as m,reportByImage as p,reportByFetch as v}from"./transports.js";class d{cbQueue=new t;id=crypto.randomUUID();events=[];timeoutID;retryTimer;isOnline=!0;isFlushing=!1;static#t;constructor(){h({setOnline:t=>{this.isOnline=t},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}static get instance(){return this.#t||(this.#t=new d),this.#t}loadOfflineCache(){this.events.unshift(...r()),this.events=this.events.slice(-e.options.maxQueueLength)}saveOfflineCache(){o(this.events)}handleServerError(){this.retryTimer=u(this.retryTimer,{setOnline:t=>{this.isOnline=t},setRetryTimer:t=>{this.retryTimer=t},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}async flush(){if(0!==this.events.length&&!this.isFlushing){this.isFlushing=!0;try{if(!this.isOnline)return this.events=this.events.slice(-e.options.maxQueueLength),void this.saveOfflineCache();const t=this.takeBatch(),i=a(t)?await t:t;if(0===i.length)return;const n=performance.now(),h=this.sendBatch(i);if(!(a(h)?await h:h))return this.events=[...i,...this.events].slice(-e.options.maxQueueLength),void this.saveOfflineCache();e.options.afterSendData?.(i),s.success("@lark.js/sentry","Batch report queued or sent",{count:i.length},Math.round(performance.now()-n))}finally{this.isFlushing=!1}this.scheduleNextFlush()}}takeBatch(){const t=e.options.cacheMaxLength,s=this.events.slice(0,t);return this.events=this.events.slice(t),i(s)}sendBatch(t){return!(f(t,60)||!m(t))||(e.options.useImageReport&&!f(t,2)?(p(t,this.cbQueue),!0):v(t,()=>this.handleServerError()))}scheduleNextFlush(){0!==this.events.length&&(this.timeoutID=n(this.timeoutID,100,()=>this.flush()))}async flushOfflineCache(){this.loadOfflineCache(),await this.flush()}async send(t,i=!1){const h=e.options;if(!c(t))return;const r=l(this.id,t),o=a(r)?await r:r;if(o){if(s.info("@lark.js/sentry",`Type: ${t.type}`,o),this.events.push(o),!this.isOnline)return this.events=this.events.slice(-h.maxQueueLength),void this.saveOfflineCache();this.timeoutID&&clearTimeout(this.timeoutID),i||this.events.length>=h.cacheMaxLength?await this.flush():this.timeoutID=n(this.timeoutID,h.cacheWaitingTime,()=>this.flush())}}}const g=d.instance;export{d as DataReporter,g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs"),require("../utils/sentry.cjs");var e=require("../utils/logger.cjs");exports.initNetworkListener=function(n){"undefined"!=typeof window&&(n.setOnline(!1!==navigator.onLine),window.addEventListener("online",()=>{n.setOnline(!0),e.sentryLogger.info("lark
|
|
1
|
+
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs"),require("../utils/sentry.cjs");var e=require("../utils/logger.cjs");exports.initNetworkListener=function(n){"undefined"!=typeof window&&(n.setOnline(!1!==navigator.onLine),window.addEventListener("online",()=>{n.setOnline(!0),e.sentryLogger.info("@lark.js/sentry","Network is back online, flushing cache"),n.loadOfflineCache(),n.flush()}),window.addEventListener("offline",()=>{n.setOnline(!1),e.sentryLogger.info("@lark.js/sentry","Network is offline, caching events")}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants/index.js";import"../types/enums.js";import"../utils/sentry.js";import{sentryLogger as n}from"../utils/logger.js";function e(e){"undefined"!=typeof window&&(e.setOnline(!1!==navigator.onLine),window.addEventListener("online",()=>{e.setOnline(!0),n.info("lark
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import"../utils/sentry.js";import{sentryLogger as n}from"../utils/logger.js";function e(e){"undefined"!=typeof window&&(e.setOnline(!1!==navigator.onLine),window.addEventListener("online",()=>{e.setOnline(!0),n.info("@lark.js/sentry","Network is back online, flushing cache"),e.loadOfflineCache(),e.flush()}),window.addEventListener("offline",()=>{e.setOnline(!1),n.info("@lark.js/sentry","Network is offline, caching events")}))}export{e as initNetworkListener};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs"),r=require("./report-data-schema.cjs");exports.loadOfflineCache=function(){try{const t=localStorage.getItem(e.default.options.offlineCacheKey);if(!t)return[];const a=JSON.parse(t),o=r.reportDataListSchema.safeParse(a);return localStorage.removeItem(e.default.options.offlineCacheKey),o.success?o.data.slice(-e.default.options.maxQueueLength):[]}catch{return localStorage.removeItem(e.default.options.offlineCacheKey),[]}},exports.saveOfflineCache=function(r){try{localStorage.setItem(e.default.options.offlineCacheKey,JSON.stringify(r.slice(-e.default.options.maxQueueLength)))}catch{t.sentryLogger.error("lark
|
|
1
|
+
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs"),r=require("./report-data-schema.cjs");exports.loadOfflineCache=function(){try{const t=localStorage.getItem(e.default.options.offlineCacheKey);if(!t)return[];const a=JSON.parse(t),o=r.reportDataListSchema.safeParse(a);return localStorage.removeItem(e.default.options.offlineCacheKey),o.success?o.data.slice(-e.default.options.maxQueueLength):[]}catch{return localStorage.removeItem(e.default.options.offlineCacheKey),[]}},exports.saveOfflineCache=function(r){try{localStorage.setItem(e.default.options.offlineCacheKey,JSON.stringify(r.slice(-e.default.options.maxQueueLength)))}catch{t.sentryLogger.error("@lark.js/sentry","Failed to save offline cache")}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants/index.js";import"../types/enums.js";import e from"../utils/sentry.js";import{sentryLogger as t}from"../utils/logger.js";import{reportDataListSchema as o}from"./report-data-schema.js";function r(){try{const t=localStorage.getItem(e.options.offlineCacheKey);if(!t)return[];const r=JSON.parse(t),s=o.safeParse(r);return localStorage.removeItem(e.options.offlineCacheKey),s.success?s.data.slice(-e.options.maxQueueLength):[]}catch{return localStorage.removeItem(e.options.offlineCacheKey),[]}}function s(o){try{localStorage.setItem(e.options.offlineCacheKey,JSON.stringify(o.slice(-e.options.maxQueueLength)))}catch{t.error("lark
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import e from"../utils/sentry.js";import{sentryLogger as t}from"../utils/logger.js";import{reportDataListSchema as o}from"./report-data-schema.js";function r(){try{const t=localStorage.getItem(e.options.offlineCacheKey);if(!t)return[];const r=JSON.parse(t),s=o.safeParse(r);return localStorage.removeItem(e.options.offlineCacheKey),s.success?s.data.slice(-e.options.maxQueueLength):[]}catch{return localStorage.removeItem(e.options.offlineCacheKey),[]}}function s(o){try{localStorage.setItem(e.options.offlineCacheKey,JSON.stringify(o.slice(-e.options.maxQueueLength)))}catch{t.error("@lark.js/sentry","Failed to save offline cache")}}export{r as loadOfflineCache,s as saveOfflineCache};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),r=require("../utils/logger.cjs");exports.shouldQueuePayload=function(s){const t=e.default.options;return""===t.dsn?(r.sentryLogger.error("lark
|
|
1
|
+
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),r=require("../utils/logger.cjs");exports.shouldQueuePayload=function(s){const t=e.default.options;return""===t.dsn?(r.sentryLogger.error("@lark.js/sentry","DSN is empty, report cancelled",s),!1):Math.random()>t.tracesSampleRate?(r.sentryLogger.info("@lark.js/sentry",`Dropped by sample rate: ${s.type}`),!1):(t.screenRecordEventTypes.includes(s.type)&&(e.default.shouldScreenRecord=!0),!0)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants/index.js";import"../types/enums.js";import e from"../utils/sentry.js";import{sentryLogger as r}from"../utils/logger.js";function t(t){const s=e.options;return""===s.dsn?(r.error("lark
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import e from"../utils/sentry.js";import{sentryLogger as r}from"../utils/logger.js";function t(t){const s=e.options;return""===s.dsn?(r.error("@lark.js/sentry","DSN is empty, report cancelled",t),!1):Math.random()>s.tracesSampleRate?(r.info("@lark.js/sentry",`Dropped by sample rate: ${t.type}`),!1):(s.screenRecordEventTypes.includes(t.type)&&(e.shouldScreenRecord=!0),!0)}export{t as shouldQueuePayload};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),r=require("../utils/logger.cjs"),t=require("./timer.cjs");function s(i,n){n.setOnline(!1),i&&clearTimeout(i);const c=setTimeout(()=>{!function(t){fetch(e.default.options.dsn,{method:"HEAD"}).then(e=>{e.ok?(t.setOnline(!0),r.sentryLogger.info("lark
|
|
1
|
+
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),r=require("../utils/logger.cjs"),t=require("./timer.cjs");function s(i,n){n.setOnline(!1),i&&clearTimeout(i);const c=setTimeout(()=>{!function(t){fetch(e.default.options.dsn,{method:"HEAD"}).then(e=>{e.ok?(t.setOnline(!0),r.sentryLogger.info("@lark.js/sentry","Server is back available, flushing cache"),t.loadOfflineCache(),t.flush()):s(void 0,t)}).catch(()=>{s(void 0,t)})}(n)},e.default.options.retryIntervalMilliseconds);return t.unrefTimer(c),n.setRetryTimer(c),c}exports.scheduleServerRecovery=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants/index.js";import"../types/enums.js";import t from"../utils/sentry.js";import{sentryLogger as e}from"../utils/logger.js";import{unrefTimer as i}from"./timer.js";function o(s,n){n.setOnline(!1),s&&clearTimeout(s);const r=setTimeout(()=>{!function(i){fetch(t.options.dsn,{method:"HEAD"}).then(t=>{t.ok?(i.setOnline(!0),e.info("lark
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import t from"../utils/sentry.js";import{sentryLogger as e}from"../utils/logger.js";import{unrefTimer as i}from"./timer.js";function o(s,n){n.setOnline(!1),s&&clearTimeout(s);const r=setTimeout(()=>{!function(i){fetch(t.options.dsn,{method:"HEAD"}).then(t=>{t.ok?(i.setOnline(!0),e.info("@lark.js/sentry","Server is back available, flushing cache"),i.loadOfflineCache(),i.flush()):o(void 0,i)}).catch(()=>{o(void 0,i)})}(n)},t.options.retryIntervalMilliseconds);return i(r),n.setRetryTimer(r),r}export{o as scheduleServerRecovery};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs");exports.isObjectOverSizeLimit=function(e,t){return new Blob([JSON.stringify(e)]).size>1024*t},exports.reportByFetch=async function(n,r){try{const t=await fetch(e.default.options.dsn,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"},keepalive:!0});return t.ok||r(),t.ok}catch(e){return t.sentryLogger.error("lark
|
|
1
|
+
"use strict";require("../constants/index.cjs"),require("../types/enums.cjs");var e=require("../utils/sentry.cjs"),t=require("../utils/logger.cjs");exports.isObjectOverSizeLimit=function(e,t){return new Blob([JSON.stringify(e)]).size>1024*t},exports.reportByFetch=async function(n,r){try{const t=await fetch(e.default.options.dsn,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"},keepalive:!0});return t.ok||r(),t.ok}catch(e){return t.sentryLogger.error("@lark.js/sentry","Fetch report failed",e),r(),!1}},exports.reportByImage=function(t,n){const{dsn:r}=e.default.options;n.push(()=>{const e=new Image,n=r.includes("?")?"&":"?";e.src=`${r}${n}data=${encodeURIComponent(JSON.stringify(t))}`})},exports.sendBeacon=function(t){return!("undefined"==typeof navigator||!navigator.sendBeacon)&&navigator.sendBeacon(e.default.options.dsn,JSON.stringify(t))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants/index.js";import"../types/enums.js";import n from"../utils/sentry.js";import{sentryLogger as t}from"../utils/logger.js";function o(n,t){return new Blob([JSON.stringify(n)]).size>1024*t}function e(t){return!("undefined"==typeof navigator||!navigator.sendBeacon)&&navigator.sendBeacon(n.options.dsn,JSON.stringify(t))}async function
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import n from"../utils/sentry.js";import{sentryLogger as t}from"../utils/logger.js";function o(n,t){return new Blob([JSON.stringify(n)]).size>1024*t}function e(t){return!("undefined"==typeof navigator||!navigator.sendBeacon)&&navigator.sendBeacon(n.options.dsn,JSON.stringify(t))}async function s(o,e){try{const t=await fetch(n.options.dsn,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"},keepalive:!0});return t.ok||e(),t.ok}catch(n){return t.error("@lark.js/sentry","Fetch report failed",n),e(),!1}}function r(t,o){const{dsn:e}=n.options;o.push(()=>{const n=new Image,o=e.includes("?")?"&":"?";n.src=`${e}${o}data=${encodeURIComponent(JSON.stringify(t))}`})}export{o as isObjectOverSizeLimit,s as reportByFetch,r as reportByImage,e as sendBeacon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t="lark-
|
|
1
|
+
"use strict";const t="s-lark-",e=new Set(["view","msg","ev"]);function n(t){return t.hasAttribute("s-lark-view")||t.hasAttribute("s-lark-ev")||t.hasAttribute("s-lark-msg")}function r(t){const e=(n=t)?n.getAttribute("s-lark-msg")??n.title:"";var n;if(e)return e;const r=t.textContent?.trim();return r||t.getAttribute("aria-label")||t.tagName.toLowerCase()}function o(t,e){for(const n of t){const t=n.getAttribute(e);if(t)return t}return null}function a(t){const e=o(t,"s-lark-ev");if(e)return e;const n=o(t,"title");if(n)return n;const r=o(t,"s-lark-view");return r||(t[0]?.tagName.toLowerCase()??"unknown")}function s(n){const r=n.find(e=>Array.from(e.attributes).some(e=>e.name.startsWith(t)));return r?Array.from(r.attributes).reduce((n,r)=>{if(!r.name.startsWith(t))return n;const o=r.name.replace(t,"");return e.has(o)||(n[o]=r.value||null),n},{}):{}}function i(t){const e=[];let n=t;for(;n&&n!==document.body;)e.unshift(n.tagName.toLowerCase()),n=n.parentElement;return e.join(">")}exports.getDeclarativeClickData=function(t){const e=function(t){return t.composedPath().filter(t=>t instanceof HTMLElement)}(t),o=e.length>0?e:function(t){if(!(t instanceof HTMLElement))return[];const e=[];let n=t;for(;n;)e.push(n),n=n.parentElement;return e}(t.target),u=o.find(n);if(!u)return null;const l=t.target instanceof HTMLElement?t.target:u,{top:c,left:f}=l.getBoundingClientRect(),{scrollTop:m,scrollLeft:g}=document.documentElement;return{ev:a(o),msg:r(u),triggerPageUrl:location.href,x:f+g,y:c+m,params:s(o),elementPath:i(u).slice(-128),triggerTime:Date.now()}};
|
package/dist/utils/click-data.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t="lark-
|
|
1
|
+
const t="s-lark-",e=new Set(["view","msg","ev"]);function n(t){return t.hasAttribute("s-lark-view")||t.hasAttribute("s-lark-ev")||t.hasAttribute("s-lark-msg")}function r(t){const e=(n=t)?n.getAttribute("s-lark-msg")??n.title:"";var n;if(e)return e;const r=t.textContent?.trim();return r||t.getAttribute("aria-label")||t.tagName.toLowerCase()}function o(t,e){for(const n of t){const t=n.getAttribute(e);if(t)return t}return null}function a(t){const e=o(t,"s-lark-ev");if(e)return e;const n=o(t,"title");if(n)return n;const r=o(t,"s-lark-view");return r||(t[0]?.tagName.toLowerCase()??"unknown")}function s(n){const r=n.find(e=>Array.from(e.attributes).some(e=>e.name.startsWith(t)));return r?Array.from(r.attributes).reduce((n,r)=>{if(!r.name.startsWith(t))return n;const o=r.name.replace(t,"");return e.has(o)||(n[o]=r.value||null),n},{}):{}}function i(t){const e=[];let n=t;for(;n&&n!==document.body;)e.unshift(n.tagName.toLowerCase()),n=n.parentElement;return e.join(">")}function u(t){const e=function(t){return t.composedPath().filter(t=>t instanceof HTMLElement)}(t),o=e.length>0?e:function(t){if(!(t instanceof HTMLElement))return[];const e=[];let n=t;for(;n;)e.push(n),n=n.parentElement;return e}(t.target),u=o.find(n);if(!u)return null;const l=t.target instanceof HTMLElement?t.target:u,{top:c,left:f}=l.getBoundingClientRect(),{scrollTop:m,scrollLeft:g}=document.documentElement;return{ev:a(o),msg:r(u),triggerPageUrl:location.href,x:f+g,y:c+m,params:s(o),elementPath:i(u).slice(-128),triggerTime:Date.now()}}export{u as getDeclarativeClickData};
|
package/dist/utils/sentry.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/index.cjs"),t=require("ua-parser-js");function n(){try{const e=document.createElement("canvas"),t=e.getContext("2d");if(t){t.textBaseline="top",t.font="14px 'Arial'",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.fillText("lark
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/index.cjs"),t=require("ua-parser-js");function n(){try{const e=document.createElement("canvas"),t=e.getContext("2d");if(t){t.textBaseline="top",t.font="14px 'Arial'",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.fillText("@lark.js/sentry",2,15),t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillText("@lark.js/sentry",4,17);const n=e.toDataURL().replace("data:image/png;base64,",""),r=atob(n),s=function(e){let t=~0;for(let n=0;n<e.length;n++)t=t>>>8^e.charCodeAt(n);return(-1^t)>>>0};return s(r).toString(16)}}catch{return r()}return r()}function r(){return globalThis.crypto&&"function"==typeof globalThis.crypto.randomUUID?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}class s{static#e;static get instance(){return this.#e||(this.#e=new s,globalThis.__sentry__=this.#e),this.#e}codeErrors=new Set;whiteScreenTimer=null;options=e.DEFAULT_OPTIONS;deviceInfo;shouldScreenRecord=!1;constructor(){const r=(new t.UAParser).getResult();this.deviceInfo={browserName:r.browser.name??e.UNKNOWN,browserVersion:r.browser.version??e.UNKNOWN,osName:r.os.name??e.UNKNOWN,osVersion:r.os.version??e.UNKNOWN,userAgent:r.ua,deviceModel:r.device.model??e.UNKNOWN,deviceType:r.device.type??e.UNKNOWN,fingerprint:n(),language:"navigator"in globalThis&&globalThis.navigator.language||e.UNKNOWN,screenResolution:"screen"in globalThis?`${globalThis.screen.width}x${globalThis.screen.height}`:e.UNKNOWN}}setOptions(e){s.#e.options={...this.options,...e}}}var i=s.instance;exports.default=i;
|
package/dist/utils/sentry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_OPTIONS as e,UNKNOWN as t}from"../constants/index.js";import{UAParser as n}from"ua-parser-js";function o(){try{const e=document.createElement("canvas"),t=e.getContext("2d");if(t){t.textBaseline="top",t.font="14px 'Arial'",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.fillText("lark
|
|
1
|
+
import{DEFAULT_OPTIONS as e,UNKNOWN as t}from"../constants/index.js";import{UAParser as n}from"ua-parser-js";function o(){try{const e=document.createElement("canvas"),t=e.getContext("2d");if(t){t.textBaseline="top",t.font="14px 'Arial'",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.fillText("@lark.js/sentry",2,15),t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillText("@lark.js/sentry",4,17);const n=e.toDataURL().replace("data:image/png;base64,",""),o=atob(n),s=function(e){let t=~0;for(let n=0;n<e.length;n++)t=t>>>8^e.charCodeAt(n);return(-1^t)>>>0};return s(o).toString(16)}}catch{return s()}return s()}function s(){return globalThis.crypto&&"function"==typeof globalThis.crypto.randomUUID?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}class i{static#e;static get instance(){return this.#e||(this.#e=new i,globalThis.__sentry__=this.#e),this.#e}codeErrors=new Set;whiteScreenTimer=null;options=e;deviceInfo;shouldScreenRecord=!1;constructor(){const e=(new n).getResult();this.deviceInfo={browserName:e.browser.name??t,browserVersion:e.browser.version??t,osName:e.os.name??t,osVersion:e.os.version??t,userAgent:e.ua,deviceModel:e.device.model??t,deviceType:e.device.type??t,fingerprint:o(),language:"navigator"in globalThis&&globalThis.navigator.language||t,screenResolution:"screen"in globalThis?`${globalThis.screen.width}x${globalThis.screen.height}`:t}}setOptions(e){i.#e.options={...this.options,...e}}}var r=i.instance;export{r as default};
|
package/dist/vite.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:buffer"),t=require("node:path"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:buffer"),t=require("node:path"),n=require("node:fs");require("./constants/index.cjs"),require("./types/enums.cjs");var r=require("./utils/sentry.cjs"),s=require("./utils/logger.cjs"),i=require("zod");function o(t,n){return"string"==typeof n?t+n:e.Buffer.isBuffer(n)?t+n.toString("utf8"):n instanceof Uint8Array?t+e.Buffer.from(n).toString("utf8"):t}function c(e){const t=JSON.parse(e);return i.z.json().parse(t)}const u=(e,t)=>n=>{n.middlewares.use((n,r,s)=>{if(n.url===e&&"POST"===n.method){let e="";n.on("data",t=>{e=o(e,t)}),n.on("end",()=>{if(e)try{const n=c(e);t.write(JSON.stringify(n)+"\n")}catch{t.write(e+"\n")}r.setHeader("Content-Type","application/json"),r.statusCode=200,r.end(JSON.stringify({code:0,message:"success"}))})}else s()})},a=(e,t)=>n=>{n.middlewares.use((n,r,s)=>{if(n.url===e&&"POST"===n.method){let e="";n.on("data",t=>{e=o(e,t)}),n.on("end",()=>{if(e)try{const n=c(e);t.write(JSON.stringify(n)+"\n")}catch{t.write(e+"\n")}r.setHeader("Content-Type","application/json"),r.statusCode=200,r.end(JSON.stringify({code:0,message:"success"}))})}else s()})};function l({dsn:e}){const s=t.join(process.cwd(),"logs");n.existsSync(s)||n.mkdirSync(s,{recursive:!0});const i=(new Date).toISOString().replace(/[-:.]/g,"").slice(0,14),o=t.join(s,`sentry_${i}.log`),c=n.createWriteStream(o,{flags:"a"});return{name:"vite-plugin-sentry",configureServer:a(e||r.default.options.dsn||"/sentry",c),closeBundle(){c&&c.close()}}}exports.default=l,exports.sentryPlugin=l,exports.sentryPlugin7=function({dsn:e}={}){const i=t.join(process.cwd(),"logs");n.existsSync(i)||n.mkdirSync(i,{recursive:!0});const o=(new Date).toISOString().replace(/[-:.]/g,"").slice(0,14),c=t.join(i,`sentry_${o}.log`),a=n.createWriteStream(c,{flags:"a"});return s.sentryLogger.info("@lark.js/sentry",`Sentry mock plugin initialized, logs will be written to ${c}`),{name:"vite-plugin-sentry",configureServer:u(e||r.default.options.dsn||"/sentry",a),closeBundle(){a&&a.close()}}};
|
package/dist/vite.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { Plugin as Plugin$1 } from 'vite7';
|
|
|
2
2
|
import { Plugin } from 'vite';
|
|
3
3
|
|
|
4
4
|
interface ISentryPluginOptions {
|
|
5
|
-
|
|
5
|
+
dsn?: string;
|
|
6
6
|
}
|
|
7
|
-
declare function sentryPlugin7({
|
|
8
|
-
declare function sentryPlugin({
|
|
7
|
+
declare function sentryPlugin7({ dsn }?: ISentryPluginOptions): Plugin$1;
|
|
8
|
+
declare function sentryPlugin({ dsn }: ISentryPluginOptions): Plugin;
|
|
9
9
|
|
|
10
10
|
export { sentryPlugin as default, sentryPlugin, sentryPlugin7 };
|
|
11
11
|
export type { ISentryPluginOptions };
|
package/dist/vite.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Buffer as e}from"node:buffer";import{join as t}from"node:path";import{existsSync as n,mkdirSync as
|
|
1
|
+
import{Buffer as e}from"node:buffer";import{join as t}from"node:path";import{existsSync as n,mkdirSync as s,createWriteStream as o}from"node:fs";import"./constants/index.js";import"./types/enums.js";import r from"./utils/sentry.js";import{sentryLogger as i}from"./utils/logger.js";import{z as c}from"zod";function a(t,n){return"string"==typeof n?t+n:e.isBuffer(n)?t+n.toString("utf8"):n instanceof Uint8Array?t+e.from(n).toString("utf8"):t}function l(e){const t=JSON.parse(e);return c.json().parse(t)}const f=(e,t)=>n=>{n.middlewares.use((n,s,o)=>{if(n.url===e&&"POST"===n.method){let e="";n.on("data",t=>{e=a(e,t)}),n.on("end",()=>{if(e)try{const n=l(e);t.write(JSON.stringify(n)+"\n")}catch{t.write(e+"\n")}s.setHeader("Content-Type","application/json"),s.statusCode=200,s.end(JSON.stringify({code:0,message:"success"}))})}else o()})},d=(e,t)=>n=>{n.middlewares.use((n,s,o)=>{if(n.url===e&&"POST"===n.method){let e="";n.on("data",t=>{e=a(e,t)}),n.on("end",()=>{if(e)try{const n=l(e);t.write(JSON.stringify(n)+"\n")}catch{t.write(e+"\n")}s.setHeader("Content-Type","application/json"),s.statusCode=200,s.end(JSON.stringify({code:0,message:"success"}))})}else o()})};function u({dsn:e}={}){const c=t(process.cwd(),"logs");n(c)||s(c,{recursive:!0});const a=(new Date).toISOString().replace(/[-:.]/g,"").slice(0,14),l=t(c,`sentry_${a}.log`),d=o(l,{flags:"a"});return i.info("@lark.js/sentry",`Sentry mock plugin initialized, logs will be written to ${l}`),{name:"vite-plugin-sentry",configureServer:f(e||r.options.dsn||"/sentry",d),closeBundle(){d&&d.close()}}}function p({dsn:e}){const i=t(process.cwd(),"logs");n(i)||s(i,{recursive:!0});const c=(new Date).toISOString().replace(/[-:.]/g,"").slice(0,14),a=t(i,`sentry_${c}.log`),l=o(a,{flags:"a"});return{name:"vite-plugin-sentry",configureServer:d(e||r.options.dsn||"/sentry",l),closeBundle(){l&&l.close()}}}export{p as default,p as sentryPlugin,u as sentryPlugin7};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark.js/sentry",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "sentry sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -22,20 +22,10 @@
|
|
|
22
22
|
"import": "./dist/index.js",
|
|
23
23
|
"require": "./dist/index.cjs"
|
|
24
24
|
},
|
|
25
|
-
"./plugins
|
|
26
|
-
"types": "./dist/plugins/
|
|
27
|
-
"import": "./dist/plugins/
|
|
28
|
-
"require": "./dist/plugins/
|
|
29
|
-
},
|
|
30
|
-
"./plugins/record": {
|
|
31
|
-
"types": "./dist/plugins/record/index.d.ts",
|
|
32
|
-
"import": "./dist/plugins/record/index.js",
|
|
33
|
-
"require": "./dist/plugins/record/index.cjs"
|
|
34
|
-
},
|
|
35
|
-
"./plugins/exposure": {
|
|
36
|
-
"types": "./dist/plugins/exposure/index.d.ts",
|
|
37
|
-
"import": "./dist/plugins/exposure/index.js",
|
|
38
|
-
"require": "./dist/plugins/exposure/index.cjs"
|
|
25
|
+
"./plugins": {
|
|
26
|
+
"types": "./dist/plugins/index.d.ts",
|
|
27
|
+
"import": "./dist/plugins/index.js",
|
|
28
|
+
"require": "./dist/plugins/index.cjs"
|
|
39
29
|
},
|
|
40
30
|
"./react": {
|
|
41
31
|
"types": "./dist/react.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("../../types/enums.cjs"),t=require("web-vitals");require("../../constants/index.cjs");var r=require("../../utils/get-base-data.cjs");require("../../utils/sentry.cjs");var n=require("../../utils/metric2perf-data.cjs"),s=require("../../utils/logger.cjs"),a=require("./first-screen-paint.cjs");exports.getWebVitals=function(i){s.sentryLogger.info("lark-sentry","Starting Web Vitals monitoring...");const u=e=>{s.sentryLogger.success("lark-sentry",`Metric: ${e.name}`,e,function(e){if("value"in e&&"number"==typeof e.value)return Math.round(e.value)}(e)),i(e)};t.onLCP(e=>{u(n.default(e))}),t.onFCP(e=>{u(n.default(e))}),t.onCLS(e=>{u(n.default(e))}),t.onINP(e=>{u(n.default(e))}),t.onTTFB(e=>{u(n.default(e))}),a.getFirstScreenPaint(t=>{const n={...r.default(),name:"FSP",value:t,type:e.EventType.Performance,message:"First Screen Paint"};u(n)})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EventType as t}from"../../types/enums.js";import{onLCP as r,onFCP as e,onCLS as s,onINP as i,onTTFB as n}from"web-vitals";import"../../constants/index.js";import o from"../../utils/get-base-data.js";import"../../utils/sentry.js";import a from"../../utils/metric2perf-data.js";import{sentryLogger as m}from"../../utils/logger.js";import{getFirstScreenPaint as u}from"./first-screen-paint.js";function f(f){m.info("lark-sentry","Starting Web Vitals monitoring...");const p=t=>{m.success("lark-sentry",`Metric: ${t.name}`,t,function(t){if("value"in t&&"number"==typeof t.value)return Math.round(t.value)}(t)),f(t)};r(t=>{p(a(t))}),e(t=>{p(a(t))}),s(t=>{p(a(t))}),i(t=>{p(a(t))}),n(t=>{p(a(t))}),u(r=>{const e={...o(),name:"FSP",value:r,type:t.Performance,message:"First Screen Paint"};p(e)})}export{f as getWebVitals};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("../../types/enums.cjs");require("../../constants/index.cjs");var r=require("../../utils/get-base-data.cjs"),t=require("../../utils/sentry.cjs"),n=require("../../utils/logger.cjs"),o=require("zod");let s=null;const c=o.z.object({timestamp:o.z.number()}).passthrough();function a(){}function i(e,r){const n=r-t.default.options.screenRecordDurationMs;return e.filter(e=>e.timestamp>=n)}function u(e){if(!e||!s)return"";const r=JSON.stringify(e);return function(e){let r="";return e.forEach(e=>{r+=String.fromCharCode(e)}),btoa(r)}(s.gzip(r))}exports.recorder=async function(o){n.sentryLogger.info("lark-sentry","Initializing rrweb recorder...");try{const[{record:d},l]=await Promise.all([import("@rrweb/record"),import("pako")]);s=l.default;let f=[];const p=d({emit(s,a){const d=c.safeParse(s);if(d.success&&(f=i([...f,d.data],d.data.timestamp),a&&(f=i(f,d.data.timestamp)),t.default.shouldScreenRecord&&f.length>0)){const s={...r.default(),name:"ScreenRecord",type:e.EventType.ScreenRecord,event:u(f),eventCount:f.length};n.sentryLogger.success("lark-sentry","Screen record window packaged and sent",{eventCount:s.eventCount}),o.send(s),t.default.shouldScreenRecord=!1}},recordCanvas:!0,checkoutEveryNms:t.default.options.screenRecordDurationMs});return"function"==typeof p?p:a}catch(e){return n.sentryLogger.error("lark-sentry","Failed to load @rrweb/pako",e),a}},exports.unzipScreenRecord=function(e){if(!e||!s)return null;const r=s.ungzip(function(e){const r=atob(e);return Uint8Array.from(r,e=>e.charCodeAt(0))}(e),{to:"string"});return JSON.parse(r)},exports.zip=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EventType as t}from"../../types/enums.js";import"../../constants/index.js";import r from"../../utils/get-base-data.js";import e from"../../utils/sentry.js";import{sentryLogger as n}from"../../utils/logger.js";import{z as o}from"zod";let s=null;const c=o.object({timestamp:o.number()}).passthrough();function i(){}function a(t,r){const n=r-e.options.screenRecordDurationMs;return t.filter(t=>t.timestamp>=n)}async function u(o){n.info("lark-sentry","Initializing rrweb recorder...");try{const[{record:u},d]=await Promise.all([import("@rrweb/record"),import("pako")]);s=d.default;let f=[];const l=u({emit(s,i){const u=c.safeParse(s);if(u.success&&(f=a([...f,u.data],u.data.timestamp),i&&(f=a(f,u.data.timestamp)),e.shouldScreenRecord&&f.length>0)){const s={...r(),name:"ScreenRecord",type:t.ScreenRecord,event:m(f),eventCount:f.length};n.success("lark-sentry","Screen record window packaged and sent",{eventCount:s.eventCount}),o.send(s),e.shouldScreenRecord=!1}},recordCanvas:!0,checkoutEveryNms:e.options.screenRecordDurationMs});return"function"==typeof l?l:i}catch(t){return n.error("lark-sentry","Failed to load @rrweb/pako",t),i}}function m(t){if(!t||!s)return"";const r=JSON.stringify(t);return function(t){let r="";return t.forEach(t=>{r+=String.fromCharCode(t)}),btoa(r)}(s.gzip(r))}function d(t){if(!t||!s)return null;const r=s.ungzip(function(t){const r=atob(t);return Uint8Array.from(r,t=>t.charCodeAt(0))}(t),{to:"string"});return JSON.parse(r)}export{u as recorder,d as unzipScreenRecord,m as zip};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|