start-slicemachine 0.12.62-beta.4 → 0.12.62-beta.6

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.
Files changed (413) hide show
  1. package/dist/StartSliceMachineProcess.cjs +1 -4
  2. package/dist/StartSliceMachineProcess.cjs.map +1 -1
  3. package/dist/StartSliceMachineProcess.js +1 -4
  4. package/dist/StartSliceMachineProcess.js.map +1 -1
  5. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.cjs.map +1 -1
  6. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.js.map +1 -1
  7. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.cjs.map +1 -1
  8. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js +1 -1
  9. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js.map +1 -1
  10. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.cjs +1 -1
  11. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.cjs.map +1 -1
  12. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.js +1 -1
  13. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.js.map +1 -1
  14. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.cjs.map +1 -1
  15. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.js +1 -1
  16. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.js.map +1 -1
  17. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +1 -1
  18. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +1 -1
  19. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs.map +1 -1
  20. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js.map +1 -1
  21. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs +7 -13
  22. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +1 -1
  23. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js +8 -14
  24. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +1 -1
  25. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.cjs.map +1 -1
  26. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.js.map +1 -1
  27. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.cjs.map +1 -1
  28. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.js.map +1 -1
  29. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.cjs.map +1 -1
  30. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.js.map +1 -1
  31. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/linkederrors.cjs.map +1 -1
  32. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/linkederrors.js.map +1 -1
  33. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.cjs.map +1 -1
  34. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js +1 -1
  35. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js.map +1 -1
  36. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/aggregator.cjs.map +1 -1
  37. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/aggregator.js.map +1 -1
  38. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.cjs +1 -1
  39. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.cjs.map +1 -1
  40. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.js +1 -1
  41. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.js.map +1 -1
  42. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.cjs.map +1 -1
  43. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js +1 -1
  44. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js.map +1 -1
  45. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.cjs.map +1 -1
  46. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.js.map +1 -1
  47. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.cjs.map +1 -1
  48. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.js.map +1 -1
  49. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs.map +1 -1
  50. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js.map +1 -1
  51. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.cjs.map +1 -1
  52. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.js +1 -1
  53. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.js.map +1 -1
  54. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/server-runtime-client.cjs.map +1 -1
  55. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/server-runtime-client.js.map +1 -1
  56. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs +1 -3
  57. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +1 -1
  58. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js +1 -3
  59. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +1 -1
  60. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sessionflusher.cjs.map +1 -1
  61. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sessionflusher.js.map +1 -1
  62. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +1 -1
  63. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +1 -1
  64. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.cjs.map +1 -1
  65. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.js.map +1 -1
  66. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.cjs.map +1 -1
  67. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.js.map +1 -1
  68. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.cjs.map +1 -1
  69. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.js.map +1 -1
  70. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.cjs.map +1 -1
  71. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js +1 -1
  72. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js.map +1 -1
  73. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/spanstatus.cjs.map +1 -1
  74. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/spanstatus.js.map +1 -1
  75. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/trace.cjs.map +1 -1
  76. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/trace.js.map +1 -1
  77. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.cjs.map +1 -1
  78. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js +1 -1
  79. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js.map +1 -1
  80. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.cjs +1 -1
  81. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.cjs.map +1 -1
  82. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.js +1 -1
  83. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.js.map +1 -1
  84. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.cjs.map +1 -1
  85. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js +2 -2
  86. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js.map +1 -1
  87. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs.map +1 -1
  88. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js.map +1 -1
  89. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/hasTracingEnabled.cjs.map +1 -1
  90. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/hasTracingEnabled.js.map +1 -1
  91. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/isSentryRequestUrl.cjs.map +1 -1
  92. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js.map +1 -1
  93. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs +1 -1
  94. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +1 -1
  95. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js +2 -2
  96. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +1 -1
  97. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.cjs.map +1 -1
  98. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.js.map +1 -1
  99. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs.map +1 -1
  100. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js.map +1 -1
  101. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.cjs.map +1 -1
  102. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.js.map +1 -1
  103. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.cjs.map +1 -1
  104. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.js.map +1 -1
  105. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.cjs.map +1 -1
  106. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.js.map +1 -1
  107. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.cjs.map +1 -1
  108. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js.map +1 -1
  109. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.cjs.map +1 -1
  110. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.js.map +1 -1
  111. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.cjs.map +1 -1
  112. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.js.map +1 -1
  113. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.cjs.map +1 -1
  114. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.js.map +1 -1
  115. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/error.cjs.map +1 -1
  116. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/error.js.map +1 -1
  117. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs +1 -1
  118. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs.map +1 -1
  119. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js +1 -1
  120. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js.map +1 -1
  121. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.cjs.map +1 -1
  122. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.js.map +1 -1
  123. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/console.cjs.map +1 -1
  124. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/console.js.map +1 -1
  125. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalError.cjs.map +1 -1
  126. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalError.js.map +1 -1
  127. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.cjs.map +1 -1
  128. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js.map +1 -1
  129. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +1 -1
  130. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +1 -1
  131. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +1 -1
  132. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +1 -1
  133. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/lru.cjs.map +1 -1
  134. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/lru.js.map +1 -1
  135. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/memo.cjs.map +1 -1
  136. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/memo.js.map +1 -1
  137. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs +3 -3
  138. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +1 -1
  139. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js +3 -3
  140. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +1 -1
  141. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.cjs.map +1 -1
  142. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.js.map +1 -1
  143. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.cjs.map +1 -1
  144. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.js.map +1 -1
  145. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +1 -1
  146. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +1 -1
  147. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.cjs.map +1 -1
  148. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.js.map +1 -1
  149. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.cjs.map +1 -1
  150. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.js +1 -1
  151. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.js.map +1 -1
  152. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.cjs.map +1 -1
  153. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.js.map +1 -1
  154. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.cjs.map +1 -1
  155. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.js.map +1 -1
  156. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.cjs.map +1 -1
  157. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.js.map +1 -1
  158. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.cjs.map +1 -1
  159. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.js.map +1 -1
  160. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +1 -1
  161. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +1 -1
  162. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs.map +1 -1
  163. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js.map +1 -1
  164. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.cjs.map +1 -1
  165. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.js.map +1 -1
  166. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.cjs.map +1 -1
  167. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.js.map +1 -1
  168. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs +1 -1
  169. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs.map +1 -1
  170. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js +1 -1
  171. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js.map +1 -1
  172. package/dist/_node_modules/@sentry/node/esm/async/domain.cjs.map +1 -1
  173. package/dist/_node_modules/@sentry/node/esm/async/domain.js +1 -1
  174. package/dist/_node_modules/@sentry/node/esm/async/domain.js.map +1 -1
  175. package/dist/_node_modules/@sentry/node/esm/async/hooks.cjs.map +1 -1
  176. package/dist/_node_modules/@sentry/node/esm/async/hooks.js.map +1 -1
  177. package/dist/_node_modules/@sentry/node/esm/async/index.cjs.map +1 -1
  178. package/dist/_node_modules/@sentry/node/esm/async/index.js.map +1 -1
  179. package/dist/_node_modules/@sentry/node/esm/client.cjs.map +1 -1
  180. package/dist/_node_modules/@sentry/node/esm/client.js.map +1 -1
  181. package/dist/_node_modules/@sentry/node/esm/integrations/console.cjs.map +1 -1
  182. package/dist/_node_modules/@sentry/node/esm/integrations/console.js.map +1 -1
  183. package/dist/_node_modules/@sentry/node/esm/integrations/context.cjs.map +1 -1
  184. package/dist/_node_modules/@sentry/node/esm/integrations/context.js +1 -1
  185. package/dist/_node_modules/@sentry/node/esm/integrations/context.js.map +1 -1
  186. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs +3 -5
  187. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs.map +1 -1
  188. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js +3 -5
  189. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js.map +1 -1
  190. package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs +3 -3
  191. package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs.map +1 -1
  192. package/dist/_node_modules/@sentry/node/esm/integrations/http.js +3 -3
  193. package/dist/_node_modules/@sentry/node/esm/integrations/http.js.map +1 -1
  194. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.cjs.map +1 -1
  195. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.js.map +1 -1
  196. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs +1 -1
  197. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs.map +1 -1
  198. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js +1 -1
  199. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
  200. package/dist/_node_modules/@sentry/node/esm/integrations/modules.cjs.map +1 -1
  201. package/dist/_node_modules/@sentry/node/esm/integrations/modules.js.map +1 -1
  202. package/dist/_node_modules/@sentry/node/esm/integrations/onuncaughtexception.cjs.map +1 -1
  203. package/dist/_node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map +1 -1
  204. package/dist/_node_modules/@sentry/node/esm/integrations/onunhandledrejection.cjs.map +1 -1
  205. package/dist/_node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map +1 -1
  206. package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.cjs.map +1 -1
  207. package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.js.map +1 -1
  208. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs +1 -1
  209. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs.map +1 -1
  210. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js +1 -1
  211. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js.map +1 -1
  212. package/dist/_node_modules/@sentry/node/esm/integrations/utils/errorhandling.cjs.map +1 -1
  213. package/dist/_node_modules/@sentry/node/esm/integrations/utils/errorhandling.js.map +1 -1
  214. package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.cjs.map +1 -1
  215. package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.js.map +1 -1
  216. package/dist/_node_modules/@sentry/node/esm/module.cjs +4 -4
  217. package/dist/_node_modules/@sentry/node/esm/module.cjs.map +1 -1
  218. package/dist/_node_modules/@sentry/node/esm/module.js.map +1 -1
  219. package/dist/_node_modules/@sentry/node/esm/nodeVersion.cjs.map +1 -1
  220. package/dist/_node_modules/@sentry/node/esm/proxy/base.cjs +1 -2
  221. package/dist/_node_modules/@sentry/node/esm/proxy/base.cjs.map +1 -1
  222. package/dist/_node_modules/@sentry/node/esm/proxy/base.js +1 -2
  223. package/dist/_node_modules/@sentry/node/esm/proxy/base.js.map +1 -1
  224. package/dist/_node_modules/@sentry/node/esm/proxy/index.cjs.map +1 -1
  225. package/dist/_node_modules/@sentry/node/esm/proxy/index.js.map +1 -1
  226. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs +3 -6
  227. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs.map +1 -1
  228. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js +3 -6
  229. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js.map +1 -1
  230. package/dist/_node_modules/@sentry/node/esm/sdk.cjs +16 -16
  231. package/dist/_node_modules/@sentry/node/esm/sdk.cjs.map +1 -1
  232. package/dist/_node_modules/@sentry/node/esm/sdk.js +6 -6
  233. package/dist/_node_modules/@sentry/node/esm/sdk.js.map +1 -1
  234. package/dist/_node_modules/@sentry/node/esm/transports/http.cjs.map +1 -1
  235. package/dist/_node_modules/@sentry/node/esm/transports/http.js.map +1 -1
  236. package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -1
  237. package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -1
  238. package/dist/_node_modules/fetch-blob/file.cjs +9 -21
  239. package/dist/_node_modules/fetch-blob/file.cjs.map +1 -1
  240. package/dist/_node_modules/fetch-blob/file.js +8 -20
  241. package/dist/_node_modules/fetch-blob/file.js.map +1 -1
  242. package/dist/_node_modules/fetch-blob/from.cjs +9 -0
  243. package/dist/_node_modules/fetch-blob/from.cjs.map +1 -0
  244. package/dist/_node_modules/fetch-blob/from.js +9 -0
  245. package/dist/_node_modules/fetch-blob/from.js.map +1 -0
  246. package/dist/_node_modules/fetch-blob/index.cjs +8 -21
  247. package/dist/_node_modules/fetch-blob/index.cjs.map +1 -1
  248. package/dist/_node_modules/fetch-blob/index.js +8 -21
  249. package/dist/_node_modules/fetch-blob/index.js.map +1 -1
  250. package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -1
  251. package/dist/_node_modules/fetch-blob/streams.js.map +1 -1
  252. package/dist/_node_modules/formdata-polyfill/esm.min.cjs +12 -29
  253. package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -1
  254. package/dist/_node_modules/formdata-polyfill/esm.min.js +12 -29
  255. package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -1
  256. package/dist/_node_modules/lru-cache/index.cjs +1 -2
  257. package/dist/_node_modules/lru-cache/index.cjs.map +1 -1
  258. package/dist/_node_modules/lru-cache/index.js +1 -2
  259. package/dist/_node_modules/lru-cache/index.js.map +1 -1
  260. package/dist/_node_modules/node-domexception/index.cjs.map +1 -1
  261. package/dist/_node_modules/node-domexception/index.js.map +1 -1
  262. package/dist/_node_modules/node-fetch/src/body.cjs +4 -7
  263. package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -1
  264. package/dist/_node_modules/node-fetch/src/body.js +5 -8
  265. package/dist/_node_modules/node-fetch/src/body.js.map +1 -1
  266. package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -1
  267. package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -1
  268. package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -1
  269. package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -1
  270. package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -1
  271. package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -1
  272. package/dist/_node_modules/node-fetch/src/headers.cjs +1 -2
  273. package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -1
  274. package/dist/_node_modules/node-fetch/src/headers.js +1 -2
  275. package/dist/_node_modules/node-fetch/src/headers.js.map +1 -1
  276. package/dist/_node_modules/node-fetch/src/index.cjs +2 -4
  277. package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -1
  278. package/dist/_node_modules/node-fetch/src/index.js +3 -5
  279. package/dist/_node_modules/node-fetch/src/index.js.map +1 -1
  280. package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -1
  281. package/dist/_node_modules/node-fetch/src/request.js.map +1 -1
  282. package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -1
  283. package/dist/_node_modules/node-fetch/src/response.js.map +1 -1
  284. package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -1
  285. package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -1
  286. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +2 -5
  287. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -1
  288. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +2 -5
  289. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -1
  290. package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -1
  291. package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -1
  292. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +5 -10
  293. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -1
  294. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +5 -10
  295. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -1
  296. package/dist/_node_modules/yallist/iterator.cjs +1 -2
  297. package/dist/_node_modules/yallist/iterator.cjs.map +1 -1
  298. package/dist/_node_modules/yallist/iterator.js +1 -2
  299. package/dist/_node_modules/yallist/iterator.js.map +1 -1
  300. package/dist/_node_modules/yallist/yallist.cjs.map +1 -1
  301. package/dist/_node_modules/yallist/yallist.js.map +1 -1
  302. package/dist/cli.cjs.map +1 -1
  303. package/dist/cli.js.map +1 -1
  304. package/dist/constants.cjs +1 -1
  305. package/dist/constants.cjs.map +1 -1
  306. package/dist/constants.js +1 -1
  307. package/dist/constants.js.map +1 -1
  308. package/dist/legacyMigrations/detectFramework.cjs.map +1 -1
  309. package/dist/legacyMigrations/detectFramework.js.map +1 -1
  310. package/dist/legacyMigrations/migrateAssets.cjs.map +1 -1
  311. package/dist/legacyMigrations/migrateAssets.js.map +1 -1
  312. package/dist/legacyMigrations/migrateSMJSON.cjs.map +1 -1
  313. package/dist/legacyMigrations/migrateSMJSON.js.map +1 -1
  314. package/dist/lib/castArray.cjs.map +1 -1
  315. package/dist/lib/castArray.js.map +1 -1
  316. package/dist/lib/createSliceMachineExpressApp.cjs +1 -2
  317. package/dist/lib/createSliceMachineExpressApp.cjs.map +1 -1
  318. package/dist/lib/createSliceMachineExpressApp.js +1 -2
  319. package/dist/lib/createSliceMachineExpressApp.js.map +1 -1
  320. package/dist/lib/locateFileUpward.cjs.map +1 -1
  321. package/dist/lib/locateFileUpward.js.map +1 -1
  322. package/dist/lib/safelyExecute.cjs.map +1 -1
  323. package/dist/lib/safelyExecute.js.map +1 -1
  324. package/dist/lib/sentryErrorHandlers.cjs +2 -4
  325. package/dist/lib/sentryErrorHandlers.cjs.map +1 -1
  326. package/dist/lib/sentryErrorHandlers.js +2 -4
  327. package/dist/lib/sentryErrorHandlers.js.map +1 -1
  328. package/dist/lib/sentryFrontendTunnel.cjs.map +1 -1
  329. package/dist/lib/sentryFrontendTunnel.js.map +1 -1
  330. package/dist/lib/setupSentry.cjs +0 -4
  331. package/dist/lib/setupSentry.cjs.map +1 -1
  332. package/dist/lib/setupSentry.js +0 -4
  333. package/dist/lib/setupSentry.js.map +1 -1
  334. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs +1 -2
  335. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs.map +1 -1
  336. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js +1 -2
  337. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js.map +1 -1
  338. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs +1 -2
  339. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs.map +1 -1
  340. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js +1 -2
  341. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js.map +1 -1
  342. package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.cjs.map +1 -1
  343. package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.js.map +1 -1
  344. package/dist/packages/start-slicemachine/_node_modules/semver/functions/clean.cjs.map +1 -1
  345. package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.cjs.map +1 -1
  346. package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.js.map +1 -1
  347. package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.cjs.map +1 -1
  348. package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.js.map +1 -1
  349. package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare-build.cjs.map +1 -1
  350. package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare-loose.cjs.map +1 -1
  351. package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare.cjs.map +1 -1
  352. package/dist/packages/start-slicemachine/_node_modules/semver/functions/diff.cjs.map +1 -1
  353. package/dist/packages/start-slicemachine/_node_modules/semver/functions/diff.js.map +1 -1
  354. package/dist/packages/start-slicemachine/_node_modules/semver/functions/eq.cjs.map +1 -1
  355. package/dist/packages/start-slicemachine/_node_modules/semver/functions/gt.cjs.map +1 -1
  356. package/dist/packages/start-slicemachine/_node_modules/semver/functions/gte.cjs.map +1 -1
  357. package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.cjs.map +1 -1
  358. package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.js.map +1 -1
  359. package/dist/packages/start-slicemachine/_node_modules/semver/functions/lt.cjs.map +1 -1
  360. package/dist/packages/start-slicemachine/_node_modules/semver/functions/lte.cjs.map +1 -1
  361. package/dist/packages/start-slicemachine/_node_modules/semver/functions/major.cjs.map +1 -1
  362. package/dist/packages/start-slicemachine/_node_modules/semver/functions/minor.cjs.map +1 -1
  363. package/dist/packages/start-slicemachine/_node_modules/semver/functions/neq.cjs.map +1 -1
  364. package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.cjs.map +1 -1
  365. package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.js.map +1 -1
  366. package/dist/packages/start-slicemachine/_node_modules/semver/functions/patch.cjs.map +1 -1
  367. package/dist/packages/start-slicemachine/_node_modules/semver/functions/prerelease.cjs.map +1 -1
  368. package/dist/packages/start-slicemachine/_node_modules/semver/functions/rcompare.cjs.map +1 -1
  369. package/dist/packages/start-slicemachine/_node_modules/semver/functions/rsort.cjs.map +1 -1
  370. package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.cjs.map +1 -1
  371. package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.js.map +1 -1
  372. package/dist/packages/start-slicemachine/_node_modules/semver/functions/sort.cjs.map +1 -1
  373. package/dist/packages/start-slicemachine/_node_modules/semver/functions/valid.cjs.map +1 -1
  374. package/dist/packages/start-slicemachine/_node_modules/semver/index.cjs +4 -4
  375. package/dist/packages/start-slicemachine/_node_modules/semver/index.cjs.map +1 -1
  376. package/dist/packages/start-slicemachine/_node_modules/semver/index.js.map +1 -1
  377. package/dist/packages/start-slicemachine/_node_modules/semver/internal/debug.cjs.map +1 -1
  378. package/dist/packages/start-slicemachine/_node_modules/semver/internal/debug.js.map +1 -1
  379. package/dist/packages/start-slicemachine/_node_modules/semver/internal/identifiers.cjs.map +1 -1
  380. package/dist/packages/start-slicemachine/_node_modules/semver/internal/identifiers.js.map +1 -1
  381. package/dist/packages/start-slicemachine/_node_modules/semver/internal/parse-options.cjs.map +1 -1
  382. package/dist/packages/start-slicemachine/_node_modules/semver/internal/parse-options.js.map +1 -1
  383. package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.cjs.map +1 -1
  384. package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.js.map +1 -1
  385. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/gtr.cjs.map +1 -1
  386. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/intersects.cjs.map +1 -1
  387. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/intersects.js.map +1 -1
  388. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/ltr.cjs.map +1 -1
  389. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.cjs.map +1 -1
  390. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.js.map +1 -1
  391. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.cjs.map +1 -1
  392. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.js.map +1 -1
  393. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.cjs.map +1 -1
  394. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.js.map +1 -1
  395. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/outside.cjs.map +1 -1
  396. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/outside.js.map +1 -1
  397. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.cjs.map +1 -1
  398. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.js.map +1 -1
  399. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.cjs +10 -11
  400. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.cjs.map +1 -1
  401. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.js +10 -11
  402. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.js.map +1 -1
  403. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/to-comparators.cjs.map +1 -1
  404. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/to-comparators.js.map +1 -1
  405. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.cjs.map +1 -1
  406. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.js.map +1 -1
  407. package/dist/packages/start-slicemachine/package.json.cjs +1 -1
  408. package/dist/packages/start-slicemachine/package.json.js +1 -1
  409. package/package.json +3 -3
  410. package/dist/lib/checkIsSentryEnabled.cjs +0 -5
  411. package/dist/lib/checkIsSentryEnabled.cjs.map +0 -1
  412. package/dist/lib/checkIsSentryEnabled.js +0 -5
  413. package/dist/lib/checkIsSentryEnabled.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"prepareEvent.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/prepareEvent.js"],"sourcesContent":["import { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n"],"names":["scope","uuid4","dateTimestampInSeconds","addExceptionMechanism","getGlobalScope","mergeScopeData","applyScopeDataToEvent","eventProcessors","getGlobalEventProcessors","notifyEventProcessors","DEFAULT_ENVIRONMENT","truncate","GLOBAL_OBJ","normalize","spanToJSON","Scope"],"mappings":";;;;;;;;;;;;AA8BA,SAAS,aACP,SACA,OACA,MACAA,SACA,QACA,gBACA;AACA,QAAM,EAAE,iBAAiB,GAAG,sBAAsB,IAAI,IAAK;AAC3D,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,UAAU,MAAM,YAAY,KAAK,YAAYC,KAAAA,MAAO;AAAA,IACpD,WAAW,MAAM,aAAaC,4BAAwB;AAAA,EAC1D;AACE,QAAM,eAAe,KAAK,gBAAgB,QAAQ,aAAa,IAAI,OAAK,EAAE,IAAI;AAE9E,qBAAmB,UAAU,OAAO;AACpC,4BAA0B,UAAU,YAAY;AAGhD,MAAI,MAAM,SAAS,QAAW;AAC5B,kBAAc,UAAU,QAAQ,WAAW;AAAA,EAC5C;AAID,QAAM,aAAa,cAAcF,SAAO,KAAK,cAAc;AAE3D,MAAI,KAAK,WAAW;AAClBG,SAAAA,sBAAsB,UAAU,KAAK,SAAS;AAAA,EAC/C;AAED,QAAM,wBAAwB,UAAU,OAAO,qBAAqB,OAAO,mBAAoB,IAAG;AAKlG,QAAM,OAAOC,MAAAA,iBAAiB;AAE9B,MAAI,gBAAgB;AAClB,UAAM,gBAAgB,eAAe;AACrCC,yCAAe,MAAM,aAAa;AAAA,EACnC;AAED,MAAI,YAAY;AACd,UAAM,iBAAiB,WAAW;AAClCA,yCAAe,MAAM,cAAc;AAAA,EACpC;AAED,QAAM,cAAc,CAAC,GAAI,KAAK,eAAe,CAAA,GAAK,GAAG,KAAK,WAAW;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O,OAAO,KAAK,IAAI,EAAE,KAAK,SAAO,mBAAmB,SAAS,GAAG,CAAE;AACxE;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"prepareEvent.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/prepareEvent.js"],"sourcesContent":["import { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n"],"names":["scope","uuid4","dateTimestampInSeconds","addExceptionMechanism","getGlobalScope","mergeScopeData","applyScopeDataToEvent","eventProcessors","getGlobalEventProcessors","notifyEventProcessors","DEFAULT_ENVIRONMENT","truncate","GLOBAL_OBJ","normalize","spanToJSON","Scope"],"mappings":";;;;;;;;;;;;AA8BA,SAAS,aACP,SACA,OACA,MACAA,SACA,QACA,gBACA;AACA,QAAM,EAAE,iBAAiB,GAAG,sBAAsB,IAAI,IAAK;AAC3D,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,UAAU,MAAM,YAAY,KAAK,YAAYC,KAAAA,MAAK;AAAA,IAClD,WAAW,MAAM,aAAaC,4BAAsB;AAAA,EACxD;AACE,QAAM,eAAe,KAAK,gBAAgB,QAAQ,aAAa,IAAI,OAAK,EAAE,IAAI;AAE9E,qBAAmB,UAAU,OAAO;AACpC,4BAA0B,UAAU,YAAY;AAGhD,MAAI,MAAM,SAAS,QAAW;AAC5B,kBAAc,UAAU,QAAQ,WAAW;AAAA,EAC7C;AAIA,QAAM,aAAa,cAAcF,SAAO,KAAK,cAAc;AAE3D,MAAI,KAAK,WAAW;AAClBG,+BAAsB,UAAU,KAAK,SAAS;AAAA,EAChD;AAEA,QAAM,wBAAwB,UAAU,OAAO,qBAAqB,OAAO,mBAAkB,IAAK,CAAA;AAKlG,QAAM,OAAOC,qBAAc,EAAG,aAAY;AAE1C,MAAI,gBAAgB;AAClB,UAAM,gBAAgB,eAAe,aAAY;AACjDC,0BAAAA,eAAe,MAAM,aAAa;AAAA,EACpC;AAEA,MAAI,YAAY;AACd,UAAM,iBAAiB,WAAW,aAAY;AAC9CA,0BAAAA,eAAe,MAAM,cAAc;AAAA,EACrC;AAEA,QAAM,cAAc,CAAC,GAAI,KAAK,eAAe,CAAA,GAAK,GAAG,KAAK,WAAW;AACr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AA,EACA;AAAA,EACA;AACF;AAEA,SAAS,mBAAmB,MAAM;AAChC,SAAO,OAAO,KAAK,IAAI,EAAE,KAAK,SAAO,mBAAmB,SAAS,IAAK;AACxE;;;;;","x_google_ignoreList":[0]}
@@ -1,10 +1,10 @@
1
1
  import { DEFAULT_ENVIRONMENT } from "../constants.js";
2
2
  import { getGlobalEventProcessors, notifyEventProcessors } from "../eventProcessors.js";
3
- import { Scope, getGlobalScope } from "../scope.js";
3
+ import { getGlobalScope, Scope } from "../scope.js";
4
4
  import { mergeScopeData, applyScopeDataToEvent } from "./applyScopeDataToEvent.js";
5
5
  import { spanToJSON } from "./spanUtils.js";
6
- import { uuid4, addExceptionMechanism } from "../../../utils/esm/misc.js";
7
6
  import { dateTimestampInSeconds } from "../../../utils/esm/time.js";
7
+ import { uuid4, addExceptionMechanism } from "../../../utils/esm/misc.js";
8
8
  import { truncate } from "../../../utils/esm/string.js";
9
9
  import { GLOBAL_OBJ } from "../../../utils/esm/worldwide.js";
10
10
  import { normalize } from "../../../utils/esm/normalize.js";
@@ -1 +1 @@
1
- {"version":3,"file":"prepareEvent.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/prepareEvent.js"],"sourcesContent":["import { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,SAAS,aACP,SACA,OACA,MACA,OACA,QACA,gBACA;AACA,QAAM,EAAE,iBAAiB,GAAG,sBAAsB,IAAI,IAAK;AAC3D,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,UAAU,MAAM,YAAY,KAAK,YAAY,MAAO;AAAA,IACpD,WAAW,MAAM,aAAa,uBAAwB;AAAA,EAC1D;AACE,QAAM,eAAe,KAAK,gBAAgB,QAAQ,aAAa,IAAI,OAAK,EAAE,IAAI;AAE9E,qBAAmB,UAAU,OAAO;AACpC,4BAA0B,UAAU,YAAY;AAGhD,MAAI,MAAM,SAAS,QAAW;AAC5B,kBAAc,UAAU,QAAQ,WAAW;AAAA,EAC5C;AAID,QAAM,aAAa,cAAc,OAAO,KAAK,cAAc;AAE3D,MAAI,KAAK,WAAW;AAClB,0BAAsB,UAAU,KAAK,SAAS;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,sBACP,MACA;AACA,SAAO,gBAAgB,SAAS,OAAO,SAAS;AAClD;AAEA,MAAM,qBAAqB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,SAAS,mBAAmB,MAAM;AAChC,SAAO,OAAO,KAAK,IAAI,EAAE,KAAK,SAAO,mBAAmB,SAAS,GAAG,CAAE;AACxE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"prepareEvent.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/prepareEvent.js"],"sourcesContent":["import { uuid4, dateTimestampInSeconds, addExceptionMechanism, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalEventProcessors, notifyEventProcessors } from '../eventProcessors.js';\nimport { getGlobalScope, Scope } from '../scope.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\nimport { spanToJSON } from './spanUtils.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n isolationScope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...clientEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n const data = spanToJSON(span).data;\n\n if (data) {\n // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so\n // eslint-disable-next-line deprecation/deprecation\n span.data = normalize(data, depth, maxBreadth);\n }\n\n return span;\n });\n }\n\n return normalized;\n}\n\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n hint,\n) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint,\n) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,SAAS,aACP,SACA,OACA,MACA,OACA,QACA,gBACA;AACA,QAAM,EAAE,iBAAiB,GAAG,sBAAsB,IAAI,IAAK;AAC3D,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,UAAU,MAAM,YAAY,KAAK,YAAY,MAAK;AAAA,IAClD,WAAW,MAAM,aAAa,uBAAsB;AAAA,EACxD;AACE,QAAM,eAAe,KAAK,gBAAgB,QAAQ,aAAa,IAAI,OAAK,EAAE,IAAI;AAE9E,qBAAmB,UAAU,OAAO;AACpC,4BAA0B,UAAU,YAAY;AAGhD,MAAI,MAAM,SAAS,QAAW;AAC5B,kBAAc,UAAU,QAAQ,WAAW;AAAA,EAC7C;AAIA,QAAM,aAAa,cAAc,OAAO,KAAK,cAAc;AAE3D,MAAI,KAAK,WAAW;AAClB,0BAAsB,UAAU,KAAK,SAAS;AAAA,EAChD;AAEA,QAAM,wBAAwB,UAAU,OAAO,qBAAqB,OAAO,mBAAkB,IAAK,CAAA;AAKlG,QAAM,OAAO,eAAc,EAAG,aAAY;AAE1C,MAAI,gBAAgB;AAClB,UAAM,gBAAgB,eAAe,aAAY;AACjD,mBAAe,MAAM,aAAa;AAAA,EACpC;AAEA,MAAI,YAAY;AACd,UAAM,iBAAiB,WAAW,aAAY;AAC9C,mBAAe,MAAM,cAAc;AAAA,EACrC;AAEA,QAAM,cAAc,CAAC,GAAI,KAAK,eAAe,CAAA,GAAK,GAAG,KAAK,WAAW;AACr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@@ -1 +1 @@
1
- {"version":3,"file":"sdkMetadata.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name","SDK_VERSION"],"mappings":";;;AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB,IAAI;AAAA,MAC/B,UAAU,MAAM,IAAI,CAAAA,WAAS;AAAA,QAC3B,MAAM,GAAG,MAAM,YAAYA,KAAI;AAAA,QAC/B,SAASC,QAAW;AAAA,MAC5B,EAAQ;AAAA,MACF,SAASA,QAAW;AAAA,IAC1B;AAAA,EACG;AAED,UAAQ,YAAY;AACtB;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"sdkMetadata.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name","SDK_VERSION"],"mappings":";;;AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa,CAAA;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB,IAAI;AAAA,MAC/B,UAAU,MAAM,IAAI,CAAAA,WAAS;AAAA,QAC3B,MAAM,GAAG,MAAM,YAAYA,KAAI;AAAA,QAC/B,SAASC,QAAAA;AAAAA,MACjB,EAAQ;AAAA,MACF,SAASA,QAAAA;AAAAA,IACf;AAAA,EACE;AAEA,UAAQ,YAAY;AACtB;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"sdkMetadata.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name"],"mappings":";AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB,IAAI;AAAA,MAC/B,UAAU,MAAM,IAAI,CAAAA,WAAS;AAAA,QAC3B,MAAM,GAAG,MAAM,YAAYA,KAAI;AAAA,QAC/B,SAAS;AAAA,MACjB,EAAQ;AAAA,MACF,SAAS;AAAA,IACf;AAAA,EACG;AAED,UAAQ,YAAY;AACtB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"sdkMetadata.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/sdkMetadata.js"],"sourcesContent":["import { SDK_VERSION } from '../version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n"],"names":["name"],"mappings":";AAeA,SAAS,iBAAiB,SAAS,MAAM,QAAQ,CAAC,IAAI,GAAG,SAAS,OAAO;AACvE,QAAM,WAAW,QAAQ,aAAa,CAAA;AAEtC,MAAI,CAAC,SAAS,KAAK;AACjB,aAAS,MAAM;AAAA,MACb,MAAM,qBAAqB,IAAI;AAAA,MAC/B,UAAU,MAAM,IAAI,CAAAA,WAAS;AAAA,QAC3B,MAAM,GAAG,MAAM,YAAYA,KAAI;AAAA,QAC/B,SAAS;AAAA,MACjB,EAAQ;AAAA,MACF,SAAS;AAAA,IACf;AAAA,EACE;AAEA,UAAQ,YAAY;AACtB;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"spanUtils.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/spanUtils.js"],"sourcesContent":["import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };\n//# sourceMappingURL=spanUtils.js.map\n"],"names":["dropUndefinedKeys","generateSentryTraceHeader","timestampInSeconds"],"mappings":";;;;;AAGK,MAAC,kBAAkB;AACnB,MAAC,qBAAqB;AAK3B,SAAS,mBAAmB,MAAM;AAChC,QAAM,EAAE,QAAQ,SAAS,SAAS,aAAa,KAAK;AACpD,QAAM,EAAE,MAAM,IAAI,gBAAgB,QAAQ,MAAM,OAAQ,IAAG,WAAW,IAAI;AAE1E,SAAOA,yBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAG;AACH;AAKA,SAAS,kBAAkB,MAAM;AAC/B,QAAM,EAAE,SAAS,OAAQ,IAAG,KAAK,YAAW;AAC5C,QAAM,UAAU,cAAc,IAAI;AAClC,SAAOC,kCAA0B,SAAS,QAAQ,OAAO;AAC3D;AAKA,SAAS,uBAAuB,OAAO;AACrC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,yBAAyB,KAAK;AAAA,EACtC;AAED,MAAI,MAAM,QAAQ,KAAK,GAAG;AAExB,WAAO,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI;AAAA,EAC9B;AAED,MAAI,iBAAiB,MAAM;AACzB,WAAO,yBAAyB,MAAM,QAAO,CAAE;AAAA,EAChD;AAED,SAAOC,KAAkB,mBAAA;AAC3B;AAKA,SAAS,yBAAyB,WAAW;AAC3C,QAAM,OAAO,YAAY;AACzB,SAAO,OAAO,YAAY,MAAO;AACnC;AAWA,SAAS,WAAW,MAAM;AACxB,MAAI,gBAAgB,IAAI,GAAG;AACzB,WAAO,KAAK;EACb;AAID,MAAI,OAAO,KAAK,WAAW,YAAY;AAErC,WAAO,KAAK;EACb;AAED,SAAO;AACT;AAMA,SAAS,gBAAgB,MAAM;AAC7B,SAAO,OAAQ,KAAO,gBAAgB;AACxC;AAQA,SAAS,cAAc,MAAM;AAG3B,QAAM,EAAE,WAAU,IAAK,KAAK,YAAW;AAEvC,SAAO,QAAQ,aAAa,kBAAkB;AAChD;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"spanUtils.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/spanUtils.js"],"sourcesContent":["import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };\n//# sourceMappingURL=spanUtils.js.map\n"],"names":["dropUndefinedKeys","generateSentryTraceHeader","timestampInSeconds"],"mappings":";;;;;AAGK,MAAC,kBAAkB;AACnB,MAAC,qBAAqB;AAK3B,SAAS,mBAAmB,MAAM;AAChC,QAAM,EAAE,QAAQ,SAAS,SAAS,SAAQ,IAAK,KAAK,YAAW;AAC/D,QAAM,EAAE,MAAM,IAAI,gBAAgB,QAAQ,MAAM,OAAM,IAAK,WAAW,IAAI;AAE1E,SAAOA,yBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAG;AACH;AAKA,SAAS,kBAAkB,MAAM;AAC/B,QAAM,EAAE,SAAS,WAAW,KAAK,YAAW;AAC5C,QAAM,UAAU,cAAc,IAAI;AAClC,SAAOC,kCAA0B,SAAS,QAAQ,OAAO;AAC3D;AAKA,SAAS,uBAAuB,OAAO;AACrC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,yBAAyB,KAAK;AAAA,EACvC;AAEA,MAAI,MAAM,QAAQ,KAAK,GAAG;AAExB,WAAO,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI;AAAA,EAC/B;AAEA,MAAI,iBAAiB,MAAM;AACzB,WAAO,yBAAyB,MAAM,SAAS;AAAA,EACjD;AAEA,SAAOC,wBAAkB;AAC3B;AAKA,SAAS,yBAAyB,WAAW;AAC3C,QAAM,OAAO,YAAY;AACzB,SAAO,OAAO,YAAY,MAAO;AACnC;AAWA,SAAS,WAAW,MAAM;AACxB,MAAI,gBAAgB,IAAI,GAAG;AACzB,WAAO,KAAK,YAAW;AAAA,EACzB;AAIA,MAAI,OAAO,KAAK,WAAW,YAAY;AAErC,WAAO,KAAK,OAAM;AAAA,EACpB;AAEA,SAAO,CAAA;AACT;AAMA,SAAS,gBAAgB,MAAM;AAC7B,SAAO,OAAQ,KAAO,gBAAgB;AACxC;AAQA,SAAS,cAAc,MAAM;AAG3B,QAAM,EAAE,WAAU,IAAK,KAAK,YAAW;AAEvC,SAAO,QAAQ,aAAa,kBAAkB;AAChD;;;;;;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"spanUtils.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/spanUtils.js"],"sourcesContent":["import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };\n//# sourceMappingURL=spanUtils.js.map\n"],"names":[],"mappings":";;;AAGK,MAAC,kBAAkB;AACnB,MAAC,qBAAqB;AAK3B,SAAS,mBAAmB,MAAM;AAChC,QAAM,EAAE,QAAQ,SAAS,SAAS,aAAa,KAAK;AACpD,QAAM,EAAE,MAAM,IAAI,gBAAgB,QAAQ,MAAM,OAAQ,IAAG,WAAW,IAAI;AAE1E,SAAO,kBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAG;AACH;AAKA,SAAS,kBAAkB,MAAM;AAC/B,QAAM,EAAE,SAAS,OAAQ,IAAG,KAAK,YAAW;AAC5C,QAAM,UAAU,cAAc,IAAI;AAClC,SAAO,0BAA0B,SAAS,QAAQ,OAAO;AAC3D;AAKA,SAAS,uBAAuB,OAAO;AACrC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,yBAAyB,KAAK;AAAA,EACtC;AAED,MAAI,MAAM,QAAQ,KAAK,GAAG;AAExB,WAAO,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI;AAAA,EAC9B;AAED,MAAI,iBAAiB,MAAM;AACzB,WAAO,yBAAyB,MAAM,QAAO,CAAE;AAAA,EAChD;AAED,SAAO,mBAAkB;AAC3B;AAKA,SAAS,yBAAyB,WAAW;AAC3C,QAAM,OAAO,YAAY;AACzB,SAAO,OAAO,YAAY,MAAO;AACnC;AAWA,SAAS,WAAW,MAAM;AACxB,MAAI,gBAAgB,IAAI,GAAG;AACzB,WAAO,KAAK;EACb;AAID,MAAI,OAAO,KAAK,WAAW,YAAY;AAErC,WAAO,KAAK;EACb;AAED,SAAO;AACT;AAMA,SAAS,gBAAgB,MAAM;AAC7B,SAAO,OAAQ,KAAO,gBAAgB;AACxC;AAQA,SAAS,cAAc,MAAM;AAG3B,QAAM,EAAE,WAAU,IAAK,KAAK,YAAW;AAEvC,SAAO,QAAQ,aAAa,kBAAkB;AAChD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"spanUtils.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/utils/spanUtils.js"],"sourcesContent":["import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };\n//# sourceMappingURL=spanUtils.js.map\n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AAa,kBAAkB;AAChD;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate-errors.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":["isInstanceOf","truncate"],"mappings":";;;;AAMA,SAAS,4BACP,kCACA,QACA,gBAAgB,KAChB,KACA,OACA,OACA,MACA;AACA,MAAI,CAAC,MAAM,aAAa,CAAC,MAAM,UAAU,UAAU,CAAC,QAAQ,CAACA,GAAY,aAAC,KAAK,mBAAmB,KAA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aAAa;AAAA,UAC/B;AAAA,UACA;AAAA,QACV;AAAA,MACO;AAAA,IACP,CAAK;AAAA,EACF;AAED,SAAO;AACT;AAEA,SAAS,4CAA4C,WAAW,aAAa;AAE3E,YAAU,YAAY,UAAU,aAAa,EAAE,MAAM,WAAW,SAAS;AAEzE,YAAU,YAAY;AAAA,IACpB,GAAG,UAAU;AAAA,IACb,GAAI,UAAU,SAAS,oBAAoB,EAAE,oBAAoB,KAAI;AAAA,IACrE,cAAc;AAAA,EAClB;AACA;AAEA,SAAS,2CACP,WACA,QACA,aACA,UACA;AAEA,YAAU,YAAY,UAAU,aAAa,EAAE,MAAM,WAAW,SAAS;AAEzE,YAAU,YAAY;AAAA,IACpB,GAAG,UAAU;AAAA,IACb,MAAM;AAAA,IACN;AAAA,IACA,cAAc;AAAA,IACd,WAAW;AAAA,EACf;AACA;AAOA,SAAS,4BAA4B,YAAY,gBAAgB;AAC/D,SAAO,WAAW,IAAI,eAAa;AACjC,QAAI,UAAU,OAAO;AACnB,gBAAU,QAAQC,OAAQ,SAAC,UAAU,OAAO,cAAc;AAAA,IAC3D;AACD,WAAO;AAAA,EACX,CAAG;AACH;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"aggregate-errors.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":["isInstanceOf","truncate"],"mappings":";;;;AAMA,SAAS,4BACP,kCACA,QACA,gBAAgB,KAChB,KACA,OACA,OACA,MACA;AACA,MAAI,CAAC,MAAM,aAAa,CAAC,MAAM,UAAU,UAAU,CAAC,QAAQ,CAACA,GAAAA,aAAa,KAAK,mBAAmB,KAAK,GAAG;AACxG;AAAA,EACF;AAGA,QAAM,oBACJ,MAAM,UAAU,OAAO,SAAS,IAAI,MAAM,UAAU,OAAO,MAAM,UAAU,OAAO,SAAS,CAAC,IAAI;AAGlG,MAAI,mBAAmB;AACrB,UAAM,UAAU,SAAS;AAAA,MACvB;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QACA,MAAM,UAAU;AAAA,QAChB;AAAA,QACA;AAAA,MACR;AAAA,MACM;AAAA,IACN;AAAA,EACE;AACF;AAEA,SAAS,6BACP,kCACA,QACA,OACA,OACA,KACA,gBACA,WACA,aACA;AACA,MAAI,eAAe,UAAU,QAAQ,GAAG;AACtC,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB,CAAC,GAAG,cAAc;AAGtC,MAAIA,GAAAA,aAAa,MAAM,GAAG,GAAG,K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AACA;AAOA,SAAS,4BAA4B,YAAY,gBAAgB;AAC/D,SAAO,WAAW,IAAI,eAAa;AACjC,QAAI,UAAU,OAAO;AACnB,gBAAU,QAAQC,OAAAA,SAAS,UAAU,OAAO,cAAc;AAAA,IAC5D;AACA,WAAO;AAAA,EACT,CAAC;AACH;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate-errors.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":[],"mappings":";;AAMA,SAA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AAc,UAAU,CAAC,KAAK,gBAAgB,WAAW;AACpG,wBAAgB;AAAA,UACd;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,CAAC,cAAc,GAAG,aAAa;AAAA,UAC/B;AAAA,UACA;AAAA,QACV;AAAA,MACO;AAAA,IACP,CAAK;AAAA,EACF;AAED,SAAO;AACT;AAEA,SAAS,4CAA4C,WAAW,aAAa;AAE3E,YAAU,YAAY,UAAU,aAAa,EAAE,MAAM,WAAW,SAAS;AAEzE,YAAU,YAAY;AAAA,IACpB,GAAG,UAAU;AAAA,IACb,GAAI,UAAU,SAAS,oBAAoB,EAAE,oBAAoB,KAAI;AAAA,IACrE,cAAc;AAAA,EAClB;AACA;AAEA,SAAS,2CACP,WACA,QACA,aACA,UACA;AAEA,YAAU,YAAY,UAAU,aAAa,EAAE,MAAM,WAAW,SAAS;AAEzE,YAAU,YAAY;AAAA,IACpB,GAAG,UAAU;AAAA,IACb,MAAM;AAAA,IACN;AAAA,IACA,cAAc;AAAA,IACd,WAAW;AAAA,EACf;AACA;AAOA,SAAS,4BAA4B,YAAY,gBAAgB;AAC/D,SAAO,WAAW,IAAI,eAAa;AACjC,QAAI,UAAU,OAAO;AACnB,gBAAU,QAAQ,SAAS,UAAU,OAAO,cAAc;AAAA,IAC3D;AACD,WAAO;AAAA,EACX,CAAG;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"aggregate-errors.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/aggregate-errors.js"],"sourcesContent":["import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n"],"names":[],"mappings":";;AAMA,SAAS,4BACP,kCACA,QACA,gBAAgB,KAChB,KACA,OACA,OACA,MACA;AACA,MAAI,CAAC,MAAM,aAAa,CAAC,MAAM,UAAU,UAAU,CAAC,QAAQ,CAAC,aAAa,KAAK,mBAAmB,KAAK,GAAG;AACxG;AAAA,EACF;AAGA,QAAM,oBACJ,MAAM,UAAU,OAAO,SAAS,IAAI,MAAM,UAAU,OAAO,MAAM,UAAU,OAAO,SAAS,CAAC,IAAI;AAGlG,MAAI,mBAAmB;AACrB,UAAM,UAAU,SAAS;AAAA,MACvB;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QACA,MAAM,UAAU;AAAA,QAChB;AAAA,QACA;AAAA,MACR;AAAA,MACM;AAAA,IACN;AAAA,EACE;AACF;AAEA,SAAS,6BACP,kCACA,QACA,OACA,OACA,KACA,gBACA,WACA,aACA;AACA,MAAI,eAAe,UAAU,QAAQ,GAAG;AACtC,WA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AAG,UAAU;AAAA,IACb,MAAM;AAAA,IACN;AAAA,IACA,cAAc;AAAA,IACd,WAAW;AAAA,EACf;AACA;AAOA,SAAS,4BAA4B,YAAY,gBAAgB;AAC/D,SAAO,WAAW,IAAI,eAAa;AACjC,QAAI,UAAU,OAAO;AACnB,gBAAU,QAAQ,SAAS,UAAU,OAAO,cAAc;AAAA,IAC5D;AACA,WAAO;AAAA,EACT,CAAC;AACH;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"baggage.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":["isString","DEBUG_BUILD","logger"],"mappings":";;;;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAACA,GAAQ,SAAC,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACR;AAID,MAAI,gBAAgB,CAAA;AAEpB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KAAK,KAAK,MAAM;AAC7B,QAAI,GAAG,IAAI;AACX,WAAO;AAAA,EACR,GAAE,CAAE,CAAA;AACT;AASA,SAAS,sBAAsB,QAAQ;AACrC,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC,WAAO;AAAA,EACR;AAED,SAAO,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,WAAW,WAAW,GAAG,iBAAiB;AAC9F,UAAM,eAAe,GAAG,mBAAmB,SAAS,CAAC,IAAI,mBAAmB,WAAW,CAAC;AACxF,UAAM,mBAAmB,iBAAiB,IAAI,eAAe,GAAG,aAAa,IAAI,YAAY;AAC7F,QAAI,iBAAiB,SAAS,2BAA2B;AACvDC,iBAAW,eACTC,OAAAA,OAAO;AAAA,QACL,mBAAmB,SAAS,cAAc,WAAW;AAAA,MAC/D;AACM,aAAO;AAAA,IACb,OAAW;AACL,aAAO;AAAA,IACR;AAAA,EACF,GAAE,EAAE;AACP;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"baggage.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":["isString","DEBUG_BUILD","logger"],"mappings":";;;;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAACA,GAAAA,SAAS,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACT;AAIA,MAAI,gBAAgB,CAAA;AAEpB,MAAI,MAAM,QAAQ,aAAa,GAAG;AAEhC,oBAAgB,cAAc,OAAO,CAAC,KAAK,SAAS;AAClD,YAAM,oBAAoB,sBAAsB,IAAI;AACpD,iBAAW,OAAO,OAAO,KAAK,iBAAiB,GAAG;AAChD,YAAI,GAAG,IAAI,kBAAkB,GAAG;AAAA,MAClC;AACA,aAAO;AAAA,IACT,GAAG,CAAA,CAAE;AAAA,EACP,OAAO;AAGL,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA,IACT;AAEA,oBAAgB,sBAAsB,aAAa;AAAA,EACrD;AAGA,QAAM,yBAAyB,OAAO,QAAQ,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACzF,QAAI,IAAI,MAAM,+BAA+B,GAAG;AAC9C,YAAM,iBAAiB,IAAI,MAAM,0BAA0B,MAAM;AACjE,UAAI,cAAc,IAAI;AAAA,IACxB;AACA,WAAO;AAAA,EACT,GAAG,CAAA,CAAE;AAIL,MAAI,OAAO,KAAK,sBAAsB,EAAE,SAAS,GAAG;AAClD,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAWA,SAAS,4CAEP,wBACA;AACA,MAAI,CAAC,wBAAwB;AAC3B,WAAO;AAAA,EACT;AAGA,QAAM,oBAAoB,OAAO,QAAQ,sBAAsB,EAAE;AAAA,IAC/D,CAAC,KAAK,CAAC,QAAQ,QAAQ,MAAM;AAC3B,UAAI,UAAU;AACZ,YAAI,GAAG,yBAAyB,GAAG,MAAM,EAAE,IAAI;AAAA,MACjD;AACA,aAAO;AAAA,IACT;AAAA,IACA,CAAA;AAAA,EACJ;AAEE,SAAO,sBAAsB,iBAAiB;AAChD;AAQA,SAAS,sBAAsB,eAAe;AAC5C,SAAO,cACJ,MAAM,GAAG,EACT,IAAI,kBAAgB,aAAa,MAAM,GAAG,EAAE,IAAI,gBAAc,mBAAmB,WAAW,KAAI,CAAE,CAAC,CAAC,EACpG,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AAC7B,QAAI,GAAG,IAAI;AACX,WAAO;AAAA,EACT,GAAG,CAAA,CAAE;AACT;AASA,SAAS,sBAAsB,QAAQ;AACrC,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,QAAQ,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,WAAW,WAAW,GAAG,iBAAiB;AAC9F,UAAM,eAAe,GAAG,mBAAmB,SAAS,CAAC,IAAI,mBAAmB,WAAW,CAAC;AACxF,UAAM,mBAAmB,iBAAiB,IAAI,eAAe,GAAG,aAAa,IAAI,YAAY;AAC7F,QAAI,iBAAiB,SAAS,2BAA2B;AACvDC,iBAAAA,eACEC,OAAAA,OAAO;AAAA,QACL,mBAAmB,SAAS,cAAc,WAAW;AAAA,MAC/D;AACM,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF,GAAG,EAAE;AACP;;;;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"baggage.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":[],"mappings":";;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAAC,SAAS,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACR;AAID,MAAI,gBAAgB,CAAA;AAEpB,MAAI,MAAM,QAAQ,aAAa,GAAG;AAEhC,oBAAgB,cAAc,OAAO,CAAC,KAAK,SAAS;AAClD,YAAM,oBAAoB,sBAAsB,IAAI;AACpD,iBAAW,OAAO,OAAO,KAAK,iBAAiB,GAAG;AAChD,YAAI,GAAG,IAAI,kBAAkB,GAAG;AAAA,MACjC;AACD,aAAO;AAAA,IACR,GAAE,CAAE,CAAA;AAAA,EACT,OAAS;AAGL,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA,IACR;AAED,oBAAgB,sBAAsB,aAAa;AAAA,EACpD;AAGD,QAAM,yBAAyB,OAAO,QAAQ,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACzF,QAAI,IAAI,MAAM,+BAA+B,GAAG;AAC9C,YAAM,iBAAiB,IAAI,MAAM,0BAA0B,MAAM;AACjE,UAAI,cAAc,IAAI;AAAA,IACvB;AACD,WAAO;AAAA,E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EAAE;AACP;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"baggage.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/baggage.js"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n"],"names":[],"mappings":";;;AAMK,MAAC,4BAA4B;AAE7B,MAAC,kCAAkC;AAOnC,MAAC,4BAA4B;AASlC,SAAS,sCAEP,eACA;AACA,MAAI,CAAC,SAAS,aAAa,KAAK,CAAC,MAAM,QAAQ,aAAa,GAAG;AAC7D,WAAO;AAAA,EACT;AAIA,MAAI,gBAAgB,CAAA;AAEpB,MAAI,MAAM,QAAQ,aAAa,GAAG;AAEhC,oBAAgB,cAAc,OAAO,CAAC,KAAK,SAAS;AAClD,YAAM,oBAAoB,sBAAsB,IAAI;AACpD,iBAAW,OAAO,OAAO,KAAK,iBAAiB,GAAG;AAChD,YAAI,GAAG,IAAI,kBAAkB,GAAG;AAAA,MAClC;AACA,aAAO;AAAA,IACT,GAAG,CAAA,CAAE;AAAA,EACP,OAAO;AAGL,QAAI,CAAC,eAAe;AAClB,aAAO;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mBAAmB,SAAS,CAAC,IAAI,mBAAmB,WAAW,CAAC;AACxF,UAAM,mBAAmB,iBAAiB,IAAI,eAAe,GAAG,aAAa,IAAI,YAAY;AAC7F,QAAI,iBAAiB,SAAS,2BAA2B;AACvD,qBACE,OAAO;AAAA,QACL,mBAAmB,SAAS,cAAc,WAAW;AAAA,MAC/D;AACM,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF,GAAG,EAAE;AACP;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"browser.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":["getGlobalObject","isString"],"mappings":";;;;AAIA,MAAM,SAASA,UAAe,gBAAA;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAE,GACZ;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAMD,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,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IAAI,KAAK,EAAE,EAAE;AAAA,IACvB;AAGD,gBAAY,KAAK;AACjB,QAAI,aAAaC,YAAS,SAAS,GAAG;AACpC,gBAAU,UAAU,MAAM,KAAK;AAC/B,WAAK,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACnC,YAAI,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AACD,QAAM,eAAe,CAAC,cAAc,QAAQ,QAAQ,SAAS,KAAK;AAClE,OAAK,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;AACxC,UAAM,aAAa,CAAC;AACpB,WAAO,KAAK,aAAa,GAAG;AAC5B,QAAI,MAAM;AACR,UAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI;AAAA,IAC9B;AAAA,EACF;AACD,SAAO,IAAI,KAAK,EAAE;AACpB;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"browser.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":["getGlobalObject","isString"],"mappings":";;;;AAIA,MAAM,SAASA,UAAAA,gBAAe;AAE9B,MAAM,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,OAAO,CAAC,CAAC,IAC3G;AAEN,MAAI,gBAAgB,aAAa,QAAQ;AACvC,iBAAa,QAAQ,iBAAe;AAClC,UAAI,KAAK,IAAI,YAAY,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,IAAI;AAAA,IACpD,CAAC;AAAA,EACH,OAAO;AACL,QAAI,KAAK,IAAI;AACX,UAAI,KAAK,IAAI,KAAK,EAAE,EAAE;AAAA,IACxB;AAGA,gBAAY,KAAK;AACjB,QAAI,aAAaC,YAAS,SAAS,GAAG;AACpC,gBAAU,UAAU,MAAM,KAAK;AAC/B,WAAK,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACnC,YAAI,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AACA,QAAM,eAAe,CAAC,cAAc,QAAQ,QAAQ,SAAS,KAAK;AAClE,OAAK,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;AACxC,UAAM,aAAa,CAAC;AACpB,WAAO,KAAK,aAAa,GAAG;AAC5B,QAAI,MAAM;AACR,UAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI;AAAA,IAC/B;AAAA,EACF;AACA,SAAO,IAAI,KAAK,EAAE;AACpB;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":[],"mappings":";;AAIA,MAAM,SAAS,gBAAe;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAE,GACZ;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACR;AAMD,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,UAAU;AAC5B,QAAI;AACJ,UAAM,WAAW,MAAM,QAAQ,OAAO,IAAI,UAAU,QAAQ;AAC5D,UAAM,kBAAmB,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,mBAAoB;AAEhF,WAAO,eAAe,WAAW,qBAAqB;AACpD,gBAAU,qBAAqB,aAAa,QAAQ;AAKpD,UAAI,YAAY,UAAW,SAAS,KAAK,MAAM,IAAI,SAAS,YAAY,QAAQ,UAAU,iBAAkB;AAC1G;AAAA,MACD;AAED,UAAI,KAAK,OAAO;AAEhB,aAAO,QAAQ;AACf,oBAAc,YAAY;AAAA,IAC3B;AAED,WAAO,IAAI,QAAO,EAAG,KAAK,SAAS;AAAA,EACpC,SAAQ,KAAK;AACZ,WAAO;AAAA,EACR;AACH;AAOA,SAAS,qBAAqB,IAAI,UAAU;AAC1C,QAAM,OAAO;AAIb,QAAM,MAAM,CAAA;AACZ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,MAAI;AAEJ,MAAI,CAAC,QAAQ,CAAC,KAAK,SAAS;AAC1B,WAAO;AAAA,EACR;AAGD,MAAI,OAAO,aAAa;AAEtB,QAAI,gBAAgB,eAAe,KAAK,WAAW,KAAK,QAAQ,iBAAiB,GAAG;AAClF,aAAO,KAAK,QAAQ,iBAAiB;AAAA,IACtC;AAAA,EACF;AAED,MAAI,KAAK,KAAK,QAAQ,YAAa,CAAA;AAGnC,QAAM,eACJ,YAAY,SAAS,SACjB,SAAS,OAAO,aAAW,KAAK,aAAa,OAAO,CAAC,EAAE,IAAI,aAAW,CAAC,SAAS,KAAK,aAAa,OAAO,CAAC,CAAC,IAC3G;AAEN,MAAI,gBAAgB,aAAa,QAAQ;AACvC,iBAAa,QAAQ,iBAAe;AAClC,UAAI,KAAK,IAAI,YAAY,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,IAAI;AAAA,IACxD,CAAK;AAAA,EACL,OAAS;AACL,QAAI,KAAK,IAAI;AACX,UAAI,KAAK,IAAI,KAAK,EAAE,EAAE;AAAA,IACvB;AAGD,gBAAY,KAAK;AACjB,QAAI,aAAa,SAAS,SAAS,GAAG;AACpC,gBAAU,UAAU,MAAM,KAAK;AAC/B,WAAK,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACnC,YAAI,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AACD,QAAM,eAAe,CAAC,cAAc,QAAQ,QAAQ,SAAS,KAAK;AAClE,OAAK,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;AACxC,UAAM,aAAa,CAAC;AACpB,WAAO,KAAK,aAAa,GAAG;AAC5B,QAAI,MAAM;AACR,UAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI;AAAA,IAC9B;AAAA,EACF;AACD,SAAO,IAAI,KAAK,EAAE;AACpB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"browser.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/browser.js"],"sourcesContent":["import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n"],"names":[],"mappings":";;AAIA,MAAM,SAAS,gBAAe;AAE9B,MAAM,4BAA4B;AAQlC,SAAS,iBACP,MACA,UAAU,CAAA,GACV;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAMA,MAAI;AACF,QAAI,cAAc;AAClB,UAAM,sBAAsB;AAC5B,UAAM,MAAM,CAAA;AACZ,QAAI,SAAS;AACb,QAAI,MAAM;AACV,UAAM,YAAY;AAClB,UAAM,YAAY,UAAU;AAC5B,QAAI;AACJ,UAAM,WAAW,MAAM,QAAQ,OAAO,IAAI,UAAU,QAAQ;AAC5D,UAAM,kBAAmB,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,mBAAoB;AAEhF,WAAO,eAAe,WAAW,qBAAqB;AACpD,gBAAU,qBAAqB,aAAa,QAAQ;AAKpD,UAAI,YAAY,UAAW,SAAS,KAAK,MAAM,IAAI,SAAS,YAAY,QAAQ,UAAU,iBAAkB;AAC1G;AAAA,MACF;AAEA,UAAI,KAAK,OAAO;AAEhB,aAAO,QAAQ;AACf,oBAAc,YAAY;AAAA,IAC5B;AAEA,WAAO,IAAI,UAAU,KAAK,SAAS;AAAA,EACrC,SAAS,KAAK;AACZ,WAAO;AAAA,EACT;AACF;AAOA,SAAS,qBAAqB,IAAI,UAAU;AAC1C,QAAM,OAAO;AAIb,QAAM,MAAM,CAAA;AACZ,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@ -1 +1 @@
1
- {"version":3,"file":"_optionalChain.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js"],"sourcesContent":["/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n"],"names":[],"mappings":";;AAUA,SAAS,eAAe,KAAK;AAC3B,MAAI,gBAAgB;AACpB,MAAI,QAAQ,IAAI,CAAC;AACjB,MAAI,IAAI;AACR,SAAO,IAAI,IAAI,QAAQ;AACrB,UAAM,KAAK,IAAI,CAAC;AAChB,UAAM,KAAK,IAAI,IAAI,CAAC;AACpB,SAAK;AAEL,SAAK,OAAO,oBAAoB,OAAO,mBAAmB,SAAS,MAAM;AAEvE;AAAA,IACD;AACD,QAAI,OAAO,YAAY,OAAO,kBAAkB;AAC9C,sBAAgB;AAChB,cAAQ,GAAG,KAAK;AAAA,IACjB,WAAU,OAAO,UAAU,OAAO,gBAAgB;AACjD,cAAQ,GAAG,IAAI,SAAU,MAAQ,KAAK,eAAe,GAAG,IAAI,CAAC;AAC7D,sBAAgB;AAAA,IACjB;AAAA,EACF;AACD,SAAO;AACT;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"_optionalChain.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js"],"sourcesContent":["/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n"],"names":[],"mappings":";;AAUA,SAAS,eAAe,KAAK;AAC3B,MAAI,gBAAgB;AACpB,MAAI,QAAQ,IAAI,CAAC;AACjB,MAAI,IAAI;AACR,SAAO,IAAI,IAAI,QAAQ;AACrB,UAAM,KAAK,IAAI,CAAC;AAChB,UAAM,KAAK,IAAI,IAAI,CAAC;AACpB,SAAK;AAEL,SAAK,OAAO,oBAAoB,OAAO,mBAAmB,SAAS,MAAM;AAEvE;AAAA,IACF;AACA,QAAI,OAAO,YAAY,OAAO,kBAAkB;AAC9C,sBAAgB;AAChB,cAAQ,GAAG,KAAK;AAAA,IAClB,WAAW,OAAO,UAAU,OAAO,gBAAgB;AACjD,cAAQ,GAAG,IAAI,SAAU,MAAQ,KAAK,eAAe,GAAG,IAAI,CAAC;AAC7D,sBAAgB;AAAA,IAClB;AAAA,EACF;AACA,SAAO;AACT;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"_optionalChain.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js"],"sourcesContent":["/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n"],"names":[],"mappings":"AAUA,SAAS,eAAe,KAAK;AAC3B,MAAI,gBAAgB;AACpB,MAAI,QAAQ,IAAI,CAAC;AACjB,MAAI,IAAI;AACR,SAAO,IAAI,IAAI,QAAQ;AACrB,UAAM,KAAK,IAAI,CAAC;AAChB,UAAM,KAAK,IAAI,IAAI,CAAC;AACpB,SAAK;AAEL,SAAK,OAAO,oBAAoB,OAAO,mBAAmB,SAAS,MAAM;AAEvE;AAAA,IACD;AACD,QAAI,OAAO,YAAY,OAAO,kBAAkB;AAC9C,sBAAgB;AAChB,cAAQ,GAAG,KAAK;AAAA,IACjB,WAAU,OAAO,UAAU,OAAO,gBAAgB;AACjD,cAAQ,GAAG,IAAI,SAAU,MAAQ,KAAK,eAAe,GAAG,IAAI,CAAC;AAC7D,sBAAgB;AAAA,IACjB;AAAA,EACF;AACD,SAAO;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"_optionalChain.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js"],"sourcesContent":["/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n"],"names":[],"mappings":"AAUA,SAAS,eAAe,KAAK;AAC3B,MAAI,gBAAgB;AACpB,MAAI,QAAQ,IAAI,CAAC;AACjB,MAAI,IAAI;AACR,SAAO,IAAI,IAAI,QAAQ;AACrB,UAAM,KAAK,IAAI,CAAC;AAChB,UAAM,KAAK,IAAI,IAAI,CAAC;AACpB,SAAK;AAEL,SAAK,OAAO,oBAAoB,OAAO,mBAAmB,SAAS,MAAM;AAEvE;AAAA,IACF;AACA,QAAI,OAAO,YAAY,OAAO,kBAAkB;AAC9C,sBAAgB;AAChB,cAAQ,GAAG,KAAK;AAAA,IAClB,WAAW,OAAO,UAAU,OAAO,gBAAgB;AACjD,cAAQ,GAAG,IAAI,SAAU,MAAQ,KAAK,eAAe,GAAG,IAAI,CAAC;AAC7D,sBAAgB;AAAA,IAClB;AAAA,EACF;AACA,SAAO;AACT;","x_google_ignoreList":[0]}