@lensmcp/vite-plugin 1.22.1 → 1.22.2
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/lib/event-mappers.js +2 -2
- package/package.json +6 -6
package/lib/event-mappers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`).slice(0,2);for(const o of n){const a=o.match(/at\s+(\S+)/);if(a&&a[1])return a[1]}return"unknown"}
|
|
1
|
+
"use strict";var N=Object.defineProperty;var s=(e,n)=>N(e,"name",{value:n,configurable:!0});var q=Object.defineProperty,u=s((e,n)=>q(e,"name",{value:n,configurable:!0}),"c"),z=Object.defineProperty,v=u((e,n)=>z(e,"name",{value:n,configurable:!0}),"c"),B=Object.defineProperty,d=v((e,n)=>B(e,"name",{value:n,configurable:!0}),"c"),D=Object.defineProperty,f=d((e,n)=>D(e,"name",{value:n,configurable:!0}),"c"),G=Object.defineProperty,m=f((e,n)=>G(e,"name",{value:n,configurable:!0}),"c"),H=Object.defineProperty,p=m((e,n)=>H(e,"name",{value:n,configurable:!0}),"c"),K=Object.defineProperty,g=p((e,n)=>K(e,"name",{value:n,configurable:!0}),"l"),M=Object.defineProperty,b=g((e,n)=>M(e,"name",{value:n,configurable:!0}),"l"),Q=Object.defineProperty,y=b((e,n)=>Q(e,"name",{value:n,configurable:!0}),"c"),V=Object.defineProperty,j=y((e,n)=>V(e,"name",{value:n,configurable:!0}),"c"),W=Object.defineProperty,T=j((e,n)=>W(e,"name",{value:n,configurable:!0}),"c"),X=Object.defineProperty,E=T((e,n)=>X(e,"name",{value:n,configurable:!0}),"u"),Y=Object.defineProperty,O=E((e,n)=>Y(e,"name",{value:n,configurable:!0}),"u"),Z=Object.defineProperty,P=O((e,n)=>Z(e,"name",{value:n,configurable:!0}),"u"),_=Object.defineProperty,I=P((e,n)=>_(e,"name",{value:n,configurable:!0}),"c"),ee=Object.defineProperty,w=I((e,n)=>ee(e,"name",{value:n,configurable:!0}),"c"),ne=Object.defineProperty,k=w((e,n)=>ne(e,"name",{value:n,configurable:!0}),"c"),te=Object.defineProperty,$=k((e,n)=>te(e,"name",{value:n,configurable:!0}),"u"),re=Object.defineProperty,h=$((e,n)=>re(e,"name",{value:n,configurable:!0}),"u"),ie=Object.defineProperty,x=h((e,n)=>ie(e,"name",{value:n,configurable:!0}),"u"),oe=Object.defineProperty,S=x((e,n)=>oe(e,"name",{value:n,configurable:!0}),"u"),ae=Object.defineProperty,U=S((e,n)=>ae(e,"name",{value:n,configurable:!0}),"o"),le=Object.defineProperty,R=U((e,n)=>le(e,"name",{value:n,configurable:!0}),"o"),ce=Object.defineProperty,A=R((e,n)=>ce(e,"name",{value:n,configurable:!0}),"o"),se=Object.defineProperty,C=A((e,n)=>se(e,"name",{value:n,configurable:!0}),"o"),ue=Object.defineProperty,F=C((e,n)=>ue(e,"name",{value:n,configurable:!0}),"o"),ve=Object.defineProperty,J=F((e,n)=>ve(e,"name",{value:n,configurable:!0}),"o");import{fingerprint as l,ulid as c}from"@lensmcp/core";const de="pending";export function envelopeToEvent(e,n=de){const o=e.tabId?{tabId:e.tabId}:{};switch(e.kind){case"error":return{id:c(),sessionId:n,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"error",context:{sessionId:n,...o},fingerprint:l({kind:"runtime",identity:`error:${t(e.stack)}`,file:e.source,detail:e.message}),title:e.message,message:e.stack??e.message,location:e.source?{file:e.source,line:e.lineno,column:e.colno}:void 0,raw:e};case"unhandledrejection":return{id:c(),sessionId:n,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"error",context:{sessionId:n,...o},fingerprint:l({kind:"runtime",identity:`unhandledrejection:${e.reason.slice(0,80)}`}),title:"Unhandled promise rejection",message:e.reason,raw:e};case"console":{const a=e.level==="error"?"error":e.level==="warn"?"warning":"info",L=e.args.map(i).join(" ");return{id:c(),sessionId:n,timestamp:e.at,source:"client-runtime",category:"runtime",severity:a,context:{sessionId:n,...o},fingerprint:l({kind:"runtime",identity:`console:${e.level}:${L.slice(0,80)}`}),title:`console.${e.level}`,message:L,raw:e}}case"fetch":{const a=e.error!==void 0||e.status!==void 0&&e.status>=400;return{id:c(),sessionId:n,timestamp:e.at,source:"client-runtime",category:"network",severity:a?"error":"info",context:{sessionId:n,...o},fingerprint:l({kind:"network",identity:`${e.method}:${r(e.url)}:${e.status??"err"}`}),title:`${e.method} ${e.url}${e.status!==void 0?` \u2192 ${e.status}`:""}`,message:e.error,relatedUrls:[e.url],raw:e}}case"route":return{id:c(),sessionId:n,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"info",context:{sessionId:n,url:e.url,...o},fingerprint:l({kind:"runtime",identity:`route:${e.url}`}),title:`Route \u2192 ${e.url}`,raw:e};case"ready":return{id:c(),sessionId:n,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"info",context:{sessionId:n,url:e.url,...o},fingerprint:l({kind:"runtime",identity:"client-ready"}),title:"Client runtime ready",message:e.userAgent,raw:e};case"publish":return{id:c(),sessionId:n,timestamp:e.at,source:e.source,category:e.category,severity:e.severity??"info",context:{sessionId:n,...o,...e.context??{}},fingerprint:e.fingerprint??l({kind:"publish",identity:e.title}),title:e.title,message:e.message,raw:e.raw}}}s(envelopeToEvent,"envelopeToEvent"),u(envelopeToEvent,"envelopeToEvent"),v(envelopeToEvent,"envelopeToEvent"),d(envelopeToEvent,"envelopeToEvent"),f(envelopeToEvent,"envelopeToEvent"),m(envelopeToEvent,"envelopeToEvent"),p(envelopeToEvent,"envelopeToEvent"),g(envelopeToEvent,"envelopeToEvent"),b(envelopeToEvent,"envelopeToEvent"),y(envelopeToEvent,"envelopeToEvent"),j(envelopeToEvent,"envelopeToEvent"),T(envelopeToEvent,"envelopeToEvent"),E(envelopeToEvent,"envelopeToEvent"),O(envelopeToEvent,"envelopeToEvent"),P(envelopeToEvent,"envelopeToEvent"),I(envelopeToEvent,"envelopeToEvent"),w(envelopeToEvent,"envelopeToEvent"),k(envelopeToEvent,"envelopeToEvent"),$(envelopeToEvent,"envelopeToEvent"),h(envelopeToEvent,"envelopeToEvent"),x(envelopeToEvent,"envelopeToEvent"),S(envelopeToEvent,"envelopeToEvent"),U(envelopeToEvent,"envelopeToEvent"),R(envelopeToEvent,"envelopeToEvent"),A(envelopeToEvent,"envelopeToEvent"),C(envelopeToEvent,"envelopeToEvent"),F(envelopeToEvent,"envelopeToEvent"),J(envelopeToEvent,"envelopeToEvent");function t(e){if(!e)return"unknown";const n=e.split(`
|
|
2
|
+
`).slice(0,2);for(const o of n){const a=o.match(/at\s+(\S+)/);if(a&&a[1])return a[1]}return"unknown"}s(t,"t"),u(t,"t"),v(t,"t"),d(t,"t"),f(t,"n"),m(t,"t"),p(t,"n"),g(t,"t"),b(t,"n"),y(t,"t"),j(t,"n"),T(t,"t"),E(t,"r"),O(t,"t"),P(t,"r"),I(t,"t"),w(t,"n"),k(t,"n"),$(t,"r"),h(t,"n"),x(t,"o"),S(t,"a"),U(t,"l"),R(t,"l"),A(t,"c"),C(t,"c"),F(t,"s"),J(t,"normaliseStackTopFrame");function r(e){try{return`${new URL(e,"http://x").pathname}`}catch{return e}}s(r,"r"),u(r,"r"),v(r,"r"),d(r,"r"),f(r,"r"),m(r,"r"),p(r,"r"),g(r,"r"),b(r,"r"),y(r,"r"),j(r,"r"),T(r,"r"),E(r,"n"),O(r,"r"),P(r,"n"),I(r,"r"),w(r,"r"),k(r,"r"),$(r,"i"),h(r,"i"),x(r,"a"),S(r,"c"),U(r,"d"),R(r,"d"),A(r,"l"),C(r,"l"),F(r,"m"),J(r,"normaliseUrl");function i(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}s(i,"i"),u(i,"i"),v(i,"i"),d(i,"i"),f(i,"i"),m(i,"i"),p(i,"i"),g(i,"i"),b(i,"i"),y(i,"i"),j(i,"i"),T(i,"i"),E(i,"i"),O(i,"i"),P(i,"i"),I(i,"i"),w(i,"i"),k(i,"i"),$(i,"o"),h(i,"o"),x(i,"c"),S(i,"u"),U(i,"m"),R(i,"m"),A(i,"d"),C(i,"d"),F(i,"d"),J(i,"stringify");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lensmcp/vite-plugin",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/core": "^7.0.0",
|
|
18
|
-
"@lensmcp/bridge": "1.22.
|
|
19
|
-
"@lensmcp/core": "1.22.
|
|
20
|
-
"@lensmcp/protocol-types": "1.22.
|
|
21
|
-
"@lensmcp/react-instrumentation": "1.22.
|
|
22
|
-
"@lensmcp/valtio-instrumentation": "1.22.
|
|
18
|
+
"@lensmcp/bridge": "1.22.2",
|
|
19
|
+
"@lensmcp/core": "1.22.2",
|
|
20
|
+
"@lensmcp/protocol-types": "1.22.2",
|
|
21
|
+
"@lensmcp/react-instrumentation": "1.22.2",
|
|
22
|
+
"@lensmcp/valtio-instrumentation": "1.22.2",
|
|
23
23
|
"tslib": "^2.3.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|