HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/base.komma.pro/node_modules/@sentry/core/esm/request.js.map
{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAehD,6CAA6C;AAC7C,MAAM,UAAU,oBAAoB,CAAC,KAAY,EAAE,GAAQ;IACzD,IAAM,WAAW,GAAG,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC;IAEjD,IAAM,GAAG,GAAkB;QACzB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAC3B,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,qCAAqC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,kCAAkC,EAAE;KAC1G,CAAC;IAEF,4CAA4C;IAE5C,0EAA0E;IAC1E,8EAA8E;IAC9E,8EAA8E;IAC9E,gCAAgC;IAChC,IAAI,WAAW,EAAE;QACf,IAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC;YACrC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,6FAA6F;YAC7F,8FAA8F;YAC9F,OAAO,EAAE,IAAI,IAAI,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;SAC1D,CAAC,CAAC;QACH,IAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,IAAI,EAAE,KAAK,CAAC,IAAI;SAcjB,CAAC,CAAC;QACH,4EAA4E;QAC5E,6BAA6B;QAC7B,EAAE;QACF,wEAAwE;QACxE,IAAM,QAAQ,GAAM,eAAe,UAAK,WAAW,UAAK,GAAG,CAAC,IAAM,CAAC;QACnE,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC;KACrB;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { Event } from '@sentry/types';\nimport { timestampWithMs } from '@sentry/utils';\n\nimport { API } from './api';\n\n/** A generic client request. */\ninterface SentryRequest {\n  body: string;\n  url: string;\n  // headers would contain auth & content-type headers for @sentry/node, but\n  // since @sentry/browser avoids custom headers to prevent CORS preflight\n  // requests, we can use the same approach for @sentry/browser and @sentry/node\n  // for simplicity -- no headers involved.\n  // headers: { [key: string]: string };\n}\n\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event: Event, api: API): SentryRequest {\n  const useEnvelope = event.type === 'transaction';\n\n  const req: SentryRequest = {\n    body: JSON.stringify(event),\n    url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n  };\n\n  // https://develop.sentry.dev/sdk/envelopes/\n\n  // Since we don't need to manipulate envelopes nor store them, there is no\n  // exported concept of an Envelope with operations including serialization and\n  // deserialization. Instead, we only implement a minimal subset of the spec to\n  // serialize events inline here.\n  if (useEnvelope) {\n    const envelopeHeaders = JSON.stringify({\n      event_id: event.event_id,\n      // We need to add * 1000 since we divide it by 1000 by default but JS works with ms precision\n      // The reason we use timestampWithMs here is that all clocks across the SDK use the same clock\n      sent_at: new Date(timestampWithMs() * 1000).toISOString(),\n    });\n    const itemHeaders = JSON.stringify({\n      type: event.type,\n      // The content-type is assumed to be 'application/json' and not part of\n      // the current spec for transaction items, so we don't bloat the request\n      // body with it.\n      //\n      // content_type: 'application/json',\n      //\n      // The length is optional. It must be the number of bytes in req.Body\n      // encoded as UTF-8. Since the server can figure this out and would\n      // otherwise refuse events that report the length incorrectly, we decided\n      // not to send the length to avoid problems related to reporting the wrong\n      // size and to reduce request body size.\n      //\n      // length: new TextEncoder().encode(req.body).length,\n    });\n    // The trailing newline is optional. We intentionally don't send it to avoid\n    // sending unnecessary bytes.\n    //\n    // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n    const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}`;\n    req.body = envelope;\n  }\n\n  return req;\n}\n"]}