@sentry/node 8.0.0-alpha.3 → 8.0.0-alpha.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.
@@ -1,2 +1,2 @@
1
- /*! @sentry/node 8.0.0-alpha.3 (dd8a7c5) | https://github.com/getsentry/sentry-javascript */
2
- import{Session as t}from"inspector";import{workerData as e,parentPort as n}from"worker_threads";import{posix as r,sep as o}from"path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"stream";import{createGzip as u}from"zlib";import*as a from"net";import*as f from"tls";import*as h from"http";const l=Object.prototype.toString;function p(t,e){return l.call(t)===`[object ${e}]`}function d(t){return p(t,"String")}function m(t){return p(t,"Object")}function g(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t,e){try{return t instanceof e}catch(t){return!1}}function b(t){return t&&t.Math==Math?t:void 0}const v="object"==typeof globalThis&&b(globalThis)||"object"==typeof window&&b(window)||"object"==typeof self&&b(self)||"object"==typeof global&&b(global)||function(){return this}()||{};function w(t,e,n){const r=n||v,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}const _=v,S=80;function E(t,e){const n=t,r=[];let o,s,i,c,u;if(!n||!n.tagName)return"";if(_.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const a=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(a&&a.length)a.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&d(o))for(s=o.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["aria-label","type","name","title","alt"];for(u=0;u<f.length;u++)i=f[u],c=n.getAttribute(i),c&&r.push(`[${i}="${c}"]`);return r.join("")}const $="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,x=["debug","info","warn","error","log","assert","trace"],k={};function N(t){if(!("console"in v))return t();const e=v.console,n={},r=Object.keys(k);r.forEach((t=>{const r=k[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const C=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return $?x.forEach((n=>{e[n]=(...e)=>{t&&N((()=>{v.console[n](`Sentry Logger [${n}]:`,...e)}))}})):x.forEach((t=>{e[t]=()=>{}})),e}();function A(t,e=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class T extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}const j=50,D="?",O=/captureMessage|captureException/;const R="<anonymous>";function P(t){if(function(t){switch(l.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...M(t)};if(e=t,"undefined"!=typeof Event&&y(e,Event)){const e={type:t.type,target:I(t.target),currentTarget:I(t.currentTarget),...M(t)};return"undefined"!=typeof CustomEvent&&y(t,CustomEvent)&&(e.detail=t.detail),e}return t;var e}function I(t){try{return e=t,"undefined"!=typeof Element&&y(e,Element)?function(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||S;for(;n&&s++<r&&(a=E(n,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)o.push(a),i+=a.length,n=n.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var e}function M(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function U(t){return B(t,new Map)}function B(t,e){if(function(t){if(!m(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=B(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(B(t,e))})),r}return t}function L(){const t=v,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function q(t,e=100,n=1/0){try{return H("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function H(t,e,n=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,i]=o;if(null==e||["number","boolean","string"].includes(typeof e)&&("number"!=typeof(c=e)||c==c))return e;var c;const u=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.o)}(e))return"[VueViewModel]";if(function(t){return m(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||R}catch(t){return R}}(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const n=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(t){return`**non-serializable** (${t})`}}(t,e);if(!u.startsWith("[object "))return u;if(e.__sentry_skip_normalization__)return e;const a="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===a)return u.replace("object ","");if(s(e))return"[Circular ~]";const f=e;if(f&&"function"==typeof f.toJSON)try{return H("",f.toJSON(),a-1,r,o)}catch(t){}const h=Array.isArray(e)?[]:{};let l=0;const p=P(e);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(l>=r){h[t]="[MaxProperties ~]";break}const e=p[t];h[t]=H(t,e,a-1,r,o),l++}return i(e),h}function J(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}const G=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function W(t){const e=function(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=G.exec(e);return n?n.slice(1):[]}(t),n=e[0];let r=e[1];return n||r?(r&&(r=r.slice(0,r.length-1)),n+r):"."}var z;function F(t){return new Y((e=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(z||(z={}));class Y{constructor(t){Y.prototype.__init.call(this),Y.prototype.__init2.call(this),Y.prototype.__init3.call(this),Y.prototype.__init4.call(this),this.i=z.PENDING,this.u=[];try{t(this.h,this.l)}catch(t){this.l(t)}}then(t,e){return new Y(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.p()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Y(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}__init(){this.h=t=>{this.m(z.RESOLVED,t)}}__init2(){this.l=t=>{this.m(z.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.i===z.PENDING&&(g(e)?e.then(this.h,this.l):(this.i=t,this.v=e,this.p()))}}__init4(){this.p=()=>{if(this.i===z.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===z.RESOLVED&&t[1](this.v),this.i===z.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Z(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return o=new T("Not adding Promise because buffer limit was reached."),new Y(((t,e)=>{e(o)}));var o;const s=r();return-1===e.indexOf(s)&&e.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(t){return new Y(((n,r)=>{let o=e.length;if(!o)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{F(t).then((()=>{--o||(clearTimeout(s),n(!0))}),r)}))}))}}}const K={ip:!1,request:!0,transaction:!0,user:!0},V=["cookies","data","headers","method","query_string","url"],Q=["id","username","email"];function X(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",o="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,o="route"):(t.originalUrl||t.url)&&(r=(t.originalUrl||t.url||"").split(/[\?#]/,1)[0]);let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,o]}function tt(t,e){const{include:n=V}=e||{},r={},o=t.headers||{},s=t.method,i=o.host||t.hostname||t.host||"<no host>",c="https"===t.protocol||t.socket&&t.socket.encrypted?"https":"http",u=t.originalUrl||t.url||"",a=u.startsWith(c)?u:`${c}://${i}${u}`;return n.forEach((e=>{switch(e){case"headers":r.headers=o,n.includes("cookies")||delete r.headers.cookie;break;case"method":r.method=s;break;case"url":r.url=a;break;case"cookies":r.cookies=t.cookies||o.cookie&&function(t){const e={};let n=0;for(;n<t.length;){const r=t.indexOf("=",n);if(-1===r)break;let o=t.indexOf(";",n);if(-1===o)o=t.length;else if(o<r){n=t.lastIndexOf(";",r-1)+1;continue}const s=t.slice(n,r).trim();if(void 0===e[s]){let n=t.slice(r+1,o).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1));try{e[s]=-1!==n.indexOf("%")?decodeURIComponent(n):n}catch(t){e[s]=n}}n=o+1}return e}(o.cookie)||{};break;case"query_string":r.query_string=function(t){let e=t.originalUrl||t.url||"";if(!e)return;e.startsWith("/")&&(e=`http://dogs.are.great${e}`);try{const n=t.query||new URL(e).search.slice(1);return n.length?n:void 0}catch(t){return}}(t);break;case"data":if("GET"===s||"HEAD"===s)break;void 0!==t.body&&(r.data=d(t.body)?t.body:JSON.stringify(q(t.body)));break;default:({}).hasOwnProperty.call(t,e)&&(r[e]=t[e])}})),r}function et(t,e,n){const r={...K,...n&&n.include};if(r.request){const n=Array.isArray(r.request)?tt(e,{include:r.request}):tt(e);t.request={...t.request,...n}}if(r.user){const n=e.user&&m(e.user)?function(t,e){const n={};return(Array.isArray(e)?e:Q).forEach((e=>{t&&e in t&&(n[e]=t[e])})),n}(e.user,r.user):{};Object.keys(n).length&&(t.user={...t.user,...n})}if(r.ip){const n=e.ip||e.socket&&e.socket.remoteAddress;n&&(t.user={...t.user,ip_address:n})}return r.transaction&&!t.transaction&&(t.transaction=function(t,e){switch(e){case"path":return X(t,{path:!0})[0];case"handler":return t.route&&t.route.stack&&t.route.stack[0]&&t.route.stack[0].name||"<anonymous>";default:return X(t,{path:!0,method:!0,customRoute:t._?t._:void 0})[0]}}(e,r.transaction)),t}function nt(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}const rt=1e3;function ot(){return Date.now()/rt}const st=function(){const{performance:t}=v;if(!t||!t.now)return ot;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/rt}();function it(t,e=[]){return[t,e]}function ct(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function ut(t){return(new TextEncoder).encode(t)}function at(t){const[e,n]=t;let r=JSON.stringify(e);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[ut(r),t]:r.push("string"==typeof t?ut(t):t)}for(const t of n){const[e,n]=t;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(q(n))}o(t)}}return"string"==typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}(()=>{const{performance:t}=v;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=o<e,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+n-r):e;(s||c<e)&&(o<=c&&t.timeOrigin)})();const ft={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function ht(t){return ft[t]}function lt(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}const pt=6e4;function dt(t,{statusCode:e,headers:n},r=Date.now()){const o={...t},s=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),s=parseInt(e,10),i=1e3*(isNaN(s)?60:s);if(n)for(const t of n.split(";"))o[t]=r+i;else o.all=r+i}else i?o.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?pt:r-e}(i,r):429===e&&(o.all=r+6e4);return o}const mt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function gt(){return yt(v),v}function yt(t){return t.__SENTRY__||(t.__SENTRY__={extensions:{}}),t.__SENTRY__}const bt="production";function vt(t){const e=st(),n={sid:L(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return U({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&wt(n,t),n}function wt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||st(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:L()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class _t{constructor(){this.S=!1,this.k=[],this.N=[],this.C=[],this.A=[],this.T={},this.j={},this.D={},this.O={},this.R={},this.P=St()}static clone(t){return t?t.clone():new _t}clone(){const t=new _t;return t.C=[...this.C],t.j={...this.j},t.D={...this.D},t.O={...this.O},t.T=this.T,t.I=this.I,t.M=this.M,t.U=this.U,t.B=this.B,t.L=this.L,t.N=[...this.N],t.q=this.q,t.A=[...this.A],t.R={...this.R},t.P={...this.P},t.H=this.H,t}setClient(t){this.H=t}getClient(){return this.H}addScopeListener(t){this.k.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.T=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.U&&wt(this.U,{user:t}),this.J(),this}getUser(){return this.T}getRequestSession(){return this.q}setRequestSession(t){return this.q=t,this}setTags(t){return this.j={...this.j,...t},this.J(),this}setTag(t,e){return this.j={...this.j,[t]:e},this.J(),this}setExtras(t){return this.D={...this.D,...t},this.J(),this}setExtra(t,e){return this.D={...this.D,[t]:e},this.J(),this}setFingerprint(t){return this.L=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.B=t,this.J(),this}setContext(t,e){return null===e?delete this.O[t]:this.O[t]=e,this.J(),this}setSpan(t){return this.M=t,this.J(),this}getSpan(){return this.M}getTransaction(){const t=this.M;if(t&&t.transaction)return t.transaction}setSession(t){return t?this.U=t:delete this.U,this.J(),this}getSession(){return this.U}update(t){if(!t)return this;const e="function"==typeof t?t(this):t;if(e instanceof _t){const t=e.getScopeData();this.j={...this.j,...t.tags},this.D={...this.D,...t.extra},this.O={...this.O,...t.contexts},t.user&&Object.keys(t.user).length&&(this.T=t.user),t.level&&(this.I=t.level),t.fingerprint.length&&(this.L=t.fingerprint),e.getRequestSession()&&(this.q=e.getRequestSession()),t.propagationContext&&(this.P=t.propagationContext)}else if(m(e)){const e=t;this.j={...this.j,...e.tags},this.D={...this.D,...e.extra},this.O={...this.O,...e.contexts},e.user&&(this.T=e.user),e.level&&(this.I=e.level),e.fingerprint&&(this.L=e.fingerprint),e.requestSession&&(this.q=e.requestSession),e.propagationContext&&(this.P=e.propagationContext)}return this}clear(){return this.C=[],this.j={},this.D={},this.T={},this.O={},this.I=void 0,this.B=void 0,this.L=void 0,this.q=void 0,this.M=void 0,this.U=void 0,this.J(),this.A=[],this.P=St(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:ot(),...t},o=this.C;return o.push(r),this.C=o.length>n?o.slice(-n):o,this.J(),this}getLastBreadcrumb(){return this.C[this.C.length-1]}clearBreadcrumbs(){return this.C=[],this.J(),this}addAttachment(t){return this.A.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this.A=[],this}getScopeData(){const{C:t,A:e,O:n,j:r,D:o,T:s,I:i,L:c,N:u,P:a,R:f,B:h,M:l}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:o,user:s,level:i,fingerprint:c||[],eventProcessors:u,propagationContext:a,sdkProcessingMetadata:f,transactionName:h,span:l}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.P=t,this}getPropagationContext(){return this.P}captureException(t,e){const n=e&&e.event_id?e.event_id:L();if(!this.H)return C.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.H.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:L();if(!this.H)return C.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.H.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:L();return this.H?(this.H.captureEvent(t,{...e,event_id:n},this),n):(C.warn("No client configured on scope - will not capture event!"),n)}J(){this.S||(this.S=!0,this.k.forEach((t=>{t(this)})),this.S=!1)}}function St(){return{traceId:L(),spanId:L().substring(16)}}const Et=parseFloat("8.0.0-alpha.3"),$t=100;class xt{constructor(t,e,n,r=Et){let o,s;this.G=r,e?o=e:(o=new _t,o.setClient(t)),n?s=n:(s=new _t,s.setClient(t)),this.W=[{scope:o}],t&&this.bindClient(t),this.F=s}isOlderThan(t){return this.G<t}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();let n;try{n=t(e)}catch(t){throw this.popScope(),t}return g(n)?n.then((t=>(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.F}getStack(){return this.W}getStackTop(){return this.W[this.W.length-1]}captureException(t,e){const n=e&&e.event_id?e.event_id:L(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:L(),o=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:L();return this.getScope().captureEvent(t,{...e,event_id:n}),n}addBreadcrumb(t,e){const{client:n}=this.getStackTop();if(!n)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:o=$t}=n.getOptions&&n.getOptions()||{};if(o<=0)return;const s={timestamp:ot(),...t},i=r?N((()=>r(s,e))):s;null!==i&&(n.emit("beforeAddBreadcrumb",i,e),this.getIsolationScope().addBreadcrumb(i,o))}setUser(t){this.getIsolationScope().setUser(t)}setTags(t){this.getIsolationScope().setTags(t)}setExtras(t){this.getIsolationScope().setExtras(t)}setTag(t,e){this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getIsolationScope().setContext(t,e)}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return mt&&C.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}captureSession(t=!1){if(t)return this.endSession();this.Y()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),wt(t,n)}(e),this.Y(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:o=bt}=n&&n.getOptions()||{},{userAgent:s}=v.navigator||{},i=vt({release:r,environment:o,user:e.getUser(),...s&&{userAgent:s},...t}),c=e.getSession&&e.getSession();return c&&"ok"===c.status&&wt(c,{status:"exited"}),this.endSession(),e.setSession(i),i}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}Y(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}Z(t,...e){const n=yt(gt());if(n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);mt&&C.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function kt(){const t=yt(gt());return t.hub||(t.hub=new xt(void 0,w("defaultCurrentScope",(()=>new _t)),w("defaultIsolationScope",(()=>new _t)))),t.hub}function Nt(t){const e=yt(t);return e.acs?e.acs:{getCurrentHub:kt,withIsolationScope:Tt,withScope:Ct,withSetScope:At,withSetIsolationScope:(t,e)=>Tt(e),getCurrentScope:()=>kt().getScope(),getIsolationScope:()=>kt().getIsolationScope()}}function Ct(t){return kt().withScope(t)}function At(t,e){const n=kt();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function Tt(t){return kt().withScope((()=>t(kt().getIsolationScope())))}function jt(){return Nt(gt()).getCurrentScope().getClient()}const Dt=0,Ot=1;function Rt(t){return"number"==typeof t?Pt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pt(t.getTime()):st()}function Pt(t){return t>9999999999?t/1e3:t}function It(t){if(t&&t.code!==Dt)return t.code===Ot?"ok":t.message||"unknown_error"}function Mt(t,e,n,r){const o=lt(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const i=function(t,e,n,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:A(r)},...o&&{trace:U({...o})}}}(t,o,r,e);delete t.sdkProcessingMetadata;return it(i,[[{type:s},t]])}const Ut="7";function Bt(t,e){return n={sentry_key:t.publicKey,sentry_version:Ut,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}function Lt(t,e){return Object.assign((function(...t){return e(...t)}),{id:t})}const qt=30;function Ht(t,e,n=Z(t.bufferSize||qt)){let r={};return{send:function(o){const s=[];if(ct(o,((e,n)=>{const o=ht(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,o)){const r=Jt(e,n);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(e)})),0===s.length)return F({});const i=it(o[0],s),c=e=>{ct(i,((n,r)=>{const o=Jt(n,r);t.recordDroppedEvent(e,ht(r),o)}))};return n.add((()=>e({body:at(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&mt&&C.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=dt(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof T)return mt&&C.error("Skipped sending event because buffer is full."),c("queue_overflow"),F({});throw t}))},flush:t=>n.drain(t)}}function Jt(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const Gt=new Map,Wt=new Set;function zt(t,e){return function(t){if(v.K)for(const e of Object.keys(v.K)){const n=v.K[e];if(Wt.has(e))continue;Wt.add(e);const r=t(e);for(const t of r.reverse())if(t.filename){Gt.set(t.filename,n);break}}}(t),Gt.get(e)}const Ft="ModuleMetadata";Lt(Ft,(()=>({name:Ft,setup(t){t.on("beforeEnvelope",(t=>{ct(t,((t,e)=>{if("event"===e){const e=Array.isArray(t)?t[1]:void 0;e&&(!function(t){try{t.exception.values.forEach((t=>{if(t.stacktrace)for(const e of t.stacktrace.frames||[])delete e.module_metadata}))}catch(t){}}(e),t[1]=e)}}))}))},processEvent:(t,e,n)=>(function(t,e){try{e.exception.values.forEach((e=>{if(e.stacktrace)for(const n of e.stacktrace.frames||[]){if(!n.filename)continue;const e=zt(t,n.filename);e&&(n.module_metadata=e)}}))}catch(t){}}(n.getOptions().stackParser,t),t)})));const Yt={include:{cookies:!0,data:!0,headers:!0,ip:!1,query_string:!0,url:!0,user:{id:!0,username:!0,email:!0}},transactionNamingScheme:"methodPath"},Zt="RequestData",Kt=(t={})=>{const e={...Yt,...t,include:{...Yt.include,...t.include,user:t.include&&"boolean"==typeof t.include.user?t.include.user:{...Yt.include.user,...(t.include||{}).user}}};return{name:Zt,processEvent(t,n,r){const{transactionNamingScheme:o}=e,{sdkProcessingMetadata:s={}}=t,i=s.request;if(!i)return t;const c=function(t){const{transactionNamingScheme:e,include:{ip:n,user:r,...o}}=t,s=["method"];for(const[t,e]of Object.entries(o))e&&s.push(t);let i;if(void 0===r)i=!0;else if("boolean"==typeof r)i=r;else{const t=[];for(const[e,n]of Object.entries(r))n&&t.push(e);i=t}return{include:{ip:n,user:i,request:0!==s.length?s:void 0,transaction:e}}}(e),u=et(t,i,c);if("transaction"===t.type||"handler"===o)return u;const a=i.V;if(a){const t=function(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return U({span_id:e,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:Rt(o),timestamp:Rt(i)||void 0,status:It(u),op:r["sentry.op"],origin:r["sentry.origin"],X:void 0})}return{span_id:e,trace_id:n}}catch(t){return{}}}(a).description||"",e="sentry.javascript.nextjs"===function(t){try{return t.getOptions().tt.sdk.name}catch(t){return}}(r)?t.startsWith("/api"):"path"!==o,[n]=X(i,{path:!0,method:e,customRoute:t});u.transaction=n}return u}}};let Vt;Lt(Zt,Kt);const Qt="FunctionToString",Xt=new WeakMap;function te(t,e){return null!=t?t:e()}Lt(Qt,(()=>({name:Qt,setupOnce(){Vt=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=this.__sentry_original__;const n=Xt.has(jt())&&void 0!==e?e:this;return Vt.apply(n,t)}}catch(t){}},setup(t){Xt.set(t,!0)}})));const ee=Symbol("AgentBaseInternalState");class ne extends h.Agent{constructor(t){super(t),this[ee]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,e,n){const r={...e,secureEndpoint:this.isSecureEndpoint(e)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof h.Agent)return o.addRequest(t,r);this[ee].currentSocket=o,super.createSocket(t,e,n)}),n)}createConnection(){const t=this[ee].currentSocket;if(this[ee].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return te(this[ee].defaultPort,(()=>"https:"===this.protocol?443:80))}set defaultPort(t){this[ee]&&(this[ee].defaultPort=t)}get protocol(){return te(this[ee].protocol,(()=>this.isSecureEndpoint()?"https:":"http:"))}set protocol(t){this[ee]&&(this[ee].protocol=t)}}function re(...t){C.log("[https-proxy-agent:parse-proxy-response]",...t)}function oe(t){return new Promise(((e,n)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return re("have not received end of HTTP headers yet..."),void s();const f=u.slice(0,a).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));const l=h.split(" "),p=+l[1],d=l.slice(2).join(" "),m={};for(const e of f){if(!e)continue;const r=e.indexOf(":");if(-1===r)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${e}"`));const o=e.slice(0,r).toLowerCase(),s=e.slice(r+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}re("got proxy server response: %o %o",h,m),i(),e({connect:{statusCode:p,statusText:d,headers:m},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),re("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),re("onerror %o",t),n(t)}t.on("error",u),t.on("end",c),s()}))}function se(...t){C.log("[https-proxy-agent]",...t)}class ie extends ne{static __initStatic(){this.protocols=["http","https"]}constructor(t,e){var n,r;super(e),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=(n=function(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],s=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=s(n)):"call"!==o&&"optionalCall"!==o||(n=s(((...t)=>n.call(e,...t))),e=void 0)}return n}([e,"optionalAccess",t=>t.headers]),r=()=>({}),null!=n?n:r()),se("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...e?ue(e,"headers"):null,host:o,port:s}}async connect(t,e){const{proxy:n}=this;if(!e.host)throw new TypeError('No "host" provided');let r;if("https:"===n.protocol){se("Creating `tls.Socket`: %o",this.connectOpts);const t=this.connectOpts.servername||this.connectOpts.host;r=f.connect({...this.connectOpts,servername:t&&a.isIP(t)?void 0:t})}else se("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(e.host)?`[${e.host}]`:e.host;let i=`CONNECT ${s}:${e.port} HTTP/1.1\r\n`;if(n.username||n.password){const t=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${e.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=oe(r);r.write(`${i}\r\n`);const{connect:u,buffered:h}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),200===u.statusCode){if(t.once("socket",ce),e.secureEndpoint){se("Upgrading socket connection to TLS");const t=e.servername||e.host;return f.connect({...ue(e,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const l=new a.Socket({writable:!1});return l.readable=!0,t.once("socket",(t=>{se("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),l}}function ce(t){t.resume()}function ue(t,...e){const n={};let r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}function ae(t,e){return null!=t?t:e()}ie.__initStatic();const fe=32768;function he(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function le(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],s=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=s(n)):"call"!==o&&"optionalCall"!==o||(n=s(((...t)=>n.call(e,...t))),e=void 0)}return n}const pe=e;let de,me=!1;function ge(t){pe.debug&&console.log(`[ANR Worker] ${t}`)}const ye=function(t){let e;try{e=new URL(t.url)}catch(e){return N((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),Ht(t,(()=>Promise.resolve({})))}const n="https:"===e.protocol,r=function(t,e){const{no_proxy:n}=process.env;return n&&n.split(",").some((e=>t.host.endsWith(e)||t.hostname.endsWith(e)))?void 0:e}(e,t.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new ie(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),h=function(t,e,n){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((h,l)=>{let p=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>fe&&(d["content-encoding"]="gzip",p=p.pipe(u()));const m=e.request({method:"POST",agent:n,headers:d,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const e=ae(t.headers["retry-after"],(()=>null)),n=ae(t.headers["x-sentry-rate-limits"],(()=>null));h({statusCode:t.statusCode,headers:{"retry-after":e,"x-sentry-rate-limits":Array.isArray(n)?n[0]:n}})}));m.on("error",l),p.pipe(m)}))}}(t,ae(t.httpModule,(()=>o)),f);return Ht(t,h)}({url:function(t,e={}){const n="string"==typeof e?e:e.tunnel,r="string"!=typeof e&&e.tt?e.tt.sdk:void 0;return n||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(t)}?${Bt(t,r)}`}(pe.dsn),recordDroppedEvent:()=>{}});async function be(){if(de){ge("Sending abnormal session"),wt(de,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,e,n,r){const o=lt(n);return it({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:A(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(de,pe.dsn,pe.sdkMetadata);ge(JSON.stringify(t)),await ye.send(t);try{le([n,"optionalAccess",t=>t.postMessage,"call",t=>t("session-ended")])}catch(t){}}}function ve(t){if(!t)return;const e=function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),O.test(e[e.length-1].function||"")&&(e.pop(),O.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,j).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||D})))}(t);if(pe.appRootPath)for(const t of e)t.filename&&(t.filename=J(t.filename,pe.appRootPath));return e}async function we(t,e){if(me)return;me=!0,await be(),ge("Sending event");const n=Mt({event_id:L(),contexts:{...pe.contexts,trace:e},release:pe.release,environment:pe.environment,dist:pe.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${pe.anrThreshold} ms`,stacktrace:{frames:ve(t)},mechanism:{type:"ANR"}}]},tags:pe.staticTags},pe.dsn,pe.sdkMetadata);ge(JSON.stringify(n)),await ye.send(n),await ye.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let _e;if(ge("Started"),pe.captureStackTrace){ge("Connecting to debugger");const e=new t;e.connectToMainThread(),ge("Connected to debugger");const n=new Map;e.on("Debugger.scriptParsed",(t=>{n.set(t.params.scriptId,t.params.url)})),e.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{ge("Debugger paused");const s=[...t.params.callFrames],i=pe.appRootPath?function(t=(process.argv[1]?W(process.argv[1]):process.cwd()),e="\\"===o){const n=e?he(t):t;return t=>{if(!t)return;const o=e?he(t):t;let{dir:s,base:i,ext:c}=r.parse(o);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),s||(s=".");const u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${i}`;if(s.startsWith(n)){let t=s.slice(n.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(pe.appRootPath):()=>{},c=s.map((t=>function(t,e,n){const r=e?e.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return U({filename:r,module:n(r),function:t.functionName||D,colno:o,lineno:s,in_app:r?nt(r):void 0})}(t,n.get(t.location.scriptId),i)));e.post("Runtime.evaluate",{expression:'const ctx = __SENTRY__.acs?.getCurrentScope().getPropagationContext() || {}; ctx.traceId + "-" + ctx.spanId + "-" + ctx.parentSpanId',silent:!0},((t,n)=>{const r=n&&n.result?n.result.value:"--",[o,s,i]=r.split("-");e.post("Debugger.resume"),e.post("Debugger.disable");const u=le([o,"optionalAccess",t=>t.length])&&le([s,"optionalAccess",t=>t.length])?{trace_id:o,span_id:s,parent_span_id:i}:void 0;we(c,u).then(null,(()=>{ge("Sending ANR event failed.")}))}))}catch(t){throw e.post("Debugger.resume"),e.post("Debugger.disable"),t}})),_e=()=>{try{e.post("Debugger.enable",(()=>{e.post("Debugger.pause")}))}catch(t){}}}const{poll:Se}=function(t,e,n,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>e+n&&(s=!0,i&&r()),t<e+n&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[e,n]=process.hrtime(t);return Math.floor(1e3*e+n/1e6)},reset:()=>{t=process.hrtime()}}}),pe.pollInterval,pe.anrThreshold,(function(){ge("Watchdog timeout"),_e?(ge("Pausing debugger to capture stack trace"),_e()):(ge("Capturing event without a stack trace"),we().then(null,(()=>{ge("Sending ANR event failed on watchdog timeout.")})))}));le([n,"optionalAccess",t=>t.on,"call",t=>t("message",(t=>{t.session&&(de=vt(t.session)),Se()}))]);
1
+ /*! @sentry/node 8.0.0-alpha.5 (1445131) | https://github.com/getsentry/sentry-javascript */
2
+ import{Session as t}from"inspector";import{workerData as n,parentPort as e}from"worker_threads";import{posix as r,sep as o}from"path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"stream";import{createGzip as u}from"zlib";import*as a from"net";import*as f from"tls";import*as l from"http";const p=Object.prototype.toString;function d(t,n){return p.call(t)===`[object ${n}]`}function h(t){return d(t,"Object")}function y(t,n){try{return t instanceof n}catch(t){return!1}}function m(t){return t&&t.Math==Math?t:void 0}const g="object"==typeof globalThis&&m(globalThis)||"object"==typeof window&&m(window)||"object"==typeof self&&m(self)||"object"==typeof global&&m(global)||function(){return this}()||{};const b=g,v=80;function _(t,n){const e=t,r=[];let o,s,i,c,u;if(!e||!e.tagName)return"";if(b.HTMLElement&&e instanceof HTMLElement&&e.dataset&&e.dataset.sentryComponent)return e.dataset.sentryComponent;r.push(e.tagName.toLowerCase());const a=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(a&&a.length)a.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(e.id&&r.push(`#${e.id}`),o=e.className,o&&d(o,"String"))for(s=o.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["aria-label","type","name","title","alt"];for(u=0;u<f.length;u++)i=f[u],c=e.getAttribute(i),c&&r.push(`[${i}="${c}"]`);return r.join("")}const w="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,$=["debug","info","warn","error","log","assert","trace"],E={};function N(t){if(!("console"in g))return t();const n=g.console,e={},r=Object.keys(E);r.forEach((t=>{const r=E[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const S=function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return w?$.forEach((e=>{n[e]=(...n)=>{t&&N((()=>{g.console[e](`Sentry Logger [${e}]:`,...n)}))}})):$.forEach((t=>{n[t]=()=>{}})),n}();function k(t,n=!1){const{host:e,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&o?`:${o}`:""}@${e}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class A extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const x=50,C="?",D=/captureMessage|captureException/;const j="<anonymous>";function T(t){if(function(t){switch(p.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...R(t)};if(n=t,"undefined"!=typeof Event&&y(n,Event)){const n={type:t.type,target:O(t.target),currentTarget:O(t.currentTarget),...R(t)};return"undefined"!=typeof CustomEvent&&y(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function O(t){try{return n=t,"undefined"!=typeof Element&&y(n,Element)?function(t,n={}){if(!t)return"<unknown>";try{let e=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,l=!Array.isArray(n)&&n.maxStringLength||v;for(;e&&s++<r&&(a=_(e,f),!("html"===a||s>1&&i+o.length*u+a.length>=l));)o.push(a),i+=a.length,e=e.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var n}function R(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function P(t){return I(t,new Map)}function I(t,n){if(function(t){if(!h(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.keys(t))void 0!==t[e]&&(r[e]=I(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(I(t,n))})),r}return t}function U(){const t=g,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function M(t,n=100,e=1/0){try{return L("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function L(t,n,e=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1},function(e){if(t)n.delete(e);else for(let t=0;t<n.length;t++)if(n[t]===e){n.splice(t,1);break}}]}()){const[s,i]=o;if(null==n||["number","boolean","string"].includes(typeof n)&&("number"!=typeof(c=n)||c==c))return n;var c;const u=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&n===global)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if(function(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.o)}(n))return"[VueViewModel]";if(function(t){return h(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(n))return"[SyntheticEvent]";if("number"==typeof n&&n!=n)return"[NaN]";if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||j}catch(t){return j}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const e=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(e)?`[HTMLElement: ${e}]`:`[object ${e}]`}catch(t){return`**non-serializable** (${t})`}}(t,n);if(!u.startsWith("[object "))return u;if(n.__sentry_skip_normalization__)return n;const a="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===a)return u.replace("object ","");if(s(n))return"[Circular ~]";const f=n;if(f&&"function"==typeof f.toJSON)try{return L("",f.toJSON(),a-1,r,o)}catch(t){}const l=Array.isArray(n)?[]:{};let p=0;const d=T(n);for(const t in d){if(!Object.prototype.hasOwnProperty.call(d,t))continue;if(p>=r){l[t]="[MaxProperties ~]";break}const n=d[t];l[t]=L(t,n,a-1,r,o),p++}return i(n),l}function B(t,n){const e=n.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${e}/*`,"ig"),"app:///")}const J=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function z(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=J.exec(n);return e?e.slice(1):[]}(t),e=n[0];let r=n[1];return e||r?(r&&(r=r.slice(0,r.length-1)),e+r):"."}var G;function H(t){return new W((n=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(G||(G={}));class W{constructor(t){W.prototype.__init.call(this),W.prototype.__init2.call(this),W.prototype.__init3.call(this),W.prototype.__init4.call(this),this.i=G.PENDING,this.u=[];try{t(this.l,this.p)}catch(t){this.p(t)}}then(t,n){return new W(((e,r)=>{this.u.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.h()}))}catch(t){return this.then((t=>t),t)}finally(t){return new W(((n,e)=>{let r,o;return this.then((n=>{o=!1,r=n,t&&t()}),(n=>{o=!0,r=n,t&&t()})).then((()=>{o?e(r):n(r)}))}))}__init(){this.l=t=>{this.m(G.RESOLVED,t)}}__init2(){this.p=t=>{this.m(G.REJECTED,t)}}__init3(){this.m=(t,n)=>{var e;this.i===G.PENDING&&(e=n,Boolean(e&&e.then&&"function"==typeof e.then)?n.then(this.l,this.p):(this.i=t,this.v=n,this.h()))}}__init4(){this.h=()=>{if(this.i===G.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===G.RESOLVED&&t[1](this.v),this.i===G.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Y(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new A("Not adding Promise because buffer limit was reached."),new W(((t,n)=>{n(o)}));var o;const s=r();return-1===n.indexOf(s)&&n.push(s),s.then((()=>e(s))).then(null,(()=>e(s).then(null,(()=>{})))),s},drain:function(t){return new W(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{H(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function Z(t,n=!1){return!(n||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}const V=1e3;function q(){return Date.now()/V}const K=function(){const{performance:t}=g;if(!t||!t.now)return q;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/V}();function F(t,n=[]){return[t,n]}function Q(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function X(t){return(new TextEncoder).encode(t)}function tt(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[X(r),t]:r.push("string"==typeof t?X(t):t)}for(const t of e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(M(e))}o(t)}}return"string"==typeof r?r:function(t){const n=t.reduce(((t,n)=>t+n.length),0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}(()=>{const{performance:t}=g;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,s=o<n,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+e-r):n;(s||c<n)&&(o<=c&&t.timeOrigin)})();const nt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"statsd"};function et(t){return nt[t]}function rt(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const ot=6e4;function st(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},s=e&&e["x-sentry-rate-limits"],i=e&&e["retry-after"];if(s)for(const t of s.trim().split(",")){const[n,e]=t.split(":",2),s=parseInt(n,10),i=1e3*(isNaN(s)?60:s);if(e)for(const t of e.split(";"))o[t]=r+i;else o.all=r+i}else i?o.all=r+function(t,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?ot:r-n}(i,r):429===n&&(o.all=r+6e4);return o}const it="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ct(t){const n=K(),e={sid:U(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return P({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(e)};return t&&ut(e,t),e}function ut(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||K(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:U()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}function at(t,n,e,r){const o=rt(e),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]])}(t,e&&e.sdk);const i=function(t,n,e,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:k(r)},...o&&{trace:P({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return F(i,[[{type:s},t]])}const ft="7";function lt(t,n){return e={sentry_key:t.publicKey,sentry_version:ft,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const pt=30;function dt(t,n,e=Y(t.bufferSize||pt)){let r={};return{send:function(o){const s=[];if(Q(o,((n,e)=>{const o=et(e);if(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,o)){const r=ht(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(n)})),0===s.length)return H({});const i=F(o[0],s),c=n=>{Q(i,((e,r)=>{const o=ht(e,r);t.recordDroppedEvent(n,et(r),o)}))};return e.add((()=>n({body:tt(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&it&&S.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=st(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof A)return it&&S.error("Skipped sending event because buffer is full."),c("queue_overflow"),H({});throw t}))},flush:t=>e.drain(t)}}function ht(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}function yt(t,n){return null!=t?t:n()}const mt=Symbol("AgentBaseInternalState");class gt extends l.Agent{constructor(t){super(t),this[mt]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:n}=new Error;return"string"==typeof n&&n.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,n,e){const r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof l.Agent)return o.addRequest(t,r);this[mt].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[mt].currentSocket;if(this[mt].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return yt(this[mt].defaultPort,(()=>"https:"===this.protocol?443:80))}set defaultPort(t){this[mt]&&(this[mt].defaultPort=t)}get protocol(){return yt(this[mt].protocol,(()=>this.isSecureEndpoint()?"https:":"http:"))}set protocol(t){this[mt]&&(this[mt].protocol=t)}}function bt(...t){S.log("[https-proxy-agent:parse-proxy-response]",...t)}function vt(t){return new Promise(((n,e)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return bt("have not received end of HTTP headers yet..."),void s();const f=u.slice(0,a).toString("ascii").split("\r\n"),l=f.shift();if(!l)return t.destroy(),e(new Error("No header received from proxy CONNECT response"));const p=l.split(" "),d=+p[1],h=p.slice(2).join(" "),y={};for(const n of f){if(!n)continue;const r=n.indexOf(":");if(-1===r)return t.destroy(),e(new Error(`Invalid header from proxy CONNECT response: "${n}"`));const o=n.slice(0,r).toLowerCase(),s=n.slice(r+1).trimStart(),i=y[o];"string"==typeof i?y[o]=[i,s]:Array.isArray(i)?i.push(s):y[o]=s}bt("got proxy server response: %o %o",l,y),i(),n({connect:{statusCode:d,statusText:h,headers:y},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),bt("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),bt("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function _t(...t){S.log("[https-proxy-agent]",...t)}class wt extends gt{static __initStatic(){this.protocols=["http","https"]}constructor(t,n){var e,r;super(n),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=(e=function(t){let n,e=t[0],r=1;for(;r<t.length;){const o=t[r],s=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==e)return;"access"===o||"optionalAccess"===o?(n=e,e=s(e)):"call"!==o&&"optionalCall"!==o||(e=s(((...t)=>e.call(n,...t))),n=void 0)}return e}([n,"optionalAccess",t=>t.headers]),r=()=>({}),null!=e?e:r()),_t("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Et(n,"headers"):null,host:o,port:s}}async connect(t,n){const{proxy:e}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if("https:"===e.protocol){_t("Creating `tls.Socket`: %o",this.connectOpts);const t=this.connectOpts.servername||this.connectOpts.host;r=f.connect({...this.connectOpts,servername:t&&a.isIP(t)?void 0:t})}else _t("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(n.host)?`[${n.host}]`:n.host;let i=`CONNECT ${s}:${n.port} HTTP/1.1\r\n`;if(e.username||e.password){const t=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${n.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=vt(r);r.write(`${i}\r\n`);const{connect:u,buffered:l}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),200===u.statusCode){if(t.once("socket",$t),n.secureEndpoint){_t("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...Et(n,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const p=new a.Socket({writable:!1});return p.readable=!0,t.once("socket",(t=>{_t("Replaying proxy buffer for failed request"),t.push(l),t.push(null)})),p}}function $t(t){t.resume()}function Et(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}function Nt(t,n){return null!=t?t:n()}wt.__initStatic();const St=32768;function kt(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function At(t){let n,e=t[0],r=1;for(;r<t.length;){const o=t[r],s=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==e)return;"access"===o||"optionalAccess"===o?(n=e,e=s(e)):"call"!==o&&"optionalCall"!==o||(e=s(((...t)=>e.call(n,...t))),n=void 0)}return e}const xt=n;let Ct,Dt=!1;function jt(t){xt.debug&&console.log(`[ANR Worker] ${t}`)}var Tt,Ot,Rt;const Pt=function(t){let n;try{n=new URL(t.url)}catch(n){return N((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),dt(t,(()=>Promise.resolve({})))}const e="https:"===n.protocol,r=function(t,n){const{no_proxy:e}=process.env;return e&&e.split(",").some((n=>t.host.endsWith(n)||t.hostname.endsWith(n)))?void 0:n}(n,t.proxy||(e?process.env.https_proxy:void 0)||process.env.http_proxy),o=e?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new wt(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),l=function(t,n,e){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((l,p)=>{let d=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const h={...t.headers};f.body.length>St&&(h["content-encoding"]="gzip",d=d.pipe(u()));const y=n.request({method:"POST",agent:e,headers:h,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const n=Nt(t.headers["retry-after"],(()=>null)),e=Nt(t.headers["x-sentry-rate-limits"],(()=>null));l({statusCode:t.statusCode,headers:{"retry-after":n,"x-sentry-rate-limits":Array.isArray(e)?e[0]:e}})}));y.on("error",p),d.pipe(y)}))}}(t,Nt(t.httpModule,(()=>o)),f);return dt(t,l)}({url:(Tt=xt.dsn,Ot=xt.tunnel,Rt=xt.sdkMetadata.sdk,Ot||`${function(t){return`${function(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(Tt)}?${lt(Tt,Rt)}`),recordDroppedEvent:()=>{}});async function It(){if(Ct){jt("Sending abnormal session"),ut(Ct,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=rt(e);return F({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:k(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(Ct,xt.dsn,xt.sdkMetadata,xt.tunnel);jt(JSON.stringify(t)),await Pt.send(t);try{At([e,"optionalAccess",t=>t.postMessage,"call",t=>t("session-ended")])}catch(t){}}}function Ut(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(n[n.length-1].function||"")&&n.pop(),n.reverse(),D.test(n[n.length-1].function||"")&&(n.pop(),D.test(n[n.length-1].function||"")&&n.pop()),n.slice(0,x).map((t=>({...t,filename:t.filename||n[n.length-1].filename,function:t.function||C})))}(t);if(xt.appRootPath)for(const t of n)t.filename&&(t.filename=B(t.filename,xt.appRootPath));return n}async function Mt(t,n){if(Dt)return;Dt=!0,await It(),jt("Sending event");const e=at({event_id:U(),contexts:{...xt.contexts,trace:n},release:xt.release,environment:xt.environment,dist:xt.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${xt.anrThreshold} ms`,stacktrace:{frames:Ut(t)},mechanism:{type:"ANR"}}]},tags:xt.staticTags},xt.dsn,xt.sdkMetadata,xt.tunnel);jt(JSON.stringify(e)),await Pt.send(e),await Pt.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let Lt;if(jt("Started"),xt.captureStackTrace){jt("Connecting to debugger");const n=new t;n.connectToMainThread(),jt("Connected to debugger");const e=new Map;n.on("Debugger.scriptParsed",(t=>{e.set(t.params.scriptId,t.params.url)})),n.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{jt("Debugger paused");const s=[...t.params.callFrames],i=xt.appRootPath?function(t=(process.argv[1]?z(process.argv[1]):process.cwd()),n="\\"===o){const e=n?kt(t):t;return t=>{if(!t)return;const o=n?kt(t):t;let{dir:s,base:i,ext:c}=r.parse(o);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),s||(s=".");const u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${i}`;if(s.startsWith(e)){let t=s.slice(e.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(xt.appRootPath):()=>{},c=s.map((t=>function(t,n,e){const r=n?n.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return P({filename:r,module:e(r),function:t.functionName||C,colno:o,lineno:s,in_app:r?Z(r):void 0})}(t,e.get(t.location.scriptId),i)));n.post("Runtime.evaluate",{expression:'var __sentry_ctx = __SENTRY__.acs?.getCurrentScope().getPropagationContext() || {}; __sentry_ctx.traceId + "-" + __sentry_ctx.spanId + "-" + __sentry_ctx.parentSpanId',silent:!0},((t,e)=>{const r=e&&e.result?e.result.value:"--",[o,s,i]=r.split("-");n.post("Debugger.resume"),n.post("Debugger.disable");const u=At([o,"optionalAccess",t=>t.length])&&At([s,"optionalAccess",t=>t.length])?{trace_id:o,span_id:s,parent_span_id:i}:void 0;Mt(c,u).then(null,(()=>{jt("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),Lt=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Bt}=function(t,n,e,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>n+e&&(s=!0,i&&r()),t<n+e&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[n,e]=process.hrtime(t);return Math.floor(1e3*n+e/1e6)},reset:()=>{t=process.hrtime()}}}),xt.pollInterval,xt.anrThreshold,(function(){jt("Watchdog timeout"),Lt?(jt("Pausing debugger to capture stack trace"),Lt()):(jt("Capturing event without a stack trace"),Mt().then(null,(()=>{jt("Sending ANR event failed on watchdog timeout.")})))}));At([e,"optionalAccess",t=>t.on,"call",t=>t("message",(t=>{t.session&&(Ct=ct(t.session)),Bt()}))]);
package/esm/package.json CHANGED
@@ -1 +1 @@
1
- { "type": "module" }
1
+ {"type":"module","sideEffects":false}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/node",
3
- "version": "8.0.0-alpha.3",
3
+ "version": "8.0.0-alpha.5",
4
4
  "description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node-experimental",
@@ -62,10 +62,10 @@
62
62
  "@opentelemetry/sdk-trace-base": "1.21.0",
63
63
  "@opentelemetry/semantic-conventions": "1.21.0",
64
64
  "@prisma/instrumentation": "5.9.0",
65
- "@sentry/core": "8.0.0-alpha.3",
66
- "@sentry/opentelemetry": "8.0.0-alpha.3",
67
- "@sentry/types": "8.0.0-alpha.3",
68
- "@sentry/utils": "8.0.0-alpha.3"
65
+ "@sentry/core": "8.0.0-alpha.5",
66
+ "@sentry/opentelemetry": "8.0.0-alpha.5",
67
+ "@sentry/types": "8.0.0-alpha.5",
68
+ "@sentry/utils": "8.0.0-alpha.5"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/node": "14.18.63"
package/types/index.d.ts CHANGED
@@ -21,16 +21,16 @@ export { prismaIntegration } from './integrations/tracing/prisma';
21
21
  export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
22
22
  export { spotlightIntegration } from './integrations/spotlight';
23
23
  export { init, getDefaultIntegrations } from './sdk/init';
24
+ export { initOpenTelemetry } from './sdk/initOtel';
24
25
  export { getAutoPerformanceIntegrations } from './integrations/tracing';
25
- export { getClient, getSentryRelease, defaultStackParser, makeMain, } from './sdk/api';
26
+ export { getSentryRelease, defaultStackParser } from './sdk/api';
26
27
  export { createGetModuleFromFilename } from './utils/module';
27
28
  export { makeNodeTransport } from './transports';
28
29
  export { NodeClient } from './sdk/client';
29
- export { getCurrentHub } from './sdk/hub';
30
30
  export { cron } from './cron';
31
31
  export type { NodeOptions } from './types';
32
32
  export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, } from '@sentry/utils';
33
33
  export { continueTrace } from '@sentry/opentelemetry';
34
- export { addBreadcrumb, isInitialized, getGlobalScope, close, createTransport, flush, Hub, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getCurrentScope, getIsolationScope, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, getActiveSpan, withActiveSpan, getRootSpan, } from '@sentry/core';
34
+ export { addBreadcrumb, isInitialized, getGlobalScope, close, createTransport, flush, Hub, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, getActiveSpan, withActiveSpan, getRootSpan, } from '@sentry/core';
35
35
  export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, Transaction, User, Span, } from '@sentry/types';
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
@@ -37,6 +37,7 @@ export interface WorkerStartData extends AnrIntegrationOptions {
37
37
  debug: boolean;
38
38
  sdkMetadata: SdkMetadata;
39
39
  dsn: DsnComponents;
40
+ tunnel: string | undefined;
40
41
  release: string | undefined;
41
42
  environment: string;
42
43
  dist: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAErF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACzC;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,EAAE,aAAa,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAErF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACzC;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
@@ -1,3 +1,10 @@
1
+ import type { IntegrationFnResult } from '@sentry/types';
1
2
  import type { AnrIntegrationOptions } from './common';
2
- export declare const anrIntegration: (options?: Partial<AnrIntegrationOptions> | undefined) => import("@sentry/types").IntegrationFnResult;
3
+ type AnrInternal = {
4
+ startWorker: () => void;
5
+ stopWorker: () => void;
6
+ };
7
+ type AnrReturn = (options?: Partial<AnrIntegrationOptions>) => IntegrationFnResult & AnrInternal;
8
+ export declare const anrIntegration: AnrReturn;
9
+ export {};
3
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,UAAU,CAAC;AAyCvE,eAAO,MAAM,cAAc,uGAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6C,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAMpG,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,UAAU,CAAC;AA2BvE,KAAK,WAAW,GAAG;IAAE,WAAW,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAwCvE,KAAK,SAAS,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,mBAAmB,GAAG,WAAW,CAAC;AAEjG,eAAO,MAAM,cAAc,WAAkD,CAAC"}
@@ -1,7 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { Event, Integration, IntegrationClass } from '@sentry/types';
3
2
  import type { Debugger, InspectorNotification } from 'inspector';
4
- import type { NodeClient } from '../../sdk/client';
5
3
  import type { LocalVariablesIntegrationOptions, Variables } from './common';
6
4
  type OnPauseEvent = InspectorNotification<Debugger.PausedEventDataType>;
7
5
  export interface DebugSession {
@@ -20,15 +18,9 @@ type CallbackWrapper<T> = {
20
18
  };
21
19
  /** Creates a container for callbacks to be called sequentially */
22
20
  export declare function createCallbackList<T>(complete: Next<T>): CallbackWrapper<T>;
23
- export declare const localVariablesSyncIntegration: (options?: LocalVariablesIntegrationOptions | undefined, session?: DebugSession | undefined) => import("@sentry/types").IntegrationFnResult;
24
21
  /**
25
22
  * Adds local variables to exception frames.
26
- * @deprecated Use `localVariablesSyncIntegration()` instead.
27
23
  */
28
- export declare const LocalVariablesSync: IntegrationClass<Integration & {
29
- processEvent: (event: Event) => Event;
30
- setup: (client: NodeClient) => void;
31
- }> & (new (options?: LocalVariablesIntegrationOptions, session?: DebugSession) => Integration);
32
- export type LocalVariablesSync = typeof LocalVariablesSync;
24
+ export declare const localVariablesSyncIntegration: (options?: LocalVariablesIntegrationOptions | undefined, session?: DebugSession | undefined) => import("@sentry/types").IntegrationFnResult;
33
25
  export {};
34
26
  //# sourceMappingURL=local-variables-sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-variables-sync.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/local-variables-sync.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,KAAK,EAAa,WAAW,EAAE,gBAAgB,EAA8B,MAAM,eAAe,CAAC;AAEjH,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAW,MAAM,WAAW,CAAC;AAI1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAEV,gCAAgC,EAGhC,SAAS,EACV,MAAM,UAAU,CAAC;AAGlB,KAAK,YAAY,GAAG,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACxE,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,mBAAmB,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/G,kDAAkD;IAClD,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAChD,2CAA2C;IAC3C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,GAAG,IAAI,CAAC;CAChF;AAED,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;AACnC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACpC,KAAK,eAAe,CAAC,CAAC,IAAI;IAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAEzD,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAiC3E;AAiUD,eAAO,MAAM,6BAA6B,6IAAoD,CAAC;AAE/F;;;GAGG;AAEH,eAAO,MAAM,kBAAkB;0BAG6B,KAAK,KAAK,KAAK;oBAAkB,UAAU,KAAK,IAAI;qBAC/F,gCAAgC,YAAY,YAAY,KAAG,WAAW,CACtF,CAAC;AAGF,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC"}
1
+ {"version":3,"file":"local-variables-sync.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/local-variables-sync.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAW,MAAM,WAAW,CAAC;AAK1E,OAAO,KAAK,EAEV,gCAAgC,EAGhC,SAAS,EACV,MAAM,UAAU,CAAC;AAGlB,KAAK,YAAY,GAAG,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACxE,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,mBAAmB,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/G,kDAAkD;IAClD,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAChD,2CAA2C;IAC3C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,GAAG,IAAI,CAAC;CAChF;AAED,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;AACnC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACpC,KAAK,eAAe,CAAC,CAAC,IAAI;IAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAEzD,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAiC3E;AAiUD;;GAEG;AACH,eAAO,MAAM,6BAA6B,6IAAoD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export declare const NODE_VERSION: {
2
- major: number | undefined;
3
- minor: number | undefined;
2
+ major: number;
3
+ minor: number;
4
+ patch: number;
4
5
  };
5
6
  export declare const NODE_MAJOR: number;
6
7
  //# sourceMappingURL=nodeVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeVersion.d.ts","sourceRoot":"","sources":["../../src/nodeVersion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;WAChB,MAAM,GAAG,SAAS;WAClB,MAAM,GAAG,SAAS;CAC1B,CAAC;AACF,eAAO,MAAM,UAAU,QAA0B,CAAC"}
1
+ {"version":3,"file":"nodeVersion.d.ts","sourceRoot":"","sources":["../../src/nodeVersion.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;WAAkD,MAAM;WAAS,MAAM;WAAS,MAAM;CAAE,CAAC;AAClH,eAAO,MAAM,UAAU,QAAqB,CAAC"}
@@ -1,18 +1,8 @@
1
- import type { Client, StackParser } from '@sentry/types';
2
- import type { Hub } from '@sentry/types';
3
- /** Get the currently active client. */
4
- export declare function getClient<C extends Client>(): C;
1
+ import type { StackParser } from '@sentry/types';
5
2
  /**
6
3
  * Returns a release dynamically from environment variables.
7
4
  */
8
5
  export declare function getSentryRelease(fallback?: string): string | undefined;
9
6
  /** Node.js stack parser */
10
7
  export declare const defaultStackParser: StackParser;
11
- /**
12
- * This method is a noop and only here to ensure vite-plugin v0.6.0 (which is used by Sveltekit) still works,
13
- * as that uses this.
14
- *
15
- * @deprecated This will be removed before v8 is finalized.
16
- */
17
- export declare function makeMain(hub: Hub): Hub;
18
8
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/sdk/api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIzC,uCAAuC;AACvC,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,CAU/C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA6BtE;AAED,2BAA2B;AAC3B,eAAO,MAAM,kBAAkB,EAAE,WAAmF,CAAC;AAErH;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAGtC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/sdk/api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA6BtE;AAED,2BAA2B;AAC3B,eAAO,MAAM,kBAAkB,EAAE,WAAmF,CAAC"}
@@ -3,7 +3,7 @@ import type { NodeClient } from './client';
3
3
  /**
4
4
  * Initialize OpenTelemetry for Node.
5
5
  */
6
- export declare function initOtel(): void;
6
+ export declare function initOpenTelemetry(client: NodeClient): void;
7
7
  /** Just exported for tests. */
8
8
  export declare function setupOtel(client: NodeClient): BasicTracerProvider;
9
9
  //# sourceMappingURL=initOtel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AASpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,wBAAgB,QAAQ,IAAI,IAAI,CA0B/B;AAED,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAoBjE"}
1
+ {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAgB1D;AAED,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAoBjE"}
@@ -21,16 +21,16 @@ export { prismaIntegration } from './integrations/tracing/prisma';
21
21
  export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
22
22
  export { spotlightIntegration } from './integrations/spotlight';
23
23
  export { init, getDefaultIntegrations } from './sdk/init';
24
+ export { initOpenTelemetry } from './sdk/initOtel';
24
25
  export { getAutoPerformanceIntegrations } from './integrations/tracing';
25
- export { getClient, getSentryRelease, defaultStackParser, makeMain, } from './sdk/api';
26
+ export { getSentryRelease, defaultStackParser } from './sdk/api';
26
27
  export { createGetModuleFromFilename } from './utils/module';
27
28
  export { makeNodeTransport } from './transports';
28
29
  export { NodeClient } from './sdk/client';
29
- export { getCurrentHub } from './sdk/hub';
30
30
  export { cron } from './cron';
31
31
  export { NodeOptions } from './types';
32
32
  export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, } from '@sentry/utils';
33
33
  export { continueTrace } from '@sentry/opentelemetry';
34
- export { addBreadcrumb, isInitialized, getGlobalScope, close, createTransport, flush, Hub, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getCurrentScope, getIsolationScope, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, getActiveSpan, withActiveSpan, getRootSpan, } from '@sentry/core';
34
+ export { addBreadcrumb, isInitialized, getGlobalScope, close, createTransport, flush, Hub, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, getActiveSpan, withActiveSpan, getRootSpan, } from '@sentry/core';
35
35
  export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, Transaction, User, Span, } from '@sentry/types';
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -37,6 +37,7 @@ export interface WorkerStartData extends AnrIntegrationOptions {
37
37
  debug: boolean;
38
38
  sdkMetadata: SdkMetadata;
39
39
  dsn: DsnComponents;
40
+ tunnel: string | undefined;
40
41
  release: string | undefined;
41
42
  environment: string;
42
43
  dist: string | undefined;
@@ -1,3 +1,10 @@
1
+ import { IntegrationFnResult } from '@sentry/types';
1
2
  import { AnrIntegrationOptions } from './common';
2
- export declare const anrIntegration: (options?: Partial<AnrIntegrationOptions> | undefined) => import("@sentry/types").IntegrationFnResult;
3
+ type AnrInternal = {
4
+ startWorker: () => void;
5
+ stopWorker: () => void;
6
+ };
7
+ type AnrReturn = (options?: Partial<AnrIntegrationOptions>) => IntegrationFnResult & AnrInternal;
8
+ export declare const anrIntegration: AnrReturn;
9
+ export {};
3
10
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Event, Integration, IntegrationClass } from '@sentry/types';
3
2
  import { Debugger, InspectorNotification } from 'inspector';
4
- import { NodeClient } from '../../sdk/client';
5
3
  import { LocalVariablesIntegrationOptions, Variables } from './common';
6
4
  type OnPauseEvent = InspectorNotification<Debugger.PausedEventDataType>;
7
5
  export interface DebugSession {
@@ -20,15 +18,9 @@ type CallbackWrapper<T> = {
20
18
  };
21
19
  /** Creates a container for callbacks to be called sequentially */
22
20
  export declare function createCallbackList<T>(complete: Next<T>): CallbackWrapper<T>;
23
- export declare const localVariablesSyncIntegration: (options?: LocalVariablesIntegrationOptions | undefined, session?: DebugSession | undefined) => import("@sentry/types").IntegrationFnResult;
24
21
  /**
25
22
  * Adds local variables to exception frames.
26
- * @deprecated Use `localVariablesSyncIntegration()` instead.
27
23
  */
28
- export declare const LocalVariablesSync: IntegrationClass<Integration & {
29
- processEvent: (event: Event) => Event;
30
- setup: (client: NodeClient) => void;
31
- }> & (new (options?: LocalVariablesIntegrationOptions, session?: DebugSession) => Integration);
32
- export type LocalVariablesSync = typeof LocalVariablesSync;
24
+ export declare const localVariablesSyncIntegration: (options?: LocalVariablesIntegrationOptions | undefined, session?: DebugSession | undefined) => import("@sentry/types").IntegrationFnResult;
33
25
  export {};
34
26
  //# sourceMappingURL=local-variables-sync.d.ts.map
@@ -1,6 +1,7 @@
1
1
  export declare const NODE_VERSION: {
2
- major: number | undefined;
3
- minor: number | undefined;
2
+ major: number;
3
+ minor: number;
4
+ patch: number;
4
5
  };
5
6
  export declare const NODE_MAJOR: number;
6
7
  //# sourceMappingURL=nodeVersion.d.ts.map
@@ -1,18 +1,8 @@
1
- import { Client, StackParser } from '@sentry/types';
2
- import { Hub } from '@sentry/types';
3
- /** Get the currently active client. */
4
- export declare function getClient<C extends Client>(): C;
1
+ import { StackParser } from '@sentry/types';
5
2
  /**
6
3
  * Returns a release dynamically from environment variables.
7
4
  */
8
5
  export declare function getSentryRelease(fallback?: string): string | undefined;
9
6
  /** Node.js stack parser */
10
7
  export declare const defaultStackParser: StackParser;
11
- /**
12
- * This method is a noop and only here to ensure vite-plugin v0.6.0 (which is used by Sveltekit) still works,
13
- * as that uses this.
14
- *
15
- * @deprecated This will be removed before v8 is finalized.
16
- */
17
- export declare function makeMain(hub: Hub): Hub;
18
8
  //# sourceMappingURL=api.d.ts.map
@@ -3,7 +3,7 @@ import { NodeClient } from './client';
3
3
  /**
4
4
  * Initialize OpenTelemetry for Node.
5
5
  */
6
- export declare function initOtel(): void;
6
+ export declare function initOpenTelemetry(client: NodeClient): void;
7
7
  /** Just exported for tests. */
8
8
  export declare function setupOtel(client: NodeClient): BasicTracerProvider;
9
9
  //# sourceMappingURL=initOtel.d.ts.map
@@ -1,6 +0,0 @@
1
- import type { Hub } from '@sentry/types';
2
- /**
3
- * Calls global extension method and binding current instance to the function call
4
- */
5
- export declare function callExtensionMethod<T>(hub: Hub, method: string, ...args: any[]): T;
6
- //# sourceMappingURL=globals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/sdk/globals.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIzC;;GAEG;AAGH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAQlF"}
@@ -1,7 +0,0 @@
1
- import type { Hub } from '@sentry/types';
2
- /**
3
- * This is for legacy reasons, and returns a proxy object instead of a hub to be used.
4
- * @deprecated Use the methods directly.
5
- */
6
- export declare function getCurrentHub(): Hub;
7
- //# sourceMappingURL=hub.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../../src/sdk/hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,GAAG,EAAuD,MAAM,eAAe,CAAC;AAmBjH;;;GAGG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAkEnC"}
@@ -1,6 +0,0 @@
1
- import { Hub } from '@sentry/types';
2
- /**
3
- * Calls global extension method and binding current instance to the function call
4
- */
5
- export declare function callExtensionMethod<T>(hub: Hub, method: string, ...args: any[]): T;
6
- //# sourceMappingURL=globals.d.ts.map
@@ -1,7 +0,0 @@
1
- import { Hub } from '@sentry/types';
2
- /**
3
- * This is for legacy reasons, and returns a proxy object instead of a hub to be used.
4
- * @deprecated Use the methods directly.
5
- */
6
- export declare function getCurrentHub(): Hub;
7
- //# sourceMappingURL=hub.d.ts.map