@sentry/node
Advanced tools
Comparing version 8.14.0 to 8.15.0
@@ -14,3 +14,3 @@ var { | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjE0LjAgKDM2OTJhNTIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyB0fWZyb20ibm9kZTppbnNwZWN0b3IiO2ltcG9ydHtwYXJlbnRQb3J0IGFzIG4sd29ya2VyRGF0YSBhcyBlfWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIHIsc2VwIGFzIG99ZnJvbSJub2RlOnBhdGgiO2ltcG9ydCphcyBzIGZyb20ibm9kZTpodHRwIjtpbXBvcnQqYXMgaSBmcm9tIm5vZGU6aHR0cHMiO2ltcG9ydHtSZWFkYWJsZSBhcyBjfWZyb20ibm9kZTpzdHJlYW0iO2ltcG9ydHtjcmVhdGVHemlwIGFzIHV9ZnJvbSJub2RlOnpsaWIiO2ltcG9ydCphcyBhIGZyb20ibm9kZTpuZXQiO2ltcG9ydCphcyBmIGZyb20ibm9kZTp0bHMiO2NvbnN0IGg9T2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztmdW5jdGlvbiBwKHQsbil7cmV0dXJuIGguY2FsbCh0KT09PWBbb2JqZWN0ICR7bn1dYH1mdW5jdGlvbiBkKHQpe3JldHVybiBwKHQsIlN0cmluZyIpfWZ1bmN0aW9uIGwodCl7cmV0dXJuIHAodCwiT2JqZWN0Iil9ZnVuY3Rpb24gbSh0KXtyZXR1cm4gQm9vbGVhbih0JiZ0LnRoZW4mJiJmdW5jdGlvbiI9PXR5cGVvZiB0LnRoZW4pfWZ1bmN0aW9uIHkodCxuKXt0cnl7cmV0dXJuIHQgaW5zdGFuY2VvZiBufWNhdGNoKHQpe3JldHVybiExfX1jb25zdCBnPSI4LjE0LjAiLG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kNufT1mdW5jdGlvbih0LG4sZSxyKXtjb25zdCBvPXQoKTtsZXQgcz0hMSxpPSEwO3JldHVybiBzZXRJbnRlcnZhbCgoKCk9Pntjb25zdCB0PW8uZ2V0VGltZU1zKCk7ITE9PT1zJiZ0Pm4rZSYmKHM9ITAsaSYmcigpKSx0PG4rZSYmKHM9ITEpfSksMjApLHtwb2xsOigpPT57by5yZXNldCgpfSxlbmFibGVkOnQ9PntpPXR9fX0oKGZ1bmN0aW9uKCl7bGV0IHQ9cHJvY2Vzcy5ocnRpbWUoKTtyZXR1cm57Z2V0VGltZU1zOigpPT57Y29uc3RbbixlXT1wcm9jZXNzLmhydGltZSh0KTtyZXR1cm4gTWF0aC5mbG9vcigxZTMqbitlLzFlNil9LHJlc2V0OigpPT57dD1wcm9jZXNzLmhydGltZSgpfX19KSx5bi5wb2xsSW50ZXJ2YWwseW4uYW5yVGhyZXNob2xkLChmdW5jdGlvbigpe3ZuKCJXYXRjaGRvZyB0aW1lb3V0Iiksa24/KHZuKCJQYXVzaW5nIGRlYnVnZ2VyIHRvIGNhcHR1cmUgc3RhY2sgdHJhY2UiKSxrbigpKToodm4oIkNhcHR1cmluZyBldmVudCB3aXRob3V0IGEgc3RhY2sgdHJhY2UiKSxObigpLnRoZW4obnVsbCwoKCk9Pnt2bigiU2VuZGluZyBBTlIgZXZlbnQgZmFpbGVkIG9uIHdhdGNoZG9nIHRpbWVvdXQuIil9KSkpfSkpO24/Lm9uKCJtZXNzYWdlIiwodD0+e3Quc2Vzc2lvbiYmKGduPWd0KHQuc2Vzc2lvbikpLENuKCl9KSk7'; | ||
@@ -17,0 +17,0 @@ const DEFAULT_INTERVAL = 50; |
@@ -13,3 +13,3 @@ var { | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjE0LjAgKDM2OTJhNTIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdC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ZhbCgoKCk9PnswPT09aT9vPmUmJihyKj0yLHQocikscj44NjQwMCYmKHI9ODY0MDApLGk9cik6KGktPTEsMD09PWkmJm4oKSksbz0wfSksMWUzKS51bnJlZigpLCgpPT57bys9MX19KGUsKGFzeW5jKCk9Pnt2KCJSYXRlLWxpbWl0IGxpZnRlZC4iKSxhd2FpdCBuLnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6ImFsbCJ9KX0pLChhc3luYyBlPT57dihgUmF0ZS1saW1pdCBleGNlZWRlZC4gRGlzYWJsaW5nIGNhcHR1cmluZyBvZiBjYXVnaHQgZXhjZXB0aW9ucyBmb3IgJHtlfSBzZWNvbmRzLmApLGF3YWl0IG4ucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZToidW5jYXVnaHQifSl9KSl9fSkoKS5jYXRjaCgoZT0+e3YoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSksc2V0SW50ZXJ2YWwoKCgpPT57fSksMWU0KTs='; | ||
@@ -16,0 +16,0 @@ function log(...args) { |
@@ -58,3 +58,3 @@ var { | ||
server.events.on('request', (request, event) => { | ||
server.events.on({ name: 'request', channels: ['error'] }, (request, event) => { | ||
if (core.getIsolationScope() !== core.getDefaultIsolationScope()) { | ||
@@ -61,0 +61,0 @@ const route = request.route; |
@@ -8,3 +8,3 @@ import { _optionalChain, _optionalChainDelete } from '@sentry/utils'; | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjE0LjAgKDM2OTJhNTIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyB0fWZyb20ibm9kZTppbnNwZWN0b3IiO2ltcG9ydHtwYXJlbnRQb3J0IGFzIG4sd29ya2VyRGF0YSBhcyBl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1zOigpPT57Y29uc3RbbixlXT1wcm9jZXNzLmhydGltZSh0KTtyZXR1cm4gTWF0aC5mbG9vcigxZTMqbitlLzFlNil9LHJlc2V0OigpPT57dD1wcm9jZXNzLmhydGltZSgpfX19KSx5bi5wb2xsSW50ZXJ2YWwseW4uYW5yVGhyZXNob2xkLChmdW5jdGlvbigpe3ZuKCJXYXRjaGRvZyB0aW1lb3V0Iiksa24/KHZuKCJQYXVzaW5nIGRlYnVnZ2VyIHRvIGNhcHR1cmUgc3RhY2sgdHJhY2UiKSxrbigpKToodm4oIkNhcHR1cmluZyBldmVudCB3aXRob3V0IGEgc3RhY2sgdHJhY2UiKSxObigpLnRoZW4obnVsbCwoKCk9Pnt2bigiU2VuZGluZyBBTlIgZXZlbnQgZmFpbGVkIG9uIHdhdGNoZG9nIHRpbWVvdXQuIil9KSkpfSkpO24/Lm9uKCJtZXNzYWdlIiwodD0+e3Quc2Vzc2lvbiYmKGduPWd0KHQuc2Vzc2lvbikpLENuKCl9KSk7'; | ||
@@ -11,0 +11,0 @@ const DEFAULT_INTERVAL = 50; |
@@ -1,2 +0,2 @@ | ||
/*! @sentry/node 8.14.0 (3692a52) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h=Object.prototype.toString;function p(t,n){return h.call(t)===`[object ${n}]`}function d(t){return p(t,"String")}function l(t){return p(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t,n){try{return t instanceof n}catch(t){return!1}}const g="8.14.0",b=globalThis;function v(t,n,e){const r=e||b,o=r.__SENTRY__=r.__SENTRY__||{},s=o[g]=o[g]||{};return s[t]||(s[t]=n())}const _=b,w=80;function S(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(_.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&d(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}const $="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,E=["debug","info","warn","error","log","assert","trace"],x={};function N(t){if(!("console"in b))return t();const n=b.console,e={},r=Object.keys(x);r.forEach((t=>{const r=x[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const k=function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return $?E.forEach((e=>{n[e]=(...n)=>{t&&N((()=>{b.console[e](`Sentry Logger [${e}]:`,...n)}))}})):E.forEach((t=>{n[t]=()=>{}})),n}();function C(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 D 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}}function T(t){if(function(t){switch(h.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,...j(t)};if(n=t,"undefined"!=typeof Event&&y(n,Event)){const n={type:t.type,target:O(t.target),currentTarget:O(t.currentTarget),...j(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,h=!Array.isArray(n)&&n.maxStringLength||w;for(;e&&s++<r&&(a=S(e,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)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 j(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 R(t){return A(t,new Map)}function A(t,n){if(function(t){if(!l(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]=A(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(A(t,n))})),r}return t}const I=50,P="?",U=/captureMessage|captureException/;function M(t){return t[t.length-1]||{}}const L="<anonymous>";const B=1e3;function G(){return Date.now()/B}const J=function(){const{performance:t}=b;if(!t||!t.now)return G;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/B}();function z(){const t=b,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 H(t,n=100,e=1/0){try{return W("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function W(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.isNaN(n))return n;const c=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("object"==typeof(e=n)&&null!==e&&(e.__isVue||e.o))return"[VueViewModel]";if(function(t){return l(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||L}catch(t){return L}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===u)return c.replace("object ","");if(s(n))return"[Circular ~]";const a=n;if(a&&"function"==typeof a.toJSON)try{return W("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=T(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const n=p[t];f[t]=W(t,n,u-1,r,o),h++}return i(n),f}function Y(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{performance:t}=b;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 q=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function F(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=q.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 K;function V(t){return new Z((n=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(K||(K={}));class Z{constructor(t){Z.prototype.__init.call(this),Z.prototype.__init2.call(this),Z.prototype.__init3.call(this),Z.prototype.__init4.call(this),this.i=K.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new Z(((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.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Z(((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.h=t=>{this.m(K.RESOLVED,t)}}__init2(){this.p=t=>{this.m(K.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===K.PENDING&&(m(n)?n.then(this.h,this.p):(this.i=t,this.v=n,this.l()))}}__init4(){this.l=()=>{if(this.i===K.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===K.RESOLVED&&t[1](this.v),this.i===K.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Q(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new D("Not adding Promise because buffer limit was reached."),new Z(((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 Z(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{V(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function X(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 tt="sentry-",nt=/^sentry-/;function et(t){const n=function(t){if(!t||!d(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=rt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return rt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(nt)){t[n.slice(tt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function rt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}function ot(t,n=[]){return[t,n]}function st(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function it(t){return b.__SENTRY__&&b.__SENTRY__.encodePolyfill?b.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function ct(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[it(r),t]:r.push("string"==typeof t?it(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(H(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 ut={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function at(t){return ut[t]}function ft(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const ht=6e4;function pt(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,,,s]=t.split(":",5),i=parseInt(n,10),c=1e3*(isNaN(i)?60:i);if(e)for(const t of e.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}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)?ht:r-n}(i,r):429===n&&(o.all=r+6e4);return o}function dt(){return{traceId:z(),spanId:z().substring(16)}}const lt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function mt(){return yt(b),b}function yt(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||g,n[g]=n[g]||{}}function gt(t){const n=J(),e={sid:z(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return R({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&&bt(e,t),e}function bt(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||J(),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:z()),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)}const vt="_sentrySpan";function _t(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){$&&k.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,vt,n):delete t[vt]}function wt(t){return t[vt]}class St{constructor(){this._=!1,this.S=[],this.N=[],this.k=[],this.C=[],this.D={},this.T={},this.O={},this.j={},this.R={},this.A=dt()}clone(){const t=new St;return t.k=[...this.k],t.T={...this.T},t.O={...this.O},t.j={...this.j},t.D=this.D,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.C=[...this.C],t.R={...this.R},t.A={...this.A},t.B=this.B,t.G=this.G,_t(t,wt(this)),t}setClient(t){this.B=t}setLastEventId(t){this.G=t}getClient(){return this.B}lastEventId(){return this.G}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.D=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&&bt(this.P,{user:t}),this.J(),this}getUser(){return this.D}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.T={...this.T,...t},this.J(),this}setTag(t,n){return this.T={...this.T,[t]:n},this.J(),this}setExtras(t){return this.O={...this.O,...t},this.J(),this}setExtra(t,n){return this.O={...this.O,[t]:n},this.J(),this}setFingerprint(t){return this.M=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.U=t,this.J(),this}setContext(t,n){return null===n?delete this.j[t]:this.j[t]=n,this.J(),this}setSession(t){return t?this.P=t:delete this.P,this.J(),this}getSession(){return this.P}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof $t?[n.getScopeData(),n.getRequestSession()]:l(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.T={...this.T,...o},this.O={...this.O,...s},this.j={...this.j,...c},i&&Object.keys(i).length&&(this.D=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.A=f),r&&(this.L=r),this}clear(){return this.k=[],this.T={},this.O={},this.D={},this.j={},this.I=void 0,this.U=void 0,this.M=void 0,this.L=void 0,this.P=void 0,_t(this,void 0),this.C=[],this.A=dt(),this.J(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:G(),...t},o=this.k;return o.push(r),this.k=o.length>e?o.slice(-e):o,this.J(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.J(),this}addAttachment(t){return this.C.push(t),this}clearAttachments(){return this.C=[],this}getScopeData(){return{breadcrumbs:this.k,attachments:this.C,contexts:this.j,tags:this.T,extra:this.O,user:this.D,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.R,transactionName:this.U,span:wt(this)}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:z();if(!this.B)return k.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:z();if(!this.B)return k.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:z();return this.B?(this.B.captureEvent(t,{...n,event_id:e},this),e):(k.warn("No client configured on scope - will not capture event!"),e)}J(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const $t=St;class Et{constructor(t,n){let e,r;e=t||new $t,r=n||new $t,this.H=[{scope:e}],this.W=r}withScope(t){const n=this.Y();let e;try{e=t(n)}catch(t){throw this.q(),t}return m(e)?e.then((t=>(this.q(),t)),(t=>{throw this.q(),t})):(this.q(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStack(){return this.H}getStackTop(){return this.H[this.H.length-1]}Y(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}q(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function xt(){const t=yt(mt());return t.stack=t.stack||new Et(v("defaultCurrentScope",(()=>new $t)),v("defaultIsolationScope",(()=>new $t)))}function Nt(t){return xt().withScope(t)}function kt(t,n){const e=xt();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function Ct(t){return xt().withScope((()=>t(xt().getIsolationScope())))}function Dt(t){const n=yt(t);return n.acs?n.acs:{withIsolationScope:Ct,withScope:Nt,withSetScope:kt,withSetIsolationScope:(t,n)=>Ct(n),getCurrentScope:()=>xt().getScope(),getIsolationScope:()=>xt().getIsolationScope()}}function Tt(){return Dt(mt()).getCurrentScope().getClient()}const Ot="_sentryMetrics";function jt(t){const n=t[Ot];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(R(r))}return e}const Rt="sentry.source",At="sentry.sample_rate",It="sentry.op",Pt="sentry.origin",Ut=0,Mt=1,Lt=1;function Bt(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=zt(t);return R({parent_span_id:r,span_id:n,trace_id:e})}function Gt(t){return"number"==typeof t?Jt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Jt(t.getTime()):J()}function Jt(t){return t>9999999999?t/1e3:t}function zt(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return R({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:Gt(o),timestamp:Gt(i)||void 0,status:Ht(u),op:r[It],origin:r[Pt],_metrics_summary:jt(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Ht(t){if(t&&t.code!==Ut)return t.code===Mt?"ok":t.message||"unknown_error"}const Wt="_sentryRootSpan";function Yt(t){return t[Wt]||t}const qt="production",Ft="_frozenDsc";function Kt(t){const n=Tt();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=R({environment:e.environment||qt,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(zt(t).trace_id||"",n),r=Yt(t),o=r[Ft];if(o)return o;const s=r.spanContext().traceState,i=s&&s.get("sentry.dsc"),c=i&&et(i);if(c)return c;const u=zt(r),a=u.data||{},f=a[At];null!=f&&(e.sample_rate=`${f}`);const h=a[Rt],p=u.description;return"url"!==h&&p&&(e.transaction=p),e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===Lt}(r)),n.emit("createDsc",e,r),e}function Vt(t,n,e,r){const o=ft(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:C(r)},...o&&{trace:R({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return ot(i,[[{type:s},t]])}const Zt="__SENTRY_SUPPRESS_TRACING__";function Qt(t){const n=Dt(mt());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=Dt(mt());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}((n=>(n.setSDKProcessingMetadata({[Zt]:!0}),t())))}function Xt(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:s,level:i,transactionName:c}=n,u=R(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=R(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=R(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=R(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:Bt(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Kt(n),...t.sdkProcessingMetadata};const e=Yt(n),r=zt(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const tn="7";function nn(t,n){return e={sentry_key:t.publicKey,sentry_version:tn,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const en=64;function rn(t,n,e=Q(t.bufferSize||en)){let r={};return{send:function(o){const s=[];if(st(o,((n,e)=>{const o=at(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=on(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(n)})),0===s.length)return V({});const i=ot(o[0],s),c=n=>{st(i,((e,r)=>{const o=on(e,r);t.recordDroppedEvent(n,at(r),o)}))};return e.add((()=>n({body:ct(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&<&&k.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=pt(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof D)return lt&&k.error("Skipped sending event because buffer is full."),c("queue_overflow"),V({});throw t}))},flush:t=>e.drain(t)}}function on(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const sn=Symbol("AgentBaseInternalState");class cn extends s.Agent{[sn];options;keepAlive;constructor(t){super(t),this[sn]={}}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 s.Agent)return o.addRequest(t,r);this[sn].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[sn].currentSocket;if(this[sn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[sn].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[sn]&&(this[sn].defaultPort=t)}get protocol(){return this[sn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[sn]&&(this[sn].protocol=t)}}function un(...t){k.log("[https-proxy-agent:parse-proxy-response]",...t)}function an(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 un("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(),e(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),d=+(p[1]||0),l=p.slice(2).join(" "),m={};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=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}un("got proxy server response: %o %o",h,m),i(),n({connect:{statusCode:d,statusText:l,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(),un("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),un("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function fn(...t){k.log("[https-proxy-agent]",...t)}class hn extends cn{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,n){super(n),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=n?.headers??{},fn("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const e=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?dn(n,"headers"):null,host:e,port:r}}async connect(t,n){const{proxy:e}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if("https:"===e.protocol){fn("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 fn("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=an(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",pn),n.secureEndpoint){fn("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...dn(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=>{fn("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function pn(t){t.resume()}function dn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const ln=32768;function mn(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const yn=e;let gn,bn=!1;function vn(t){yn.debug&&console.log(`[ANR Worker] ${t}`)}var _n,wn,Sn;const $n=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.")})),rn(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 hn(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return Qt((()=>{const n=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(((h,p)=>{let d=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const l={...t.headers};f.body.length>ln&&(l["content-encoding"]="gzip",d=d.pipe(u()));const m=n.request({method:"POST",agent:e,headers:l,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const n=t.headers["retry-after"]??null,e=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":n,"x-sentry-rate-limits":Array.isArray(e)?e[0]||null:e}})}));m.on("error",p),d.pipe(m)}))}}(t,t.httpModule??o,f);return rn(t,n)}))}({url:(_n=yn.dsn,wn=yn.tunnel,Sn=yn.sdkMetadata.sdk,wn||`${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/`}(_n)}?${nn(_n,Sn)}`),recordDroppedEvent:()=>{}});async function En(){if(gn){vn("Sending abnormal session"),bt(gn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=ft(e);return ot({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:C(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(gn,yn.dsn,yn.sdkMetadata,yn.tunnel);vn(JSON.stringify(t)),await $n.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function xn(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(M(n).function||"")&&n.pop(),n.reverse(),U.test(M(n).function||"")&&(n.pop(),U.test(M(n).function||"")&&n.pop()),n.slice(0,I).map((t=>({...t,filename:t.filename||M(n).filename,function:t.function||P})))}(t);if(yn.appRootPath)for(const t of n)t.filename&&(t.filename=Y(t.filename,yn.appRootPath));return n}async function Nn(t,n){if(bn)return;bn=!0,await En(),vn("Sending event");const e={event_id:z(),contexts:yn.contexts,release:yn.release,environment:yn.environment,dist:yn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${yn.anrThreshold} ms`,stacktrace:{frames:xn(t)},mechanism:{type:"ANR"}}]},tags:yn.staticTags};n&&function(t,n){if(Xt(t,n),!t.contexts?.trace){const{traceId:e,spanId:r,parentSpanId:o}=n.propagationContext;t.contexts={trace:{trace_id:e,span_id:r,parent_span_id:o},...t.contexts}}}(e,n);const r=Vt(e,yn.dsn,yn.sdkMetadata,yn.tunnel);vn(JSON.stringify(r)),await $n.send(r),await $n.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let kn;if(vn("Started"),yn.captureStackTrace){vn("Connecting to debugger");const n=new t;n.connectToMainThread(),vn("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{vn("Debugger paused");const s=[...t.params.callFrames],i=yn.appRootPath?function(t=(process.argv[1]?F(process.argv[1]):process.cwd()),n="\\"===o){const e=n?mn(t):t;return t=>{if(!t)return;const o=n?mn(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}}(yn.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 R({filename:r,module:e(r),function:t.functionName||P,colno:o,lineno:s,in_app:r?X(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{Nn(c).then(null,(()=>{vn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&vn(`Error executing script: '${t.message}'`),clearTimeout(u);const r=e&&e.result?e.result.value:void 0;n.post("Debugger.resume"),n.post("Debugger.disable"),Nn(c,r).then(null,(()=>{vn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),kn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Cn}=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()}}}),yn.pollInterval,yn.anrThreshold,(function(){vn("Watchdog timeout"),kn?(vn("Pausing debugger to capture stack trace"),kn()):(vn("Capturing event without a stack trace"),Nn().then(null,(()=>{vn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(gn=gt(t.session)),Cn()})); | ||
/*! @sentry/node 8.15.0 (b1e0598) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h=Object.prototype.toString;function p(t,n){return h.call(t)===`[object ${n}]`}function d(t){return p(t,"String")}function l(t){return p(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t,n){try{return t instanceof n}catch(t){return!1}}const g="8.15.0",b=globalThis;function v(t,n,e){const r=e||b,o=r.__SENTRY__=r.__SENTRY__||{},s=o[g]=o[g]||{};return s[t]||(s[t]=n())}const _=b,w=80;function S(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(_.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&d(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}const $="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,E=["debug","info","warn","error","log","assert","trace"],x={};function N(t){if(!("console"in b))return t();const n=b.console,e={},r=Object.keys(x);r.forEach((t=>{const r=x[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const k=function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return $?E.forEach((e=>{n[e]=(...n)=>{t&&N((()=>{b.console[e](`Sentry Logger [${e}]:`,...n)}))}})):E.forEach((t=>{n[t]=()=>{}})),n}();function C(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 D 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}}function T(t){if(function(t){switch(h.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,...j(t)};if(n=t,"undefined"!=typeof Event&&y(n,Event)){const n={type:t.type,target:O(t.target),currentTarget:O(t.currentTarget),...j(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,h=!Array.isArray(n)&&n.maxStringLength||w;for(;e&&s++<r&&(a=S(e,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)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 j(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 R(t){return A(t,new Map)}function A(t,n){if(function(t){if(!l(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]=A(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(A(t,n))})),r}return t}const I=50,P="?",U=/captureMessage|captureException/;function M(t){return t[t.length-1]||{}}const L="<anonymous>";const B=1e3;function G(){return Date.now()/B}const J=function(){const{performance:t}=b;if(!t||!t.now)return G;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/B}();function z(){const t=b,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 H(t,n=100,e=1/0){try{return W("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function W(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.isNaN(n))return n;const c=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("object"==typeof(e=n)&&null!==e&&(e.__isVue||e.o))return"[VueViewModel]";if(function(t){return l(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||L}catch(t){return L}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===u)return c.replace("object ","");if(s(n))return"[Circular ~]";const a=n;if(a&&"function"==typeof a.toJSON)try{return W("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=T(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const n=p[t];f[t]=W(t,n,u-1,r,o),h++}return i(n),f}function Y(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{performance:t}=b;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 q=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function F(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=q.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 K;function V(t){return new Z((n=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(K||(K={}));class Z{constructor(t){Z.prototype.__init.call(this),Z.prototype.__init2.call(this),Z.prototype.__init3.call(this),Z.prototype.__init4.call(this),this.i=K.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new Z(((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.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Z(((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.h=t=>{this.m(K.RESOLVED,t)}}__init2(){this.p=t=>{this.m(K.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===K.PENDING&&(m(n)?n.then(this.h,this.p):(this.i=t,this.v=n,this.l()))}}__init4(){this.l=()=>{if(this.i===K.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===K.RESOLVED&&t[1](this.v),this.i===K.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Q(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new D("Not adding Promise because buffer limit was reached."),new Z(((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 Z(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{V(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function X(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 tt="sentry-",nt=/^sentry-/;function et(t){const n=function(t){if(!t||!d(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=rt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return rt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(nt)){t[n.slice(tt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function rt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}function ot(t,n=[]){return[t,n]}function st(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function it(t){return b.__SENTRY__&&b.__SENTRY__.encodePolyfill?b.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function ct(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[it(r),t]:r.push("string"==typeof t?it(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(H(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 ut={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function at(t){return ut[t]}function ft(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const ht=6e4;function pt(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,,,s]=t.split(":",5),i=parseInt(n,10),c=1e3*(isNaN(i)?60:i);if(e)for(const t of e.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}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)?ht:r-n}(i,r):429===n&&(o.all=r+6e4);return o}function dt(){return{traceId:z(),spanId:z().substring(16)}}const lt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function mt(){return yt(b),b}function yt(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||g,n[g]=n[g]||{}}function gt(t){const n=J(),e={sid:z(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return R({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&&bt(e,t),e}function bt(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||J(),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:z()),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)}const vt="_sentrySpan";function _t(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){$&&k.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,vt,n):delete t[vt]}function wt(t){return t[vt]}class St{constructor(){this._=!1,this.S=[],this.N=[],this.k=[],this.C=[],this.D={},this.T={},this.O={},this.j={},this.R={},this.A=dt()}clone(){const t=new St;return t.k=[...this.k],t.T={...this.T},t.O={...this.O},t.j={...this.j},t.D=this.D,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.C=[...this.C],t.R={...this.R},t.A={...this.A},t.B=this.B,t.G=this.G,_t(t,wt(this)),t}setClient(t){this.B=t}setLastEventId(t){this.G=t}getClient(){return this.B}lastEventId(){return this.G}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.D=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&&bt(this.P,{user:t}),this.J(),this}getUser(){return this.D}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.T={...this.T,...t},this.J(),this}setTag(t,n){return this.T={...this.T,[t]:n},this.J(),this}setExtras(t){return this.O={...this.O,...t},this.J(),this}setExtra(t,n){return this.O={...this.O,[t]:n},this.J(),this}setFingerprint(t){return this.M=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.U=t,this.J(),this}setContext(t,n){return null===n?delete this.j[t]:this.j[t]=n,this.J(),this}setSession(t){return t?this.P=t:delete this.P,this.J(),this}getSession(){return this.P}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof $t?[n.getScopeData(),n.getRequestSession()]:l(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.T={...this.T,...o},this.O={...this.O,...s},this.j={...this.j,...c},i&&Object.keys(i).length&&(this.D=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.A=f),r&&(this.L=r),this}clear(){return this.k=[],this.T={},this.O={},this.D={},this.j={},this.I=void 0,this.U=void 0,this.M=void 0,this.L=void 0,this.P=void 0,_t(this,void 0),this.C=[],this.A=dt(),this.J(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:G(),...t},o=this.k;return o.push(r),this.k=o.length>e?o.slice(-e):o,this.J(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.J(),this}addAttachment(t){return this.C.push(t),this}clearAttachments(){return this.C=[],this}getScopeData(){return{breadcrumbs:this.k,attachments:this.C,contexts:this.j,tags:this.T,extra:this.O,user:this.D,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.R,transactionName:this.U,span:wt(this)}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:z();if(!this.B)return k.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:z();if(!this.B)return k.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:z();return this.B?(this.B.captureEvent(t,{...n,event_id:e},this),e):(k.warn("No client configured on scope - will not capture event!"),e)}J(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const $t=St;class Et{constructor(t,n){let e,r;e=t||new $t,r=n||new $t,this.H=[{scope:e}],this.W=r}withScope(t){const n=this.Y();let e;try{e=t(n)}catch(t){throw this.q(),t}return m(e)?e.then((t=>(this.q(),t)),(t=>{throw this.q(),t})):(this.q(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStackTop(){return this.H[this.H.length-1]}Y(){const t=this.getScope().clone();return this.H.push({client:this.getClient(),scope:t}),t}q(){return!(this.H.length<=1)&&!!this.H.pop()}}function xt(){const t=yt(mt());return t.stack=t.stack||new Et(v("defaultCurrentScope",(()=>new $t)),v("defaultIsolationScope",(()=>new $t)))}function Nt(t){return xt().withScope(t)}function kt(t,n){const e=xt();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function Ct(t){return xt().withScope((()=>t(xt().getIsolationScope())))}function Dt(t){const n=yt(t);return n.acs?n.acs:{withIsolationScope:Ct,withScope:Nt,withSetScope:kt,withSetIsolationScope:(t,n)=>Ct(n),getCurrentScope:()=>xt().getScope(),getIsolationScope:()=>xt().getIsolationScope()}}function Tt(){return Dt(mt()).getCurrentScope().getClient()}const Ot="_sentryMetrics";function jt(t){const n=t[Ot];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(R(r))}return e}const Rt="sentry.source",At="sentry.sample_rate",It="sentry.op",Pt="sentry.origin",Ut=0,Mt=1,Lt=1;function Bt(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=zt(t);return R({parent_span_id:r,span_id:n,trace_id:e})}function Gt(t){return"number"==typeof t?Jt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Jt(t.getTime()):J()}function Jt(t){return t>9999999999?t/1e3:t}function zt(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return R({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:Gt(o),timestamp:Gt(i)||void 0,status:Ht(u),op:r[It],origin:r[Pt],_metrics_summary:jt(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Ht(t){if(t&&t.code!==Ut)return t.code===Mt?"ok":t.message||"unknown_error"}const Wt="_sentryRootSpan";function Yt(t){return t[Wt]||t}const qt="production",Ft="_frozenDsc";function Kt(t){const n=Tt();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=R({environment:e.environment||qt,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(zt(t).trace_id||"",n),r=Yt(t),o=r[Ft];if(o)return o;const s=r.spanContext().traceState,i=s&&s.get("sentry.dsc"),c=i&&et(i);if(c)return c;const u=zt(r),a=u.data||{},f=a[At];null!=f&&(e.sample_rate=`${f}`);const h=a[Rt],p=u.description;return"url"!==h&&p&&(e.transaction=p),e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===Lt}(r)),n.emit("createDsc",e,r),e}function Vt(t,n,e,r){const o=ft(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:C(r)},...o&&{trace:R({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return ot(i,[[{type:s},t]])}const Zt="__SENTRY_SUPPRESS_TRACING__";function Qt(t){const n=Dt(mt());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=Dt(mt());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}((n=>(n.setSDKProcessingMetadata({[Zt]:!0}),t())))}function Xt(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:s,level:i,transactionName:c}=n,u=R(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=R(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=R(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=R(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:Bt(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Kt(n),...t.sdkProcessingMetadata};const e=Yt(n),r=zt(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const tn="7";function nn(t,n){return e={sentry_key:t.publicKey,sentry_version:tn,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const en=64;function rn(t,n,e=Q(t.bufferSize||en)){let r={};return{send:function(o){const s=[];if(st(o,((n,e)=>{const o=at(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=on(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(n)})),0===s.length)return V({});const i=ot(o[0],s),c=n=>{st(i,((e,r)=>{const o=on(e,r);t.recordDroppedEvent(n,at(r),o)}))};return e.add((()=>n({body:ct(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&<&&k.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=pt(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof D)return lt&&k.error("Skipped sending event because buffer is full."),c("queue_overflow"),V({});throw t}))},flush:t=>e.drain(t)}}function on(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const sn=Symbol("AgentBaseInternalState");class cn extends s.Agent{[sn];options;keepAlive;constructor(t){super(t),this[sn]={}}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 s.Agent)return o.addRequest(t,r);this[sn].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[sn].currentSocket;if(this[sn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[sn].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[sn]&&(this[sn].defaultPort=t)}get protocol(){return this[sn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[sn]&&(this[sn].protocol=t)}}function un(...t){k.log("[https-proxy-agent:parse-proxy-response]",...t)}function an(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 un("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(),e(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),d=+(p[1]||0),l=p.slice(2).join(" "),m={};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=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}un("got proxy server response: %o %o",h,m),i(),n({connect:{statusCode:d,statusText:l,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(),un("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),un("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function fn(...t){k.log("[https-proxy-agent]",...t)}class hn extends cn{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,n){super(n),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=n?.headers??{},fn("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const e=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?dn(n,"headers"):null,host:e,port:r}}async connect(t,n){const{proxy:e}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if("https:"===e.protocol){fn("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 fn("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=an(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",pn),n.secureEndpoint){fn("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...dn(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=>{fn("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function pn(t){t.resume()}function dn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const ln=32768;function mn(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const yn=e;let gn,bn=!1;function vn(t){yn.debug&&console.log(`[ANR Worker] ${t}`)}var _n,wn,Sn;const $n=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.")})),rn(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 hn(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return Qt((()=>{const n=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(((h,p)=>{let d=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const l={...t.headers};f.body.length>ln&&(l["content-encoding"]="gzip",d=d.pipe(u()));const m=n.request({method:"POST",agent:e,headers:l,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const n=t.headers["retry-after"]??null,e=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":n,"x-sentry-rate-limits":Array.isArray(e)?e[0]||null:e}})}));m.on("error",p),d.pipe(m)}))}}(t,t.httpModule??o,f);return rn(t,n)}))}({url:(_n=yn.dsn,wn=yn.tunnel,Sn=yn.sdkMetadata.sdk,wn||`${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/`}(_n)}?${nn(_n,Sn)}`),recordDroppedEvent:()=>{}});async function En(){if(gn){vn("Sending abnormal session"),bt(gn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=ft(e);return ot({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:C(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(gn,yn.dsn,yn.sdkMetadata,yn.tunnel);vn(JSON.stringify(t)),await $n.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function xn(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(M(n).function||"")&&n.pop(),n.reverse(),U.test(M(n).function||"")&&(n.pop(),U.test(M(n).function||"")&&n.pop()),n.slice(0,I).map((t=>({...t,filename:t.filename||M(n).filename,function:t.function||P})))}(t);if(yn.appRootPath)for(const t of n)t.filename&&(t.filename=Y(t.filename,yn.appRootPath));return n}async function Nn(t,n){if(bn)return;bn=!0,await En(),vn("Sending event");const e={event_id:z(),contexts:yn.contexts,release:yn.release,environment:yn.environment,dist:yn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${yn.anrThreshold} ms`,stacktrace:{frames:xn(t)},mechanism:{type:"ANR"}}]},tags:yn.staticTags};n&&function(t,n){if(Xt(t,n),!t.contexts?.trace){const{traceId:e,spanId:r,parentSpanId:o}=n.propagationContext;t.contexts={trace:{trace_id:e,span_id:r,parent_span_id:o},...t.contexts}}}(e,n);const r=Vt(e,yn.dsn,yn.sdkMetadata,yn.tunnel);vn(JSON.stringify(r)),await $n.send(r),await $n.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let kn;if(vn("Started"),yn.captureStackTrace){vn("Connecting to debugger");const n=new t;n.connectToMainThread(),vn("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{vn("Debugger paused");const s=[...t.params.callFrames],i=yn.appRootPath?function(t=(process.argv[1]?F(process.argv[1]):process.cwd()),n="\\"===o){const e=n?mn(t):t;return t=>{if(!t)return;const o=n?mn(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}}(yn.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 R({filename:r,module:e(r),function:t.functionName||P,colno:o,lineno:s,in_app:r?X(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{Nn(c).then(null,(()=>{vn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&vn(`Error executing script: '${t.message}'`),clearTimeout(u);const r=e&&e.result?e.result.value:void 0;n.post("Debugger.resume"),n.post("Debugger.disable"),Nn(c,r).then(null,(()=>{vn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),kn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Cn}=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()}}}),yn.pollInterval,yn.anrThreshold,(function(){vn("Watchdog timeout"),kn?(vn("Pausing debugger to capture stack trace"),kn()):(vn("Capturing event without a stack trace"),Nn().then(null,(()=>{vn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(gn=gt(t.session)),Cn()})); |
@@ -8,3 +8,3 @@ import { _optionalChain } from '@sentry/utils'; | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjE0LjAgKDM2OTJhNTIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIG4scGFyZW50UG9ydCBhcyB0fWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIG8sc2VwIGFzIHJ9ZnJvbSJub2RlOnBhdGgiO2NvbnN0IGk9NTAscz0iPyIsYz0vXChlcnJvcjogKC4qKVwpLyxhPS9jYXB0dXJlTWVzc2FnZXxjYXB0dXJlRXhjZXB0aW9uLztmdW5jdGlvbiB1KGUpe3JldHVybiBlW2UubGVuZ3RoLTFdfHx7fX1jb25zdCBmPS9eKFxTKzpcXHxcLz8pKFtcc1xTXSo/KSgoPzpcLnsxLDJ9fFteL1xcXSs/fCkoXC5bXi4vXFxdKnwpKSg/OlsvXFxdKikkLztmdW5jdGlvbiBsKGUpe2NvbnN0IG49ZnVuY3Rpb24oZSl7Y29uc3Qgbj1lLmxlbmd0aD4xMDI0P2A8dHJ1bmNhdGVkPiR7ZS5zbGljZSgtMTAyNCl9YDplLHQ9Z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(...args) { |
@@ -1,2 +0,2 @@ | ||
/*! @sentry/node 8.14.0 (3692a52) | https://github.com/getsentry/sentry-javascript */ | ||
/*! @sentry/node 8.15.0 (b1e0598) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as e}from"node:inspector/promises";import{workerData as n,parentPort as t}from"node:worker_threads";import{posix as o,sep as r}from"node:path";const i=50,s="?",c=/\(error: (.*)\)/,a=/captureMessage|captureException/;function u(e){return e[e.length-1]||{}}const f=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function l(e){const n=function(e){const n=e.length>1024?`<truncated>${e.slice(-1024)}`:e,t=f.exec(n);return t?t.slice(1):[]}(e),t=n[0]||"";let o=n[1];return t||o?(o&&(o=o.slice(0,o.length-1)),t+o):"."}function d(e,n=!1){return!(n||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==e&&!e.includes("node_modules/")}function p(e){const n=/^\s*[-]{4,}$/,t=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return o=>{const r=o.match(t);if(r){let n,t,o,i,c;if(r[1]){o=r[1];let e=o.lastIndexOf(".");if("."===o[e-1]&&e--,e>0){n=o.slice(0,e),t=o.slice(e+1);const r=n.indexOf(".Module");r>0&&(o=o.slice(r+1),n=n.slice(0,r))}i=void 0}t&&(i=n,c=t),"<anonymous>"===t&&(c=void 0,o=void 0),void 0===o&&(c=c||s,o=i?`${i}.${c}`:c);let a=r[2]&&r[2].startsWith("file://")?r[2].slice(7):r[2];const u="native"===r[5];return a&&a.match(/\/[A-Z]:/)&&(a=a.slice(1)),a||!r[5]||u||(a=r[5]),{filename:a,module:e?e(a):void 0,function:o,lineno:g(r[3]),colno:g(r[4]),in_app:d(a||"",u)}}if(o.match(n))return{filename:o}}}function g(e){return parseInt(e||"",10)||void 0}function m(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const b=n,$=function(...e){const n=e.sort(((e,n)=>e[0]-n[0])).map((e=>e[1]));return(e,t=0,o=0)=>{const r=[],f=e.split("\n");for(let e=t;e<f.length;e++){const t=f[e];if(t.length>1024)continue;const s=c.test(t)?t.replace(c,"$1"):t;if(!s.match(/\S*Error: /)){for(const e of n){const n=e(s);if(n){r.push(n);break}}if(r.length>=i+o)break}}return function(e){if(!e.length)return[];const n=Array.from(e);/sentryWrapped/.test(u(n).function||"")&&n.pop();n.reverse(),a.test(u(n).function||"")&&(n.pop(),a.test(u(n).function||"")&&n.pop());return n.slice(0,i).map((e=>({...e,filename:e.filename||u(n).filename,function:e.function||s})))}(r.slice(o))}}([90,p(function(e=(process.argv[1]?l(process.argv[1]):process.cwd()),n="\\"===r){const t=n?m(e):e;return e=>{if(!e)return;const r=n?m(e):e;let{dir:i,base:s,ext:c}=o.parse(r);".js"!==c&&".mjs"!==c&&".cjs"!==c||(s=s.slice(0,-1*c.length)),i||(i=".");const a=i.lastIndexOf("/node_modules");if(a>-1)return`${i.slice(a+14).replace(/\//g,".")}:${s}`;if(i.startsWith(t)){let e=i.slice(t.length+1).replace(/\//g,".");return e&&(e+=":"),e+=s,e}return s}}(b.basePath))]);function v(...e){b.debug&&console.log("[LocalVariables Worker]",...e)}async function w(e,n,t,o){const r=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0});o[t]=r.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,n)=>parseInt(e.name,10)-parseInt(n.name,10))).map((e=>e.value?.value))}async function y(e,n,t,o){const r=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0});o[t]=r.result.map((e=>[e.name,e.value?.value])).reduce(((e,[n,t])=>(e[n]=t,e)),{})}function h(e,n){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?n[e.name]=`<${e.value.value}>`:n[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?n[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(n[e.name]="<undefined>"))}async function P(e,n){const t=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0}),o={};for(const n of t.result)if(n?.value?.objectId&&"Array"===n?.value.className){const t=n.value.objectId;await w(e,t,n.name,o)}else if(n?.value?.objectId&&"Object"===n?.value?.className){const t=n.value.objectId;await y(e,t,n.name,o)}else n?.value&&h(n,o);return o}let x;(async function(){const n=new e;n.connectToMainThread(),v("Connected to main thread");let o=!1;n.on("Debugger.resumed",(()=>{o=!1})),n.on("Debugger.paused",(e=>{o=!0,async function(e,n,{reason:o,data:r,callFrames:i}){if("exception"!==o&&"promiseRejection"!==o)return;x?.();const s=function(e,n){if(void 0!==n)return function(e){if(void 0!==e)return e.slice(-10).reduce(((e,n)=>`${e},${n.function},${n.lineno},${n.colno}`),"")}(e(n,1))}(n,r?.description);if(null==s)return;const c=[];for(let n=0;n<i.length;n++){const{scopeChain:t,functionName:o,this:r}=i[n],s=t.find((e=>"local"===e.type)),a="global"!==r.className&&r.className?`${r.className}.${o}`:o;if(void 0===s?.object.objectId)c[n]={function:a};else{const t=await P(e,s.object.objectId);c[n]={function:a,vars:t}}}t?.postMessage({exceptionHash:s,frames:c})}(n,$,e.params).then((()=>o?n.post("Debugger.resume"):Promise.resolve()),(e=>{}))})),await n.post("Debugger.enable");const r=!1!==b.captureAllExceptions;if(await n.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"}),r){const e=b.maxExceptionsPerSecond||50;x=function(e,n,t){let o=0,r=5,i=0;return setInterval((()=>{0===i?o>e&&(r*=2,t(r),r>86400&&(r=86400),i=r):(i-=1,0===i&&n()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{v("Rate-limit lifted."),await n.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{v(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await n.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{v("Failed to start debugger",e)})),setInterval((()=>{}),1e4); |
@@ -53,3 +53,3 @@ import { _optionalChain } from '@sentry/utils'; | ||
server.events.on('request', (request, event) => { | ||
server.events.on({ name: 'request', channels: ['error'] }, (request, event) => { | ||
if (getIsolationScope() !== getDefaultIsolationScope()) { | ||
@@ -56,0 +56,0 @@ const route = request.route; |
{ | ||
"name": "@sentry/node", | ||
"version": "8.14.0", | ||
"version": "8.15.0", | ||
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation", | ||
@@ -91,6 +91,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"@prisma/instrumentation": "5.16.1", | ||
"@sentry/core": "8.14.0", | ||
"@sentry/opentelemetry": "8.14.0", | ||
"@sentry/types": "8.14.0", | ||
"@sentry/utils": "8.14.0" | ||
"@sentry/core": "8.15.0", | ||
"@sentry/opentelemetry": "8.15.0", | ||
"@sentry/types": "8.15.0", | ||
"@sentry/utils": "8.15.0" | ||
}, | ||
@@ -97,0 +97,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2353175
+ Added@sentry/core@8.15.0(transitive)
+ Added@sentry/opentelemetry@8.15.0(transitive)
+ Added@sentry/types@8.15.0(transitive)
+ Added@sentry/utils@8.15.0(transitive)
- Removed@sentry/core@8.14.0(transitive)
- Removed@sentry/opentelemetry@8.14.0(transitive)
- Removed@sentry/types@8.14.0(transitive)
- Removed@sentry/utils@8.14.0(transitive)
Updated@sentry/core@8.15.0
Updated@sentry/opentelemetry@8.15.0
Updated@sentry/types@8.15.0
Updated@sentry/utils@8.15.0