@lark.js/sentry 0.0.3 → 0.0.5
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/constants/index.cjs +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/core/bus.cjs +1 -1
- package/dist/core/bus.js +1 -1
- package/dist/core/decorate-http-publish.cjs +1 -1
- package/dist/core/decorate-http-publish.js +1 -1
- package/dist/core/handle-code-error.cjs +1 -1
- package/dist/core/handle-code-error.js +1 -1
- package/dist/core/options-schema.cjs +1 -1
- package/dist/core/options-schema.d.ts +1 -0
- package/dist/core/options-schema.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/reporter/index.cjs +1 -1
- package/dist/reporter/index.js +1 -1
- package/dist/reporter/offline-cache.cjs +1 -1
- package/dist/reporter/offline-cache.js +1 -1
- package/dist/reporter/promise.cjs +1 -1
- package/dist/reporter/promise.js +1 -1
- package/dist/reporter/transports.cjs +1 -1
- package/dist/reporter/transports.js +1 -1
- package/dist/utils/data-structures.cjs +1 -1
- package/dist/utils/data-structures.js +1 -1
- package/dist/utils/event2breadcrumb.cjs +1 -1
- package/dist/utils/event2breadcrumb.js +1 -1
- package/dist/utils/logger.cjs +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/sentry.cjs +1 -1
- package/dist/utils/sentry.js +1 -1
- package/dist/utils/transform-http-data.cjs +1 -1
- package/dist/utils/transform-http-data.js +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/package.json +7 -7
package/dist/constants/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../types/enums.cjs"),r=require("../package.json.cjs");const{version:n}=r.default,t="unknown",a={dsn:"",projectId:t,userId:t,disabled:!1,enableXhr:!0,enableFetch:!0,enableClick:!0,enableError:!0,enableUnhandledRejection:!0,enableHashChange:!0,enableHistory:!0,enablePerformance:!0,enableScreenRecord:!0,enableWhiteScreen:!0,enableFingerprint:!1,anonymousId:t,visitorId:t,maxBreadcrumbs:30,useImageReport:!1,screenRecordEventTypes:[e.EventType.Error,e.EventType.Xhr,e.EventType.Fetch,e.EventType.Resource,e.EventType.UnhandledRejection],hasSkeleton:!1,rootCssSelectors:["html","body","#app","#root"],clickThrottleDelay:0,requestTimeoutMilliseconds:3e3,screenRecordDurationMs:3e3,repeatCodeError:!1,enableHttpPerformance:!1,ignoreErrors:[],excludeApis:[],cacheMaxLength:10,cacheWaitingTime:2e3,maxQueueLength:200,retryIntervalMilliseconds:6e4,offlineCacheKey:"lark_sentry_offline_cache",tracesSampleRate:1};exports.DEFAULT_OPTIONS=a,exports.MAX_BREADCRUMBS=30,exports.MAX_WHITE_SCREEN_SAMPLE_COUNT=10,exports.SDK_VERSION=n,exports.UNKNOWN=t,exports.WHITE_SCREEN_SAMPLE_INTERVAL=1e3;
|
|
1
|
+
"use strict";var e=require("../types/enums.cjs"),r=require("../package.json.cjs");const{version:n}=r.default,t="unknown",a={dsn:"",projectId:t,userId:t,disabled:!1,enableXhr:!0,enableFetch:!0,enableClick:!0,enableError:!0,enableUnhandledRejection:!0,enableHashChange:!0,enableHistory:!0,enablePerformance:!0,enableScreenRecord:!0,enableWhiteScreen:!0,enableFingerprint:!1,anonymousId:t,visitorId:t,maxBreadcrumbs:30,useImageReport:!1,screenRecordEventTypes:[e.EventType.Error,e.EventType.Xhr,e.EventType.Fetch,e.EventType.Resource,e.EventType.UnhandledRejection],hasSkeleton:!1,rootCssSelectors:["html","body","#app","#root"],clickThrottleDelay:0,requestTimeoutMilliseconds:3e3,screenRecordDurationMs:3e3,repeatCodeError:!1,enableHttpPerformance:!1,ignoreErrors:[],excludeApis:[],cacheMaxLength:10,cacheWaitingTime:2e3,maxQueueLength:200,retryIntervalMilliseconds:6e4,offlineCacheKey:"lark_sentry_offline_cache",tracesSampleRate:1,debug:!1};exports.DEFAULT_OPTIONS=a,exports.MAX_BREADCRUMBS=30,exports.MAX_WHITE_SCREEN_SAMPLE_COUNT=10,exports.SDK_VERSION=n,exports.UNKNOWN=t,exports.WHITE_SCREEN_SAMPLE_INTERVAL=1e3;
|
package/dist/constants/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EventType as e}from"../types/enums.js";import r from"../package.json.js";const{version:n}=r,o=30,a=10,t=1e3,s="unknown",c={dsn:"",projectId:s,userId:s,disabled:!1,enableXhr:!0,enableFetch:!0,enableClick:!0,enableError:!0,enableUnhandledRejection:!0,enableHashChange:!0,enableHistory:!0,enablePerformance:!0,enableScreenRecord:!0,enableWhiteScreen:!0,enableFingerprint:!1,anonymousId:s,visitorId:s,maxBreadcrumbs:30,useImageReport:!1,screenRecordEventTypes:[e.Error,e.Xhr,e.Fetch,e.Resource,e.UnhandledRejection],hasSkeleton:!1,rootCssSelectors:["html","body","#app","#root"],clickThrottleDelay:0,requestTimeoutMilliseconds:3e3,screenRecordDurationMs:3e3,repeatCodeError:!1,enableHttpPerformance:!1,ignoreErrors:[],excludeApis:[],cacheMaxLength:10,cacheWaitingTime:2e3,maxQueueLength:200,retryIntervalMilliseconds:6e4,offlineCacheKey:"lark_sentry_offline_cache",tracesSampleRate:1};export{c as DEFAULT_OPTIONS,o as MAX_BREADCRUMBS,a as MAX_WHITE_SCREEN_SAMPLE_COUNT,n as SDK_VERSION,s as UNKNOWN,t as WHITE_SCREEN_SAMPLE_INTERVAL};
|
|
1
|
+
import{EventType as e}from"../types/enums.js";import r from"../package.json.js";const{version:n}=r,o=30,a=10,t=1e3,s="unknown",c={dsn:"",projectId:s,userId:s,disabled:!1,enableXhr:!0,enableFetch:!0,enableClick:!0,enableError:!0,enableUnhandledRejection:!0,enableHashChange:!0,enableHistory:!0,enablePerformance:!0,enableScreenRecord:!0,enableWhiteScreen:!0,enableFingerprint:!1,anonymousId:s,visitorId:s,maxBreadcrumbs:30,useImageReport:!1,screenRecordEventTypes:[e.Error,e.Xhr,e.Fetch,e.Resource,e.UnhandledRejection],hasSkeleton:!1,rootCssSelectors:["html","body","#app","#root"],clickThrottleDelay:0,requestTimeoutMilliseconds:3e3,screenRecordDurationMs:3e3,repeatCodeError:!1,enableHttpPerformance:!1,ignoreErrors:[],excludeApis:[],cacheMaxLength:10,cacheWaitingTime:2e3,maxQueueLength:200,retryIntervalMilliseconds:6e4,offlineCacheKey:"lark_sentry_offline_cache",tracesSampleRate:1,debug:!1};export{c as DEFAULT_OPTIONS,o as MAX_BREADCRUMBS,a as MAX_WHITE_SCREEN_SAMPLE_COUNT,n as SDK_VERSION,s as UNKNOWN,t as WHITE_SCREEN_SAMPLE_INTERVAL};
|
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)
|
|
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)for(const r of n)try{r(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)
|
|
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)for(const t of n)try{t(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");require("../constants/index.cjs");var t=require("../utils/decorate-prop.cjs"),s=require("../utils/get-base-data.cjs"),r=require("../utils/is-excluded-api.cjs"),n=require("../utils/sentry.cjs"),i=require("../utils/server-timing.cjs"),a=require("./bus.cjs");function o(t,s){return t.toUpperCase()===e.HttpMethod.Post&&s===n.default.options.dsn||r.default(s)}exports.pubFetch=function(){return t.default(globalThis,"fetch",t=>async function(r,n){const
|
|
1
|
+
"use strict";var e=require("../types/enums.cjs");require("../constants/index.cjs");var t=require("../utils/decorate-prop.cjs"),s=require("../utils/get-base-data.cjs"),r=require("../utils/is-excluded-api.cjs"),n=require("../utils/sentry.cjs"),i=require("../utils/server-timing.cjs"),a=require("./bus.cjs");function o(t,s){return t.toUpperCase()===e.HttpMethod.Post&&s===n.default.options.dsn||r.default(s)}exports.pubFetch=function(){return t.default(globalThis,"fetch",t=>async function(r,n){const p=n?.method?.toUpperCase()??e.HttpMethod.Get,u={...s.default(),type:e.EventType.Fetch,method:p,requestData:{body:n?.body},name:"Fetch",api:r.toString(),elapsedTime:0,statusCode:e.HttpStatusCode.OK};return t.call(globalThis,r,n).then(t=>{const s=t.clone();return u.elapsedTime=Date.now()-u.timestamp,u.statusCode=s.status,u.serverTiming=i.getServerTimingFromHeaders(s.headers),s.text().then(t=>{o(p,r.toString())||(u.responseData=t,a.pub(e.EventType.Fetch,u))}).catch(()=>{o(p,r.toString())||a.pub(e.EventType.Fetch,u)}),t}).catch(t=>{throw o(p,r.toString())||(u.elapsedTime=Date.now()-u.timestamp,u.statusCode=0,u.message=t instanceof Error?t.message:"Network error",a.pub(e.EventType.Fetch,u)),t})})},exports.pubXhr=function(){const r=XMLHttpRequest.prototype,n=t.default(r,"open",t=>function(r,n,i,...a){return this.__sentry__={...s.default(),name:"XMLHttpRequest",type:e.EventType.Xhr,method:r.toUpperCase(),api:n,elapsedTime:0,statusCode:e.HttpStatusCode.OK},t.call(this,r,n,i,...a)}),p=t.default(r,"send",t=>function(s){if(!this.__sentry__)return t.call(this,s);const{method:r,api:n}=this.__sentry__;return this.addEventListener("loadend",()=>{o(r,n)||(this.__sentry__.statusCode=this.status,this.__sentry__.requestData={body:s},this.__sentry__.responseData={responseType:this.responseType,response:this.response},this.__sentry__.serverTiming=i.parseServerTiming(this.getResponseHeader("server-timing")),this.__sentry__.elapsedTime=Date.now()-this.__sentry__.timestamp,a.pub(e.EventType.Xhr,this.__sentry__))}),t.call(this,s)});return()=>{p(),n()}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EventType as t,HttpStatusCode as e,HttpMethod as s}from"../types/enums.js";import"../constants/index.js";import r from"../utils/decorate-prop.js";import
|
|
1
|
+
import{EventType as t,HttpStatusCode as e,HttpMethod as s}from"../types/enums.js";import"../constants/index.js";import r from"../utils/decorate-prop.js";import o from"../utils/get-base-data.js";import n from"../utils/is-excluded-api.js";import i from"../utils/sentry.js";import{parseServerTiming as a,getServerTimingFromHeaders as p}from"../utils/server-timing.js";import{pub as _}from"./bus.js";function m(){const s=XMLHttpRequest.prototype,n=r(s,"open",s=>function(r,n,i,...a){return this.__sentry__={...o(),name:"XMLHttpRequest",type:t.Xhr,method:r.toUpperCase(),api:n,elapsedTime:0,statusCode:e.OK},s.call(this,r,n,i,...a)}),i=r(s,"send",e=>function(s){if(!this.__sentry__)return e.call(this,s);const{method:r,api:o}=this.__sentry__;return this.addEventListener("loadend",()=>{u(r,o)||(this.__sentry__.statusCode=this.status,this.__sentry__.requestData={body:s},this.__sentry__.responseData={responseType:this.responseType,response:this.response},this.__sentry__.serverTiming=a(this.getResponseHeader("server-timing")),this.__sentry__.elapsedTime=Date.now()-this.__sentry__.timestamp,_(t.Xhr,this.__sentry__))}),e.call(this,s)});return()=>{i(),n()}}function h(){return r(globalThis,"fetch",r=>async function(n,i){const a=i?.method?.toUpperCase()??s.Get,m={...o(),type:t.Fetch,method:a,requestData:{body:i?.body},name:"Fetch",api:n.toString(),elapsedTime:0,statusCode:e.OK};return r.call(globalThis,n,i).then(e=>{const s=e.clone();return m.elapsedTime=Date.now()-m.timestamp,m.statusCode=s.status,m.serverTiming=p(s.headers),s.text().then(e=>{u(a,n.toString())||(m.responseData=e,_(t.Fetch,m))}).catch(()=>{u(a,n.toString())||_(t.Fetch,m)}),e}).catch(e=>{throw u(a,n.toString())||(m.elapsedTime=Date.now()-m.timestamp,m.statusCode=0,m.message=e instanceof Error?e.message:"Network error",_(t.Fetch,m)),e})})}function u(t,e){return t.toUpperCase()===s.Post&&e===i.options.dsn||n(e)}export{h as pubFetch,m as pubXhr};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../types/enums.cjs"),r=require("../utils/base64.cjs"),t=require("../constants/index.cjs"),s=require("../utils/event2breadcrumb.cjs"),o=require("../utils/get-base-data.cjs"),u=require("../utils/sentry.cjs"),i=require("../utils/is-ignored-error.cjs"),n=require("../reporter/index.cjs"),a=require("./breadcrumb.cjs");const c=new class{cacheError=[];timeoutID;push(e){this.cacheError.push(e),this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=setTimeout(()=>this.flush(),2e3)}flush(){if(0===this.cacheError.length)return;const e={};for(const r of this.cacheError){const t=`${r.type}-${r.name}-${r.message}`;e[t]=[...e[t]??[],r]}this.cacheError=[];for(const[,r]of Object.entries(e))this.reportGroup(r)}reportGroup(e){if(e.length<5)return void e.forEach(e=>n.default.send(e));const r=e[0];if(!r)return;const t={...r,batchError:!0,batchErrorLength:e.length,batchErrorLastHappenTime:e.at(-1)?.timestamp??r.timestamp};n.default.send(t)}};exports.handleCodeError=function(n){const{filename:h,colno:l,lineno:d,message:
|
|
1
|
+
"use strict";var e=require("../types/enums.cjs"),r=require("../utils/base64.cjs"),t=require("../constants/index.cjs"),s=require("../utils/event2breadcrumb.cjs"),o=require("../utils/get-base-data.cjs"),u=require("../utils/sentry.cjs"),i=require("../utils/is-ignored-error.cjs"),n=require("../reporter/index.cjs"),a=require("./breadcrumb.cjs");const c=new class{cacheError=[];timeoutID;push(e){this.cacheError.push(e),this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=setTimeout(()=>this.flush(),2e3)}flush(){if(0===this.cacheError.length)return;const e={};for(const r of this.cacheError){const t=`${r.type}-${r.name}-${r.message}`;e[t]=[...e[t]??[],r]}this.cacheError=[];for(const[,r]of Object.entries(e))this.reportGroup(r)}reportGroup(e){if(e.length<5)return void e.forEach(e=>n.default.send(e));const r=e[0];if(!r)return;const t={...r,batchError:!0,batchErrorLength:e.length,batchErrorLastHappenTime:e.at(-1)?.timestamp??r.timestamp};n.default.send(t)}};exports.handleCodeError=function(n){const{filename:h,colno:l,lineno:d,message:f}=n;if(i.default(f))return;const p={...o.default(),type:e.EventType.Error,name:h,message:f,status:e.Status.Error},m={...p,column:l,line:d};a.default.push({...p,userAction:s.default(e.EventType.Error)});const E=!h||h===t.UNKNOWN,b=r.base64v2(`${e.EventType.Error}-${f}-${h}-${d}-${l}`);(E||u.default.options.repeatCodeError||!u.default.codeErrors.has(b))&&(u.default.codeErrors.add(b),c.push(m))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Status as r,EventType as t}from"../types/enums.js";import{base64v2 as o}from"../utils/base64.js";import{UNKNOWN as e}from"../constants/index.js";import s from"../utils/event2breadcrumb.js";import i from"../utils/get-base-data.js";import n from"../utils/sentry.js";import m from"../utils/is-ignored-error.js";import c from"../reporter/index.js";import a from"./breadcrumb.js";const u=new class{cacheError=[];timeoutID;push(r){this.cacheError.push(r),this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=setTimeout(()=>this.flush(),2e3)}flush(){if(0===this.cacheError.length)return;const r={};for(const t of this.cacheError){const o=`${t.type}-${t.name}-${t.message}`;r[o]=[...r[o]??[],t]}this.cacheError=[];for(const[,t]of Object.entries(r))this.reportGroup(t)}reportGroup(r){if(r.length<5)return void r.forEach(r=>c.send(r));const t=r[0];if(!t)return;const o={...t,batchError:!0,batchErrorLength:r.length,batchErrorLastHappenTime:r.at(-1)?.timestamp??t.timestamp};c.send(o)}};function
|
|
1
|
+
import{Status as r,EventType as t}from"../types/enums.js";import{base64v2 as o}from"../utils/base64.js";import{UNKNOWN as e}from"../constants/index.js";import s from"../utils/event2breadcrumb.js";import i from"../utils/get-base-data.js";import n from"../utils/sentry.js";import m from"../utils/is-ignored-error.js";import c from"../reporter/index.js";import a from"./breadcrumb.js";const u=new class{cacheError=[];timeoutID;push(r){this.cacheError.push(r),this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=setTimeout(()=>this.flush(),2e3)}flush(){if(0===this.cacheError.length)return;const r={};for(const t of this.cacheError){const o=`${t.type}-${t.name}-${t.message}`;r[o]=[...r[o]??[],t]}this.cacheError=[];for(const[,t]of Object.entries(r))this.reportGroup(t)}reportGroup(r){if(r.length<5)return void r.forEach(r=>c.send(r));const t=r[0];if(!t)return;const o={...t,batchError:!0,batchErrorLength:r.length,batchErrorLastHappenTime:r.at(-1)?.timestamp??t.timestamp};c.send(o)}};function h(c){const{filename:h,colno:p,lineno:f,message:l}=c;if(m(l))return;const E={...i(),type:t.Error,name:h,message:l,status:r.Error},d={...E,column:p,line:f};a.push({...E,userAction:s(t.Error)});const b=!h||h===e,j=o(`${t.Error}-${l}-${h}-${f}-${p}`);(b||n.options.repeatCodeError||!n.codeErrors.has(j))&&(n.codeErrors.add(j),u.push(d))}export{h as handleCodeError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("zod"),n=require("../types/enums.cjs");const o=e.z.custom(e=>"function"==typeof e,"Expected a report data hook function"),t=e.z.custom(e=>"function"==typeof e,"Expected a breadcrumb hook function"),
|
|
1
|
+
"use strict";var e=require("zod"),n=require("../types/enums.cjs");const o=e.z.custom(e=>"function"==typeof e,"Expected a report data hook function"),t=e.z.custom(e=>"function"==typeof e,"Expected a breadcrumb hook function"),a=e.z.custom(e=>"function"==typeof e,"Expected an HTTP error hook function"),r=e.z.custom(e=>"function"==typeof e,"Expected a report batch hook function"),i=e.z.custom(e=>"function"==typeof e,"Expected an after-send hook function"),s=e.z.union([e.z.string(),e.z.instanceof(RegExp)]),c=e.z.object({dsn:e.z.string(),projectId:e.z.string(),disabled:e.z.boolean(),userId:e.z.string(),enableXhr:e.z.boolean(),enableFetch:e.z.boolean(),enableClick:e.z.boolean(),enableError:e.z.boolean(),enableUnhandledRejection:e.z.boolean(),enableHashChange:e.z.boolean(),enableHistory:e.z.boolean(),enablePerformance:e.z.boolean(),enableScreenRecord:e.z.boolean(),enableWhiteScreen:e.z.boolean(),enableFingerprint:e.z.boolean(),anonymousId:e.z.string(),visitorId:e.z.string(),useImageReport:e.z.boolean(),screenRecordDurationMs:e.z.number().nonnegative(),screenRecordEventTypes:e.z.array(e.z.nativeEnum(n.EventType)),hasSkeleton:e.z.boolean(),rootCssSelectors:e.z.array(e.z.string()),clickThrottleDelay:e.z.number().nonnegative(),requestTimeoutMilliseconds:e.z.number().nonnegative(),maxBreadcrumbs:e.z.number().int().positive(),repeatCodeError:e.z.boolean(),enableHttpPerformance:e.z.boolean(),ignoreErrors:e.z.array(s),excludeApis:e.z.array(s),onBeforePushBreadcrumb:t.optional(),cacheMaxLength:e.z.number().int().positive(),cacheWaitingTime:e.z.number().nonnegative(),maxQueueLength:e.z.number().int().positive(),retryIntervalMilliseconds:e.z.number().nonnegative(),onBeforeReportData:o.optional(),beforePushEventList:r.optional(),afterSendData:i.optional(),offlineCacheKey:e.z.string(),tracesSampleRate:e.z.number().min(0).max(1),handleHttpError:a.optional(),debug:e.z.boolean()});c.partial().extend({dsn:e.z.string()}),exports.optionsSchema=c;
|
|
@@ -43,6 +43,7 @@ declare const initOptionsSchema: z.ZodObject<{
|
|
|
43
43
|
offlineCacheKey: z.ZodOptional<z.ZodString>;
|
|
44
44
|
tracesSampleRate: z.ZodOptional<z.ZodNumber>;
|
|
45
45
|
handleHttpError: z.ZodOptional<z.ZodOptional<z.ZodCustom<(<T>(data: T) => boolean) | undefined, (<T>(data: T) => boolean) | undefined>>>;
|
|
46
|
+
debug: z.ZodOptional<z.ZodBoolean>;
|
|
46
47
|
dsn: z.ZodString;
|
|
47
48
|
}, z.core.$strip>;
|
|
48
49
|
type InitOptions = z.input<typeof initOptionsSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";import{EventType as n}from"../types/enums.js";const o=e.custom(e=>"function"==typeof e,"Expected a report data hook function"),t=e.custom(e=>"function"==typeof e,"Expected a breadcrumb hook function"),
|
|
1
|
+
import{z as e}from"zod";import{EventType as n}from"../types/enums.js";const o=e.custom(e=>"function"==typeof e,"Expected a report data hook function"),t=e.custom(e=>"function"==typeof e,"Expected a breadcrumb hook function"),a=e.custom(e=>"function"==typeof e,"Expected an HTTP error hook function"),r=e.custom(e=>"function"==typeof e,"Expected a report batch hook function"),i=e.custom(e=>"function"==typeof e,"Expected an after-send hook function"),c=e.union([e.string(),e.instanceof(RegExp)]),l=e.object({dsn:e.string(),projectId:e.string(),disabled:e.boolean(),userId:e.string(),enableXhr:e.boolean(),enableFetch:e.boolean(),enableClick:e.boolean(),enableError:e.boolean(),enableUnhandledRejection:e.boolean(),enableHashChange:e.boolean(),enableHistory:e.boolean(),enablePerformance:e.boolean(),enableScreenRecord:e.boolean(),enableWhiteScreen:e.boolean(),enableFingerprint:e.boolean(),anonymousId:e.string(),visitorId:e.string(),useImageReport:e.boolean(),screenRecordDurationMs:e.number().nonnegative(),screenRecordEventTypes:e.array(e.nativeEnum(n)),hasSkeleton:e.boolean(),rootCssSelectors:e.array(e.string()),clickThrottleDelay:e.number().nonnegative(),requestTimeoutMilliseconds:e.number().nonnegative(),maxBreadcrumbs:e.number().int().positive(),repeatCodeError:e.boolean(),enableHttpPerformance:e.boolean(),ignoreErrors:e.array(c),excludeApis:e.array(c),onBeforePushBreadcrumb:t.optional(),cacheMaxLength:e.number().int().positive(),cacheWaitingTime:e.number().nonnegative(),maxQueueLength:e.number().int().positive(),retryIntervalMilliseconds:e.number().nonnegative(),onBeforeReportData:o.optional(),beforePushEventList:r.optional(),afterSendData:i.optional(),offlineCacheKey:e.string(),tracesSampleRate:e.number().min(0).max(1),handleHttpError:a.optional(),debug:e.boolean()});l.partial().extend({dsn:e.string()});export{l as optionsSchema};
|
|
@@ -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&&
|
|
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&&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&&
|
|
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&&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.5",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.5",e={version:a};export{e as default,a as version};
|
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"),
|
|
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"),n=require("./flush-scheduler.cjs"),r=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(){r.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 void this.scheduleNextFlush();const n=performance.now(),r=this.sendBatch(i);if(!(a.isPromise(r)?await r:r))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()-n))}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=n.scheduleFlush(this.timeoutID,100,()=>this.flush()))}async flushOfflineCache(){this.loadOfflineCache(),await this.flush()}async send(e,i=!1){const r=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(-r.maxQueueLength),void this.saveOfflineCache();this.timeoutID&&clearTimeout(this.timeoutID),i||this.events.length>=r.cacheMaxLength?await this.flush():this.timeoutID=n.scheduleFlush(this.timeoutID,r.cacheWaitingTime,()=>this.flush())}}}let d=null;var v=new Proxy({},{get(e,t,s){const i=(d||(d=f.instance),d),n=Reflect.get(i,t,i);return"function"==typeof n?n.bind(i):n}});exports.DataReporter=f,exports.default=v;
|
package/dist/reporter/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CallbackQueue as
|
|
1
|
+
import{CallbackQueue as e}from"../utils/data-structures.js";import"../types/enums.js";import t 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 u}from"./send-preflight.js";import{scheduleServerRecovery as c}from"./server-recovery.js";import{isObjectOverSizeLimit as f,sendBeacon as m,reportByImage as p,reportByFetch as v}from"./transports.js";class d{cbQueue=new e;id=crypto.randomUUID();events=[];timeoutID;retryTimer;isOnline=!0;isFlushing=!1;static#e;constructor(){h({setOnline:e=>{this.isOnline=e},loadOfflineCache:()=>this.loadOfflineCache(),flush:()=>this.flush()})}static get instance(){return this.#e||(this.#e=new d),this.#e}loadOfflineCache(){this.events.unshift(...r()),this.events=this.events.slice(-t.options.maxQueueLength)}saveOfflineCache(){o(this.events)}handleServerError(){this.retryTimer=c(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.options.maxQueueLength),void this.saveOfflineCache();const e=this.takeBatch(),i=a(e)?await e:e;if(0===i.length)return void this.scheduleNextFlush();const n=performance.now(),h=this.sendBatch(i);if(!(a(h)?await h:h))return this.events=[...i,...this.events].slice(-t.options.maxQueueLength),void this.saveOfflineCache();t.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 e=t.options.cacheMaxLength,s=this.events.slice(0,e);return this.events=this.events.slice(e),i(s)}sendBatch(e){return!(f(e,60)||!m(e))||(t.options.useImageReport&&!f(e,2)?(p(e,this.cbQueue),!0):v(e,()=>this.handleServerError()))}scheduleNextFlush(){0!==this.events.length&&(this.timeoutID=n(this.timeoutID,100,()=>this.flush()))}async flushOfflineCache(){this.loadOfflineCache(),await this.flush()}async send(e,i=!1){const h=t.options;if(!u(e))return;const r=l(this.id,e),o=a(r)?await r:r;if(o){if(s.info("@lark.js/sentry",`Type: ${e.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())}}}let g=null;var y=new Proxy({},{get(e,t,s){const i=(g||(g=d.instance),g),n=Reflect.get(i,t,i);return"function"==typeof n?n.bind(i):n}});export{d as DataReporter,y as default};
|
|
@@ -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.
|
|
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 o.success?(localStorage.removeItem(e.default.options.offlineCacheKey),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.
|
|
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 s.success?(localStorage.removeItem(e.options.offlineCacheKey),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";exports.isPromise=function(
|
|
1
|
+
"use strict";exports.isPromise=function(t){return t instanceof Promise||null!==t&&"object"==typeof t&&"then"in t&&"function"==typeof t.then};
|
package/dist/reporter/promise.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function n(n){return n instanceof Promise}export{n as isPromise};
|
|
1
|
+
function n(n){return n instanceof Promise||null!==n&&"object"==typeof n&&"then"in n&&"function"==typeof n.then}export{n as isPromise};
|
|
@@ -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){
|
|
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){const n=JSON.stringify(e);return(new TextEncoder).encode(n).byteLength>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
|
|
1
|
+
import"../constants/index.js";import"../types/enums.js";import n from"../utils/sentry.js";import{sentryLogger as t}from"../utils/logger.js";function e(n,t){const e=JSON.stringify(n);return(new TextEncoder).encode(e).byteLength>1024*t}function o(t){return!("undefined"==typeof navigator||!navigator.sendBeacon)&&navigator.sendBeacon(n.options.dsn,JSON.stringify(t))}async function r(e,o){try{const t=await fetch(n.options.dsn,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"},keepalive:!0});return t.ok||o(),t.ok}catch(n){return t.error("@lark.js/sentry","Fetch report failed",n),o(),!1}}function s(t,e){const{dsn:o}=n.options;e.push(()=>{const n=new Image,e=o.includes("?")?"&":"?";n.src=`${o}${e}data=${encodeURIComponent(JSON.stringify(t))}`})}export{e as isObjectOverSizeLimit,r as reportByFetch,s as reportByImage,o as sendBeacon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("../constants/index.cjs");exports.BoundedSet=class{map=new Map;capacity;constructor(t){this.capacity=t}has(t){return this.map.has(t)}add(t){if(this.map.has(t)&&this.map.delete(t),this.map.set(t,!0),this.map.size>this.capacity){const t=this.map.keys().next().value;void 0!==t&&this.map.delete(t)}}clear(){this.map.clear()}},exports.CallbackQueue=class{cbList=[];isFlushing=!1;push(t,s,...i){"function"==typeof t&&this.callByRequestIdleCallback(t,s,...i)}callByRequestIdleCallback(t,s,...i){this.cbList.push(t.bind(s,...i)),this.isFlushing||(this.isFlushing=!0,"function"==typeof requestIdleCallback?requestIdleCallback(()=>{this.flushFuncList()}):Promise.resolve().then(()=>{this.flushFuncList()}))}clear(){this.cbList=[],this.isFlushing=!1}flushFuncList(){const t=this.cbList;this.cbList=[],this.isFlushing=!1,t.forEach(t=>{t()})}},exports.MinHeap=class{capacity=t.MAX_BREADCRUMBS;heap=[];get size(){return this.heap.length}constructor(s=t.MAX_BREADCRUMBS,i=[]){if(this.capacity=s,this.heap=i.slice(0,s),this.buildHeap(),i.length>s){const t=i.slice(s);for(const s of t)s.timestamp>=this.heap[0].timestamp&&(this.heap[0]=s,this.heapifyDown(0))}}push(t){return this.size<this.capacity?(this.heap.push(t),this.heapifyUp(this.size-1),!0):t.timestamp>=this.heap[0].timestamp&&(this.heap[0]=t,this.heapifyDown(0),!0)}peek(){return this.heap[0]}heapifyUp(t){for(;t>0;){const s=Math.floor((t-1)/2);if(this.heap[s].timestamp<=this.heap[t].timestamp)break;[this.heap[t],this.heap[s]]=[this.heap[s],this.heap[t]],t=s}}heapifyDown(t){for(;;){let s=t;const i=2*t+1,e=2*t+2;if(i<this.size&&this.heap[i].timestamp<this.heap[s].timestamp&&(s=i),e<this.size&&this.heap[e].timestamp<this.heap[s].timestamp&&(s=e),s===t)break;[this.heap[t],this.heap[s]]=[this.heap[s],this.heap[t]],t=s}}buildHeap(){const t=this.size-1;for(let s=Math.floor((t-1)/2);s>=0;s--)this.heapifyDown(s)}dump(){return[...this.heap].sort((t,s)=>t.timestamp-s.timestamp)}clear(){this.heap=[]}pop(){if(0===this.size)return;const t=this.heap[0];return this.heap[0]=this.heap[this.size-1],this.heap.pop(),this.size>0&&this.heapifyDown(0),t}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MAX_BREADCRUMBS as
|
|
1
|
+
import{MAX_BREADCRUMBS as t}from"../constants/index.js";class s{capacity=t;heap=[];get size(){return this.heap.length}constructor(s=t,i=[]){if(this.capacity=s,this.heap=i.slice(0,s),this.buildHeap(),i.length>s){const t=i.slice(s);for(const s of t)s.timestamp>=this.heap[0].timestamp&&(this.heap[0]=s,this.heapifyDown(0))}}push(t){return this.size<this.capacity?(this.heap.push(t),this.heapifyUp(this.size-1),!0):t.timestamp>=this.heap[0].timestamp&&(this.heap[0]=t,this.heapifyDown(0),!0)}peek(){return this.heap[0]}heapifyUp(t){for(;t>0;){const s=Math.floor((t-1)/2);if(this.heap[s].timestamp<=this.heap[t].timestamp)break;[this.heap[t],this.heap[s]]=[this.heap[s],this.heap[t]],t=s}}heapifyDown(t){for(;;){let s=t;const i=2*t+1,h=2*t+2;if(i<this.size&&this.heap[i].timestamp<this.heap[s].timestamp&&(s=i),h<this.size&&this.heap[h].timestamp<this.heap[s].timestamp&&(s=h),s===t)break;[this.heap[t],this.heap[s]]=[this.heap[s],this.heap[t]],t=s}}buildHeap(){const t=this.size-1;for(let s=Math.floor((t-1)/2);s>=0;s--)this.heapifyDown(s)}dump(){return[...this.heap].sort((t,s)=>t.timestamp-s.timestamp)}clear(){this.heap=[]}pop(){if(0===this.size)return;const t=this.heap[0];return this.heap[0]=this.heap[this.size-1],this.heap.pop(),this.size>0&&this.heapifyDown(0),t}}class i{map=new Map;capacity;constructor(t){this.capacity=t}has(t){return this.map.has(t)}add(t){if(this.map.has(t)&&this.map.delete(t),this.map.set(t,!0),this.map.size>this.capacity){const t=this.map.keys().next().value;void 0!==t&&this.map.delete(t)}}clear(){this.map.clear()}}class h{cbList=[];isFlushing=!1;push(t,s,...i){"function"==typeof t&&this.callByRequestIdleCallback(t,s,...i)}callByRequestIdleCallback(t,s,...i){this.cbList.push(t.bind(s,...i)),this.isFlushing||(this.isFlushing=!0,"function"==typeof requestIdleCallback?requestIdleCallback(()=>{this.flushFuncList()}):Promise.resolve().then(()=>{this.flushFuncList()}))}clear(){this.cbList=[],this.isFlushing=!1}flushFuncList(){const t=this.cbList;this.cbList=[],this.isFlushing=!1,t.forEach(t=>{t()})}}export{i as BoundedSet,h as CallbackQueue,s as MinHeap};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/enums.cjs");exports.default=function(r){switch(r){case e.EventType.Xhr:case e.EventType.Fetch:return e.BreadcrumbType.Http;case e.EventType.Click:return e.BreadcrumbType.Click;case e.EventType.HashChange:case e.EventType.History:return e.BreadcrumbType.Route;case e.EventType.Resource:return e.BreadcrumbType.Resource;case e.EventType.UnhandledRejection:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/enums.cjs");exports.default=function(r){switch(r){case e.EventType.Xhr:case e.EventType.Fetch:return e.BreadcrumbType.Http;case e.EventType.Click:return e.BreadcrumbType.Click;case e.EventType.HashChange:case e.EventType.History:return e.BreadcrumbType.Route;case e.EventType.Resource:return e.BreadcrumbType.Resource;case e.EventType.UnhandledRejection:case e.EventType.Error:case e.EventType.Vue:case e.EventType.React:return e.BreadcrumbType.CodeError;case e.EventType.Performance:case e.EventType.ScreenRecord:case e.EventType.WhiteScreen:case e.EventType.Custom:default:return e.BreadcrumbType.Custom}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BreadcrumbType as e,EventType as r}from"../types/enums.js";function c(c){switch(c){case r.Xhr:case r.Fetch:return e.Http;case r.Click:return e.Click;case r.HashChange:case r.History:return e.Route;case r.Resource:return e.Resource;case r.UnhandledRejection:
|
|
1
|
+
import{BreadcrumbType as e,EventType as r}from"../types/enums.js";function c(c){switch(c){case r.Xhr:case r.Fetch:return e.Http;case r.Click:return e.Click;case r.HashChange:case r.History:return e.Route;case r.Resource:return e.Resource;case r.UnhandledRejection:case r.Error:case r.Vue:case r.React:return e.CodeError;case r.Performance:case r.ScreenRecord:case r.WhiteScreen:case r.Custom:default:return e.Custom}}export{c as default};
|
package/dist/utils/logger.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o={info:"#74d4ff",success:"#
|
|
1
|
+
"use strict";const o={info:"#74d4ff",success:"#bbf450",warn:"#ffb869",error:"#ffa2a2",text:"#62748e",timestamp:"#dab2ff"},e=e=>`color: ${o.text}; background: ${e}; padding: 1px 0; border-radius: 4px; font-family: Iosevka, Maple Mono, Menlo, Cascadia Code;`,s=o=>`color: ${o}; font-family: Iosevka, Maple Mono, Menlo, Cascadia Code;`,l={info:{title:e(o.info),subtitle:s(o.info)},success:{title:e(o.success),subtitle:s(o.success)},warn:{title:e(o.warn),subtitle:s(o.warn)},error:{title:e(o.error),subtitle:s(o.error)},timestamp:{label:`color: ${o.timestamp};`,value:s(o.success)}},r={get isEnabled(){return globalThis.__sentry__?.options.debug??!1},info(o,e,s,r){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.info.title,l.info.subtitle),void 0!==s&&(Array.isArray(s)?r?console.table(s,r):console.table(s):"object"==typeof s&&null!==s?(console.group("Details"),console.log(s),console.groupEnd()):console.log(s)),console.groupEnd())},success(o,e,s,r){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.success.title,l.success.subtitle),void 0!==r&&console.log("%cTime cost%c "+r+"ms",l.timestamp.label,l.timestamp.value),void 0!==s&&(Array.isArray(s)?console.table(s):"object"==typeof s&&null!==s?(console.group("Response Data"),console.log(s),console.groupEnd()):console.log(s)),console.groupEnd())},warn(o,e,s){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.warn.title,l.warn.subtitle),void 0!==s&&(Array.isArray(s)?console.table(s):"object"==typeof s&&null!==s?(console.group("Warning Details"),console.log(s),console.groupEnd()):console.log(s)),console.groupEnd())},error(o,e,s){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.error.title,l.error.subtitle),void 0!==s&&(console.group("Error Details"),console.error(s),console.groupEnd()),console.groupEnd())}};exports.larkColors=o,exports.sentryLogger=r;
|
package/dist/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o={info:"#74d4ff",success:"#
|
|
1
|
+
const o={info:"#74d4ff",success:"#bbf450",warn:"#ffb869",error:"#ffa2a2",text:"#62748e",timestamp:"#dab2ff"},e=e=>`color: ${o.text}; background: ${e}; padding: 1px 0; border-radius: 4px; font-family: Iosevka, Maple Mono, Menlo, Cascadia Code;`,s=o=>`color: ${o}; font-family: Iosevka, Maple Mono, Menlo, Cascadia Code;`,l={info:{title:e(o.info),subtitle:s(o.info)},success:{title:e(o.success),subtitle:s(o.success)},warn:{title:e(o.warn),subtitle:s(o.warn)},error:{title:e(o.error),subtitle:s(o.error)},timestamp:{label:`color: ${o.timestamp};`,value:s(o.success)}},r={get isEnabled(){return globalThis.__sentry__?.options.debug??!1},info(o,e,s,r){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.info.title,l.info.subtitle),void 0!==s&&(Array.isArray(s)?r?console.table(s,r):console.table(s):"object"==typeof s&&null!==s?(console.group("Details"),console.log(s),console.groupEnd()):console.log(s)),console.groupEnd())},success(o,e,s,r){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.success.title,l.success.subtitle),void 0!==r&&console.log("%cTime cost%c "+r+"ms",l.timestamp.label,l.timestamp.value),void 0!==s&&(Array.isArray(s)?console.table(s):"object"==typeof s&&null!==s?(console.group("Response Data"),console.log(s),console.groupEnd()):console.log(s)),console.groupEnd())},warn(o,e,s){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.warn.title,l.warn.subtitle),void 0!==s&&(Array.isArray(s)?console.table(s):"object"==typeof s&&null!==s?(console.group("Warning Details"),console.log(s),console.groupEnd()):console.log(s)),console.groupEnd())},error(o,e,s){this.isEnabled&&(console.groupCollapsed(`%c ${o} %c ${e} `,l.error.title,l.error.subtitle),void 0!==s&&(console.group("Error Details"),console.error(s),console.groupEnd()),console.groupEnd())}};export{o as larkColors,r as sentryLogger};
|
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");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/index.cjs"),t=require("./data-structures.cjs"),n=require("ua-parser-js");const r=(()=>{const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e})();function s(){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,","");return function(e){let t=4294967295;for(let n=0;n<e.length;n++)t=r[255&(t^e.charCodeAt(n))]^t>>>8;return(4294967295^t)>>>0}(atob(n)).toString(16)}}catch{return o()}return o()}function o(){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 t.BoundedSet(1e3);whiteScreenTimer=null;options=e.DEFAULT_OPTIONS;deviceInfo;shouldScreenRecord=!1;constructor(){const t=(new n.UAParser).getResult();this.deviceInfo={browserName:t.browser.name??e.UNKNOWN,browserVersion:t.browser.version??e.UNKNOWN,osName:t.os.name??e.UNKNOWN,osVersion:t.os.version??e.UNKNOWN,userAgent:t.ua,deviceModel:t.device.model??e.UNKNOWN,deviceType:t.device.type??e.UNKNOWN,fingerprint:s(),language:"navigator"in globalThis&&globalThis.navigator.language||e.UNKNOWN,screenResolution:"screen"in globalThis?`${globalThis.screen.width}x${globalThis.screen.height}`:e.UNKNOWN}}setOptions(e){i.#e.options={...this.options,...e}}}var a=i.instance;exports.default=a;
|
package/dist/utils/sentry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_OPTIONS as e,UNKNOWN as t}from"../constants/index.js";import{
|
|
1
|
+
import{DEFAULT_OPTIONS as e,UNKNOWN as t}from"../constants/index.js";import{BoundedSet as n}from"./data-structures.js";import{UAParser as r}from"ua-parser-js";const o=(()=>{const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e})();function s(){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,","");return function(e){let t=4294967295;for(let n=0;n<e.length;n++)t=o[255&(t^e.charCodeAt(n))]^t>>>8;return(4294967295^t)>>>0}(atob(n)).toString(16)}}catch{return i()}return i()}function i(){return globalThis.crypto&&"function"==typeof globalThis.crypto.randomUUID?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}class a{static#e;static get instance(){return this.#e||(this.#e=new a,globalThis.__sentry__=this.#e),this.#e}codeErrors=new n(1e3);whiteScreenTimer=null;options=e;deviceInfo;shouldScreenRecord=!1;constructor(){const e=(new r).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:s(),language:"navigator"in globalThis&&globalThis.navigator.language||t,screenResolution:"screen"in globalThis?`${globalThis.screen.width}x${globalThis.screen.height}`:t}}setOptions(e){a.#e.options={...this.options,...e}}}var l=a.instance;export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../types/enums.cjs");exports.default=function(s){const{statusCode:r}=s;let t,o;return r>=100&&r<200?(t="Informational response",o=e.Status.OK):r>=200&&r<300?(t="Successful responses",o=e.Status.OK):r>=300&&r<400?(t="Redirection messages",o=e.Status.OK):r>=400&&r<500?(t="Client error responses",o=e.Status.Error):r>=500&&r<600?(t="Server error responses",o=e.Status.Error):(t="Invalid status code",o=e.Status.Error),{...s,message:t,status:o}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Status as s}from"../types/enums.js";function e(e){const{statusCode:r}=e;return r>=100&&r<200?(
|
|
1
|
+
import{Status as s}from"../types/enums.js";function e(e){const{statusCode:r}=e;let o,t;return r>=100&&r<200?(o="Informational response",t=s.OK):r>=200&&r<300?(o="Successful responses",t=s.OK):r>=300&&r<400?(o="Redirection messages",t=s.OK):r>=400&&r<500?(o="Client error responses",t=s.Error):r>=500&&r<600?(o="Server error responses",t=s.Error):(o="Invalid status code",t=s.Error),{...e,message:o,status:t}}export{e 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"),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){
|
|
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){return i.z.json().parse(e)}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.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 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
|
|
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 l(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 a(e){return c.json().parse(e)}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=l(e,t)}),n.on("end",()=>{if(e)try{const n=a(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=l(e,t)}),n.on("end",()=>{if(e)try{const n=a(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 l=(new Date).toISOString().replace(/[-:.]/g,"").slice(0,14),a=t(c,`sentry_${l}.log`),d=o(a,{flags:"a"});return i.info("@lark.js/sentry",`Sentry mock plugin initialized, logs will be written to ${a}`),{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),l=t(i,`sentry_${c}.log`),a=o(l,{flags:"a"});return{name:"vite-plugin-sentry",configureServer:d(e||r.options.dsn||"/sentry",a),closeBundle(){a&&a.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.5",
|
|
4
4
|
"description": "sentry sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"@fingerprintjs/fingerprintjs": "^5.2.0",
|
|
55
55
|
"@rrweb/record": "2.0.0-alpha.20",
|
|
56
56
|
"pako": "^2.1.0",
|
|
57
|
-
"ua-parser-js": "^2.0.
|
|
58
|
-
"web-vitals": "^5.
|
|
57
|
+
"ua-parser-js": "^2.0.10",
|
|
58
|
+
"web-vitals": "^5.3.0",
|
|
59
59
|
"zod": "^4.4.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@rollup/plugin-commonjs": "^29.0.
|
|
62
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
63
63
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
64
64
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
65
65
|
"@rrweb/record": "2.0.0-alpha.20",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"@vitest/coverage-v8": "^1.6.1",
|
|
71
71
|
"jsdom": "^24.1.3",
|
|
72
72
|
"react": "^19.2.6",
|
|
73
|
-
"rollup": "^4.
|
|
73
|
+
"rollup": "^4.61.0",
|
|
74
74
|
"typescript": "^6.0.3",
|
|
75
|
-
"vite": "^8.0.
|
|
75
|
+
"vite": "^8.0.16",
|
|
76
76
|
"vite7": "npm:vite@7.3.3",
|
|
77
77
|
"vitest": "^1.6.1",
|
|
78
|
-
"vue": "^3.5.
|
|
78
|
+
"vue": "^3.5.35"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"react": "^19.0.0",
|