@lensmcp/vite-plugin 1.18.8 → 1.18.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";var b=Object.defineProperty;var u=(e,t)=>b(e,"name",{value:t,configurable:!0});var I=Object.defineProperty,l=u((e,t)=>I(e,"name",{value:t,configurable:!0}),"u"),w=Object.defineProperty,d=l((e,t)=>w(e,"name",{value:t,configurable:!0}),"o"),k=Object.defineProperty,m=d((e,t)=>k(e,"name",{value:t,configurable:!0}),"o"),$=Object.defineProperty,f=m((e,t)=>$(e,"name",{value:t,configurable:!0}),"o"),h=Object.defineProperty,p=f((e,t)=>h(e,"name",{value:t,configurable:!0}),"o"),j=Object.defineProperty,g=p((e,t)=>j(e,"name",{value:t,configurable:!0}),"o"),x=Object.defineProperty,v=g((e,t)=>x(e,"name",{value:t,configurable:!0}),"o");import{fingerprint as a,ulid as c}from"@lensmcp/core";const T="pending";export function envelopeToEvent(e,t=T){const r=e.tabId?{tabId:e.tabId}:{};switch(e.kind){case"error":return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"error",context:{sessionId:t,...r},fingerprint:a({kind:"runtime",identity:`error:${n(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:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"error",context:{sessionId:t,...r},fingerprint:a({kind:"runtime",identity:`unhandledrejection:${e.reason.slice(0,80)}`}),title:"Unhandled promise rejection",message:e.reason,raw:e};case"console":{const s=e.level==="error"?"error":e.level==="warn"?"warning":"info",y=e.args.map(o).join(" ");return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:s,context:{sessionId:t,...r},fingerprint:a({kind:"runtime",identity:`console:${e.level}:${y.slice(0,80)}`}),title:`console.${e.level}`,message:y,raw:e}}case"fetch":{const s=e.error!==void 0||e.status!==void 0&&e.status>=400;return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"network",severity:s?"error":"info",context:{sessionId:t,...r},fingerprint:a({kind:"network",identity:`${e.method}:${i(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:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"info",context:{sessionId:t,url:e.url,...r},fingerprint:a({kind:"runtime",identity:`route:${e.url}`}),title:`Route \u2192 ${e.url}`,raw:e};case"ready":return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"info",context:{sessionId:t,url:e.url,...r},fingerprint:a({kind:"runtime",identity:"client-ready"}),title:"Client runtime ready",message:e.userAgent,raw:e};case"publish":return{id:c(),sessionId:t,timestamp:e.at,source:e.source,category:e.category,severity:e.severity??"info",context:{sessionId:t,...r,...e.context??{}},fingerprint:e.fingerprint??a({kind:"publish",identity:e.title}),title:e.title,message:e.message,raw:e.raw}}}u(envelopeToEvent,"envelopeToEvent"),l(envelopeToEvent,"envelopeToEvent"),d(envelopeToEvent,"envelopeToEvent"),m(envelopeToEvent,"envelopeToEvent"),f(envelopeToEvent,"envelopeToEvent"),p(envelopeToEvent,"envelopeToEvent"),g(envelopeToEvent,"envelopeToEvent"),v(envelopeToEvent,"envelopeToEvent");function n(e){if(!e)return"unknown";const t=e.split(`
2
- `).slice(0,2);for(const r of t){const s=r.match(/at\s+(\S+)/);if(s&&s[1])return s[1]}return"unknown"}u(n,"o"),l(n,"a"),d(n,"l"),m(n,"l"),f(n,"c"),p(n,"c"),g(n,"s"),v(n,"normaliseStackTopFrame");function i(e){try{return`${new URL(e,"http://x").pathname}`}catch{return e}}u(i,"a"),l(i,"c"),d(i,"d"),m(i,"d"),f(i,"l"),p(i,"l"),g(i,"m"),v(i,"normaliseUrl");function o(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}u(o,"c"),l(o,"u"),d(o,"m"),m(o,"m"),f(o,"d"),p(o,"d"),g(o,"d"),v(o,"stringify");
1
+ "use strict";var w=Object.defineProperty;var u=(e,t)=>w(e,"name",{value:t,configurable:!0});var k=Object.defineProperty,l=u((e,t)=>k(e,"name",{value:t,configurable:!0}),"u"),$=Object.defineProperty,d=l((e,t)=>$(e,"name",{value:t,configurable:!0}),"u"),h=Object.defineProperty,m=d((e,t)=>h(e,"name",{value:t,configurable:!0}),"u"),j=Object.defineProperty,f=m((e,t)=>j(e,"name",{value:t,configurable:!0}),"o"),T=Object.defineProperty,v=f((e,t)=>T(e,"name",{value:t,configurable:!0}),"o"),x=Object.defineProperty,p=v((e,t)=>x(e,"name",{value:t,configurable:!0}),"o"),E=Object.defineProperty,g=p((e,t)=>E(e,"name",{value:t,configurable:!0}),"o"),O=Object.defineProperty,y=g((e,t)=>O(e,"name",{value:t,configurable:!0}),"o"),P=Object.defineProperty,b=y((e,t)=>P(e,"name",{value:t,configurable:!0}),"o");import{fingerprint as a,ulid as c}from"@lensmcp/core";const S="pending";export function envelopeToEvent(e,t=S){const o=e.tabId?{tabId:e.tabId}:{};switch(e.kind){case"error":return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"error",context:{sessionId:t,...o},fingerprint:a({kind:"runtime",identity:`error:${n(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:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"error",context:{sessionId:t,...o},fingerprint:a({kind:"runtime",identity:`unhandledrejection:${e.reason.slice(0,80)}`}),title:"Unhandled promise rejection",message:e.reason,raw:e};case"console":{const s=e.level==="error"?"error":e.level==="warn"?"warning":"info",I=e.args.map(i).join(" ");return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:s,context:{sessionId:t,...o},fingerprint:a({kind:"runtime",identity:`console:${e.level}:${I.slice(0,80)}`}),title:`console.${e.level}`,message:I,raw:e}}case"fetch":{const s=e.error!==void 0||e.status!==void 0&&e.status>=400;return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"network",severity:s?"error":"info",context:{sessionId:t,...o},fingerprint:a({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:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"info",context:{sessionId:t,url:e.url,...o},fingerprint:a({kind:"runtime",identity:`route:${e.url}`}),title:`Route \u2192 ${e.url}`,raw:e};case"ready":return{id:c(),sessionId:t,timestamp:e.at,source:"client-runtime",category:"runtime",severity:"info",context:{sessionId:t,url:e.url,...o},fingerprint:a({kind:"runtime",identity:"client-ready"}),title:"Client runtime ready",message:e.userAgent,raw:e};case"publish":return{id:c(),sessionId:t,timestamp:e.at,source:e.source,category:e.category,severity:e.severity??"info",context:{sessionId:t,...o,...e.context??{}},fingerprint:e.fingerprint??a({kind:"publish",identity:e.title}),title:e.title,message:e.message,raw:e.raw}}}u(envelopeToEvent,"envelopeToEvent"),l(envelopeToEvent,"envelopeToEvent"),d(envelopeToEvent,"envelopeToEvent"),m(envelopeToEvent,"envelopeToEvent"),f(envelopeToEvent,"envelopeToEvent"),v(envelopeToEvent,"envelopeToEvent"),p(envelopeToEvent,"envelopeToEvent"),g(envelopeToEvent,"envelopeToEvent"),y(envelopeToEvent,"envelopeToEvent"),b(envelopeToEvent,"envelopeToEvent");function n(e){if(!e)return"unknown";const t=e.split(`
2
+ `).slice(0,2);for(const o of t){const s=o.match(/at\s+(\S+)/);if(s&&s[1])return s[1]}return"unknown"}u(n,"r"),l(n,"n"),d(n,"o"),m(n,"a"),f(n,"l"),v(n,"l"),p(n,"c"),g(n,"c"),y(n,"s"),b(n,"normaliseStackTopFrame");function r(e){try{return`${new URL(e,"http://x").pathname}`}catch{return e}}u(r,"i"),l(r,"i"),d(r,"a"),m(r,"c"),f(r,"d"),v(r,"d"),p(r,"l"),g(r,"l"),y(r,"m"),b(r,"normaliseUrl");function i(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}u(i,"o"),l(i,"o"),d(i,"c"),m(i,"u"),f(i,"m"),v(i,"m"),p(i,"d"),g(i,"d"),y(i,"d"),b(i,"stringify");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensmcp/vite-plugin",
3
- "version": "1.18.8",
3
+ "version": "1.18.11",
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.18.8",
19
- "@lensmcp/core": "1.18.8",
20
- "@lensmcp/protocol-types": "1.18.8",
21
- "@lensmcp/react-instrumentation": "1.18.8",
22
- "@lensmcp/valtio-instrumentation": "1.18.8",
18
+ "@lensmcp/bridge": "1.18.11",
19
+ "@lensmcp/core": "1.18.11",
20
+ "@lensmcp/protocol-types": "1.18.11",
21
+ "@lensmcp/react-instrumentation": "1.18.11",
22
+ "@lensmcp/valtio-instrumentation": "1.18.11",
23
23
  "tslib": "^2.3.0"
24
24
  },
25
25
  "peerDependencies": {