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":"local-variables-sync.cjs","sources":["../../../../../../../../../node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, convertIntegrationFnToClass, getClient } from '@sentry/core';\nimport { LRUMap, logger } from '@sentry/utils';\nimport { NODE_VERSION } from '../../nodeVersion.js';\nimport { createRateLimiter, hashFromStack, hashFrames, functionNamesMatch } from './common.js';\n\n/* eslint-disable max-lines */\n\n/** Creates a container for callbacks to be called sequentially */\nfunction createCallbackList(complete) {\n // A collection of callbacks to be executed last to first\n let callbacks = [];\n\n let completedCalled = false;\n function checkedComplete(result) {\n callbacks = [];\n if (completedCalled) {\n return;\n }\n completedCalled = true;\n complete(result);\n }\n\n // complete should be called last\n callbacks.push(checkedComplete);\n\n function add(fn) {\n callbacks.push(fn);\n }\n\n function next(result) {\n const popped = callbacks.pop() || checkedComplete;\n\n try {\n popped(result);\n } catch (_) {\n // If there is an error, we still want to call the complete callback\n checkedComplete(result);\n }\n }\n\n return { add, next };\n}\n\n/**\n * Promise API is available as `Experimental` and in Node 19 only.\n *\n * Callback-based API is `Stable` since v14 and `Experimental` since v8.\n * Because of that, we are creating our own `AsyncSession` class.\n *\n * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api\n * https://nodejs.org/docs/latest-v14.x/api/inspector.html\n */\nclass AsyncSession {\n\n /** Throws if inspector API is not available */\n constructor() {\n /*\n TODO: We really should get rid of this require statement below for a couple of reasons:\n 1. It makes the integration unusable in the SvelteKit SDK, as it's not possible to use `require`\n in SvelteKit server code (at least not by default).\n 2. Throwing in a constructor is bad practice\n\n More context for a future attempt to fix this:\n We already tried replacing it with import but didn't get it to work because of async problems.\n We still called import in the constructor but assigned to a promise which we \"awaited\" in\n `configureAndConnect`. However, this broke the Node integration tests as no local variables\n were reported any more. We probably missed a place where we need to await the promise, too.\n */\n\n // Node can be built without inspector support so this can throw\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { Session } = require('inspector');\n this._session = new Session();\n }\n\n /** @inheritdoc */\n configureAndConnect(onPause, captureAll) {\n this._session.connect();\n\n this._session.on('Debugger.paused', event => {\n onPause(event, () => {\n // After the pause work is complete, resume execution or the exception context memory is leaked\n this._session.post('Debugger.resume');\n });\n });\n\n this._session.post('Debugger.enable');\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n setPauseOnExceptions(captureAll) {\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n /** @inheritdoc */\n getLocalVariables(objectId, complete) {\n this._getProperties(objectId, props => {\n const { add, next } = createCallbackList(complete);\n\n for (const prop of props) {\n if (_optionalChain([prop, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.objectId]) && _optionalChain([prop, 'optionalAccess', _4 => _4.value, 'access', _5 => _5.className]) === 'Array') {\n const id = prop.value.objectId;\n add(vars => this._unrollArray(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _6 => _6.value, 'optionalAccess', _7 => _7.objectId]) && _optionalChain([prop, 'optionalAccess', _8 => _8.value, 'optionalAccess', _9 => _9.className]) === 'Object') {\n const id = prop.value.objectId;\n add(vars => this._unrollObject(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _10 => _10.value, 'optionalAccess', _11 => _11.value]) != null || _optionalChain([prop, 'optionalAccess', _12 => _12.value, 'optionalAccess', _13 => _13.description]) != null) {\n add(vars => this._unrollOther(prop, vars, next));\n }\n }\n\n next({});\n });\n }\n\n /**\n * Gets all the PropertyDescriptors of an object\n */\n _getProperties(objectId, next) {\n this._session.post(\n 'Runtime.getProperties',\n {\n objectId,\n ownProperties: true,\n },\n (err, params) => {\n if (err) {\n next([]);\n } else {\n next(params.result);\n }\n },\n );\n }\n\n /**\n * Unrolls an array property\n */\n _unrollArray(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))\n .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))\n .map(v => _optionalChain([v, 'optionalAccess', _14 => _14.value, 'optionalAccess', _15 => _15.value]));\n\n next(vars);\n });\n }\n\n /**\n * Unrolls an object property\n */\n _unrollObject(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .map(v => [v.name, _optionalChain([v, 'optionalAccess', _16 => _16.value, 'optionalAccess', _17 => _17.value])])\n .reduce((obj, [key, val]) => {\n obj[key] = val;\n return obj;\n }, {} );\n\n next(vars);\n });\n }\n\n /**\n * Unrolls other properties\n */\n _unrollOther(prop, vars, next) {\n if (_optionalChain([prop, 'optionalAccess', _18 => _18.value, 'optionalAccess', _19 => _19.value]) != null) {\n vars[prop.name] = prop.value.value;\n } else if (_optionalChain([prop, 'optionalAccess', _20 => _20.value, 'optionalAccess', _21 => _21.description]) != null && _optionalChain([prop, 'optionalAccess', _22 => _22.value, 'optionalAccess', _23 => _23.type]) !== 'function') {\n vars[prop.name] = `<${prop.value.description}>`;\n }\n\n next(vars);\n }\n}\n\n/**\n * When using Vercel pkg, the inspector module is not available.\n * https://github.com/getsentry/sentry-javascript/issues/6769\n */\nfunction tryNewAsyncSession() {\n try {\n return new AsyncSession();\n } catch (e) {\n return undefined;\n }\n}\n\nconst INTEGRATION_NAME = 'LocalVariables';\n\n/**\n * Adds local variables to exception frames\n */\nconst _localVariablesSyncIntegration = ((\n options = {},\n session = tryNewAsyncSession(),\n) => {\n const cachedFrames = new LRUMap(20);\n let rateLimiter;\n let shouldProcessEvent = false;\n\n function handlePaused(\n stackParser,\n { params: { reason, data, callFrames } },\n complete,\n ) {\n if (reason !== 'exception' && reason !== 'promiseRejection') {\n complete();\n return;\n }\n\n _optionalChain([rateLimiter, 'optionalCall', _24 => _24()]);\n\n // data.description contains the original error.stack\n const exceptionHash = hashFromStack(stackParser, _optionalChain([data, 'optionalAccess', _25 => _25.description]));\n\n if (exceptionHash == undefined) {\n complete();\n return;\n }\n\n const { add, next } = createCallbackList(frames => {\n cachedFrames.set(exceptionHash, frames);\n complete();\n });\n\n // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack\n // For this reason we only attempt to get local variables for the first 5 frames\n for (let i = 0; i < Math.min(callFrames.length, 5); i++) {\n const { scopeChain, functionName, this: obj } = callFrames[i];\n\n const localScope = scopeChain.find(scope => scope.type === 'local');\n\n // obj.className is undefined in ESM modules\n const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;\n\n if (_optionalChain([localScope, 'optionalAccess', _26 => _26.object, 'access', _27 => _27.objectId]) === undefined) {\n add(frames => {\n frames[i] = { function: fn };\n next(frames);\n });\n } else {\n const id = localScope.object.objectId;\n add(frames =>\n _optionalChain([session, 'optionalAccess', _28 => _28.getLocalVariables, 'call', _29 => _29(id, vars => {\n frames[i] = { function: fn, vars };\n next(frames);\n })]),\n );\n }\n }\n\n next([]);\n }\n\n function addLocalVariablesToException(exception) {\n const hash = hashFrames(_optionalChain([exception, 'optionalAccess', _30 => _30.stacktrace, 'optionalAccess', _31 => _31.frames]));\n\n if (hash === undefined) {\n return;\n }\n\n // Check if we have local variables for an exception that matches the hash\n // remove is identical to get but also removes the entry from the cache\n const cachedFrame = cachedFrames.remove(hash);\n\n if (cachedFrame === undefined) {\n return;\n }\n\n // Filter out frames where the function name is `new Promise` since these are in the error.stack frames\n // but do not appear in the debugger call frames\n const frames = (_optionalChain([exception, 'access', _32 => _32.stacktrace, 'optionalAccess', _33 => _33.frames]) || []).filter(frame => frame.function !== 'new Promise');\n\n for (let i = 0; i < frames.length; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frames.length - i - 1;\n\n // Drop out if we run out of frames to match up\n if (!frames[frameIndex] || !cachedFrame[i]) {\n break;\n }\n\n if (\n // We need to have vars to add\n cachedFrame[i].vars === undefined ||\n // We're not interested in frames that are not in_app because the vars are not relevant\n frames[frameIndex].in_app === false ||\n // The function names need to match\n !functionNamesMatch(frames[frameIndex].function, cachedFrame[i].function)\n ) {\n continue;\n }\n\n frames[frameIndex].vars = cachedFrame[i].vars;\n }\n }\n\n function addLocalVariablesToEvent(event) {\n for (const exception of _optionalChain([event, 'optionalAccess', _34 => _34.exception, 'optionalAccess', _35 => _35.values]) || []) {\n addLocalVariablesToException(exception);\n }\n\n return event;\n }\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const client = getClient();\n const clientOptions = _optionalChain([client, 'optionalAccess', _36 => _36.getOptions, 'call', _37 => _37()]);\n\n if (session && _optionalChain([clientOptions, 'optionalAccess', _38 => _38.includeLocalVariables])) {\n // Only setup this integration if the Node version is >= v18\n // https://github.com/getsentry/sentry-javascript/issues/7697\n const unsupportedNodeVersion = NODE_VERSION.major < 18;\n\n if (unsupportedNodeVersion) {\n logger.log('The `LocalVariables` integration is only supported on Node >= v18.');\n return;\n }\n\n const captureAll = options.captureAllExceptions !== false;\n\n session.configureAndConnect(\n (ev, complete) =>\n handlePaused(clientOptions.stackParser, ev , complete),\n captureAll,\n );\n\n if (captureAll) {\n const max = options.maxExceptionsPerSecond || 50;\n\n rateLimiter = createRateLimiter(\n max,\n () => {\n logger.log('Local variables rate-limit lifted.');\n _optionalChain([session, 'optionalAccess', _39 => _39.setPauseOnExceptions, 'call', _40 => _40(true)]);\n },\n seconds => {\n logger.log(\n `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,\n );\n _optionalChain([session, 'optionalAccess', _41 => _41.setPauseOnExceptions, 'call', _42 => _42(false)]);\n },\n );\n }\n\n shouldProcessEvent = true;\n }\n },\n processEvent(event) {\n if (shouldProcessEvent) {\n return addLocalVariablesToEvent(event);\n }\n\n return event;\n },\n // These are entirely for testing\n _getCachedFramesCount() {\n return cachedFrames.size;\n },\n _getFirstCachedFrame() {\n return cachedFrames.values()[0];\n },\n };\n}) ;\n\nconst localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);\n\n/**\n * Adds local variables to exception frames.\n * @deprecated Use `localVariablesSyncIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LocalVariablesSync = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n localVariablesSyncIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { LocalVariablesSync, createCallbackList, localVariablesSyncIntegration };\n//# sourceMappingURL=local-variables-sync.js.map\n"],"names":["_optionalChain","LRUMap","hashFromStack","hashFrames","functionNamesMatch","getClient","NODE_VERSION","logger","createRateLimiter","defineIntegration","convertIntegrationFnToClass"],"mappings":";;;;;;;;;AASA,SAAS,mBAAmB,UAAU;AAEpC,MAAI,YAAY,CAAA;AAEhB,MAAI,kBAAkB;AACtB,WAAS,gBAAgB,QAAQ;AAC/B,gBAAY,CAAA;AACZ,QAAI,iBAAiB;AACnB;AAAA,IACD;AACD,sBAAkB;AAClB,aAAS,MAAM;AAAA,EAChB;AAGD,YAAU,KAAK,eAAe;AAE9B,WAAS,IAAI,IAAI;AACf,cAAU,KAAK,EAAE;AAAA,EAClB;AAED,WAAS,KAAK,QAAQ;AACpB,UAAM,SAAS,UAAU,IAAG,KAAM;AAElC,QAAI;AACF,aAAO,MAAM;AAAA,IACd,SAAQ,GAAG;AAEV,sBAAgB,MAAM;AAAA,IACvB;AAAA,EACF;AAED,SAAO,EAAE,KAAK;AAChB;AAWA,MAAM,aAAc;AAAA;AAAA,EAGjB,cAAc;AAgBb,UAAM,EAAE,QAAO,IAAK,QAAQ,WAAW;AACvC,SAAK,WAAW,IAAI;EACrB;AAAA;AAAA,EAGA,oBAAoB,SAAS,YAAY;AACxC,SAAK,SAAS;AAEd,SAAK,SAAS,GAAG,mBAAmB,WAAS;AAC3C,cAAQ,OAAO,MAAM;AAEnB,aAAK,SAAS,KAAK,i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;AAAA,YACA,MAAM;AACJD,4BAAO,IAAI,oCAAoC;AAC/CP,6BAAAA,eAAe,CAAC,SAAS,kBAAkB,SAAO,IAAI,sBAAsB,QAAQ,SAAO,IAAI,IAAI,CAAC,CAAC;AAAA,YACtG;AAAA,YACD,aAAW;AACTO,qBAAAA,OAAO;AAAA,gBACL,qFAAqF,OAAO;AAAA,cAC5G;AACcP,6BAAAA,eAAe,CAAC,SAAS,kBAAkB,SAAO,IAAI,sBAAsB,QAAQ,SAAO,IAAI,KAAK,CAAC,CAAC;AAAA,YACvG;AAAA,UACb;AAAA,QACS;AAED,6BAAqB;AAAA,MACtB;AAAA,IACF;AAAA,IACD,aAAa,OAAO;AAClB,UAAI,oBAAoB;AACtB,eAAO,yBAAyB,KAAK;AAAA,MACtC;AAED,aAAO;AAAA,IACR;AAAA;AAAA,IAED,wBAAwB;AACtB,aAAO,aAAa;AAAA,IACrB;AAAA,IACD,uBAAuB;AACrB,aAAO,aAAa,SAAS,CAAC;AAAA,IAC/B;AAAA,EACL;AACA;AAEK,MAAC,gCAAgCS,YAAiB,kBAAC,8BAA8B;AAO3DC,YAA2B;AAAA,EACpD;AAAA,EACA;AACF;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"local-variables-sync.cjs","sources":["../../../../../../../../../node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, convertIntegrationFnToClass, getClient } from '@sentry/core';\nimport { LRUMap, logger } from '@sentry/utils';\nimport { NODE_VERSION } from '../../nodeVersion.js';\nimport { createRateLimiter, hashFromStack, hashFrames, functionNamesMatch } from './common.js';\n\n/* eslint-disable max-lines */\n\n/** Creates a container for callbacks to be called sequentially */\nfunction createCallbackList(complete) {\n // A collection of callbacks to be executed last to first\n let callbacks = [];\n\n let completedCalled = false;\n function checkedComplete(result) {\n callbacks = [];\n if (completedCalled) {\n return;\n }\n completedCalled = true;\n complete(result);\n }\n\n // complete should be called last\n callbacks.push(checkedComplete);\n\n function add(fn) {\n callbacks.push(fn);\n }\n\n function next(result) {\n const popped = callbacks.pop() || checkedComplete;\n\n try {\n popped(result);\n } catch (_) {\n // If there is an error, we still want to call the complete callback\n checkedComplete(result);\n }\n }\n\n return { add, next };\n}\n\n/**\n * Promise API is available as `Experimental` and in Node 19 only.\n *\n * Callback-based API is `Stable` since v14 and `Experimental` since v8.\n * Because of that, we are creating our own `AsyncSession` class.\n *\n * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api\n * https://nodejs.org/docs/latest-v14.x/api/inspector.html\n */\nclass AsyncSession {\n\n /** Throws if inspector API is not available */\n constructor() {\n /*\n TODO: We really should get rid of this require statement below for a couple of reasons:\n 1. It makes the integration unusable in the SvelteKit SDK, as it's not possible to use `require`\n in SvelteKit server code (at least not by default).\n 2. Throwing in a constructor is bad practice\n\n More context for a future attempt to fix this:\n We already tried replacing it with import but didn't get it to work because of async problems.\n We still called import in the constructor but assigned to a promise which we \"awaited\" in\n `configureAndConnect`. However, this broke the Node integration tests as no local variables\n were reported any more. We probably missed a place where we need to await the promise, too.\n */\n\n // Node can be built without inspector support so this can throw\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { Session } = require('inspector');\n this._session = new Session();\n }\n\n /** @inheritdoc */\n configureAndConnect(onPause, captureAll) {\n this._session.connect();\n\n this._session.on('Debugger.paused', event => {\n onPause(event, () => {\n // After the pause work is complete, resume execution or the exception context memory is leaked\n this._session.post('Debugger.resume');\n });\n });\n\n this._session.post('Debugger.enable');\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n setPauseOnExceptions(captureAll) {\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n /** @inheritdoc */\n getLocalVariables(objectId, complete) {\n this._getProperties(objectId, props => {\n const { add, next } = createCallbackList(complete);\n\n for (const prop of props) {\n if (_optionalChain([prop, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.objectId]) && _optionalChain([prop, 'optionalAccess', _4 => _4.value, 'access', _5 => _5.className]) === 'Array') {\n const id = prop.value.objectId;\n add(vars => this._unrollArray(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _6 => _6.value, 'optionalAccess', _7 => _7.objectId]) && _optionalChain([prop, 'optionalAccess', _8 => _8.value, 'optionalAccess', _9 => _9.className]) === 'Object') {\n const id = prop.value.objectId;\n add(vars => this._unrollObject(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _10 => _10.value, 'optionalAccess', _11 => _11.value]) != null || _optionalChain([prop, 'optionalAccess', _12 => _12.value, 'optionalAccess', _13 => _13.description]) != null) {\n add(vars => this._unrollOther(prop, vars, next));\n }\n }\n\n next({});\n });\n }\n\n /**\n * Gets all the PropertyDescriptors of an object\n */\n _getProperties(objectId, next) {\n this._session.post(\n 'Runtime.getProperties',\n {\n objectId,\n ownProperties: true,\n },\n (err, params) => {\n if (err) {\n next([]);\n } else {\n next(params.result);\n }\n },\n );\n }\n\n /**\n * Unrolls an array property\n */\n _unrollArray(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))\n .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))\n .map(v => _optionalChain([v, 'optionalAccess', _14 => _14.value, 'optionalAccess', _15 => _15.value]));\n\n next(vars);\n });\n }\n\n /**\n * Unrolls an object property\n */\n _unrollObject(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .map(v => [v.name, _optionalChain([v, 'optionalAccess', _16 => _16.value, 'optionalAccess', _17 => _17.value])])\n .reduce((obj, [key, val]) => {\n obj[key] = val;\n return obj;\n }, {} );\n\n next(vars);\n });\n }\n\n /**\n * Unrolls other properties\n */\n _unrollOther(prop, vars, next) {\n if (_optionalChain([prop, 'optionalAccess', _18 => _18.value, 'optionalAccess', _19 => _19.value]) != null) {\n vars[prop.name] = prop.value.value;\n } else if (_optionalChain([prop, 'optionalAccess', _20 => _20.value, 'optionalAccess', _21 => _21.description]) != null && _optionalChain([prop, 'optionalAccess', _22 => _22.value, 'optionalAccess', _23 => _23.type]) !== 'function') {\n vars[prop.name] = `<${prop.value.description}>`;\n }\n\n next(vars);\n }\n}\n\n/**\n * When using Vercel pkg, the inspector module is not available.\n * https://github.com/getsentry/sentry-javascript/issues/6769\n */\nfunction tryNewAsyncSession() {\n try {\n return new AsyncSession();\n } catch (e) {\n return undefined;\n }\n}\n\nconst INTEGRATION_NAME = 'LocalVariables';\n\n/**\n * Adds local variables to exception frames\n */\nconst _localVariablesSyncIntegration = ((\n options = {},\n session = tryNewAsyncSession(),\n) => {\n const cachedFrames = new LRUMap(20);\n let rateLimiter;\n let shouldProcessEvent = false;\n\n function handlePaused(\n stackParser,\n { params: { reason, data, callFrames } },\n complete,\n ) {\n if (reason !== 'exception' && reason !== 'promiseRejection') {\n complete();\n return;\n }\n\n _optionalChain([rateLimiter, 'optionalCall', _24 => _24()]);\n\n // data.description contains the original error.stack\n const exceptionHash = hashFromStack(stackParser, _optionalChain([data, 'optionalAccess', _25 => _25.description]));\n\n if (exceptionHash == undefined) {\n complete();\n return;\n }\n\n const { add, next } = createCallbackList(frames => {\n cachedFrames.set(exceptionHash, frames);\n complete();\n });\n\n // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack\n // For this reason we only attempt to get local variables for the first 5 frames\n for (let i = 0; i < Math.min(callFrames.length, 5); i++) {\n const { scopeChain, functionName, this: obj } = callFrames[i];\n\n const localScope = scopeChain.find(scope => scope.type === 'local');\n\n // obj.className is undefined in ESM modules\n const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;\n\n if (_optionalChain([localScope, 'optionalAccess', _26 => _26.object, 'access', _27 => _27.objectId]) === undefined) {\n add(frames => {\n frames[i] = { function: fn };\n next(frames);\n });\n } else {\n const id = localScope.object.objectId;\n add(frames =>\n _optionalChain([session, 'optionalAccess', _28 => _28.getLocalVariables, 'call', _29 => _29(id, vars => {\n frames[i] = { function: fn, vars };\n next(frames);\n })]),\n );\n }\n }\n\n next([]);\n }\n\n function addLocalVariablesToException(exception) {\n const hash = hashFrames(_optionalChain([exception, 'optionalAccess', _30 => _30.stacktrace, 'optionalAccess', _31 => _31.frames]));\n\n if (hash === undefined) {\n return;\n }\n\n // Check if we have local variables for an exception that matches the hash\n // remove is identical to get but also removes the entry from the cache\n const cachedFrame = cachedFrames.remove(hash);\n\n if (cachedFrame === undefined) {\n return;\n }\n\n // Filter out frames where the function name is `new Promise` since these are in the error.stack frames\n // but do not appear in the debugger call frames\n const frames = (_optionalChain([exception, 'access', _32 => _32.stacktrace, 'optionalAccess', _33 => _33.frames]) || []).filter(frame => frame.function !== 'new Promise');\n\n for (let i = 0; i < frames.length; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frames.length - i - 1;\n\n // Drop out if we run out of frames to match up\n if (!frames[frameIndex] || !cachedFrame[i]) {\n break;\n }\n\n if (\n // We need to have vars to add\n cachedFrame[i].vars === undefined ||\n // We're not interested in frames that are not in_app because the vars are not relevant\n frames[frameIndex].in_app === false ||\n // The function names need to match\n !functionNamesMatch(frames[frameIndex].function, cachedFrame[i].function)\n ) {\n continue;\n }\n\n frames[frameIndex].vars = cachedFrame[i].vars;\n }\n }\n\n function addLocalVariablesToEvent(event) {\n for (const exception of _optionalChain([event, 'optionalAccess', _34 => _34.exception, 'optionalAccess', _35 => _35.values]) || []) {\n addLocalVariablesToException(exception);\n }\n\n return event;\n }\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const client = getClient();\n const clientOptions = _optionalChain([client, 'optionalAccess', _36 => _36.getOptions, 'call', _37 => _37()]);\n\n if (session && _optionalChain([clientOptions, 'optionalAccess', _38 => _38.includeLocalVariables])) {\n // Only setup this integration if the Node version is >= v18\n // https://github.com/getsentry/sentry-javascript/issues/7697\n const unsupportedNodeVersion = NODE_VERSION.major < 18;\n\n if (unsupportedNodeVersion) {\n logger.log('The `LocalVariables` integration is only supported on Node >= v18.');\n return;\n }\n\n const captureAll = options.captureAllExceptions !== false;\n\n session.configureAndConnect(\n (ev, complete) =>\n handlePaused(clientOptions.stackParser, ev , complete),\n captureAll,\n );\n\n if (captureAll) {\n const max = options.maxExceptionsPerSecond || 50;\n\n rateLimiter = createRateLimiter(\n max,\n () => {\n logger.log('Local variables rate-limit lifted.');\n _optionalChain([session, 'optionalAccess', _39 => _39.setPauseOnExceptions, 'call', _40 => _40(true)]);\n },\n seconds => {\n logger.log(\n `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,\n );\n _optionalChain([session, 'optionalAccess', _41 => _41.setPauseOnExceptions, 'call', _42 => _42(false)]);\n },\n );\n }\n\n shouldProcessEvent = true;\n }\n },\n processEvent(event) {\n if (shouldProcessEvent) {\n return addLocalVariablesToEvent(event);\n }\n\n return event;\n },\n // These are entirely for testing\n _getCachedFramesCount() {\n return cachedFrames.size;\n },\n _getFirstCachedFrame() {\n return cachedFrames.values()[0];\n },\n };\n}) ;\n\nconst localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);\n\n/**\n * Adds local variables to exception frames.\n * @deprecated Use `localVariablesSyncIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LocalVariablesSync = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n localVariablesSyncIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { LocalVariablesSync, createCallbackList, localVariablesSyncIntegration };\n//# sourceMappingURL=local-variables-sync.js.map\n"],"names":["_optionalChain","LRUMap","hashFromStack","hashFrames","functionNamesMatch","getClient","NODE_VERSION","logger","createRateLimiter","defineIntegration","convertIntegrationFnToClass"],"mappings":";;;;;;;;;AASA,SAAS,mBAAmB,UAAU;AAEpC,MAAI,YAAY,CAAA;AAEhB,MAAI,kBAAkB;AACtB,WAAS,gBAAgB,QAAQ;AAC/B,gBAAY,CA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EA,wBAAwB;AACtB,aAAO,aAAa;AAAA,IACtB;AAAA,IACA,uBAAuB;AACrB,aAAO,aAAa,OAAM,EAAG,CAAC;AAAA,IAChC;AAAA,EACJ;AACA;AAEK,MAAC,gCAAgCS,YAAAA,kBAAkB,8BAA8B;AAO3DC,YAAAA;AAAAA,EACzB;AAAA,EACA;AACF;;;","x_google_ignoreList":[0]}
@@ -1,10 +1,10 @@
1
1
  import { NODE_VERSION } from "../../nodeVersion.js";
2
2
  import { createRateLimiter, hashFromStack, hashFrames, functionNamesMatch } from "./common.js";
3
3
  import { defineIntegration, convertIntegrationFnToClass } from './../../../_node_modules/@sentry/core/esm/integration.js';
4
+ import { LRUMap } from './../../../_node_modules/@sentry/utils/esm/lru.js';
4
5
  import { getClient } from './../../../_node_modules/@sentry/core/esm/exports.js';
5
6
  import { _optionalChain } from './../../../_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js';
6
7
  import { logger } from './../../../_node_modules/@sentry/utils/esm/logger.js';
7
- import { LRUMap } from './../../../_node_modules/@sentry/utils/esm/lru.js';
8
8
  function createCallbackList(complete) {
9
9
  let callbacks = [];
10
10
  let completedCalled = false;
@@ -1 +1 @@
1
- {"version":3,"file":"local-variables-sync.js","sources":["../../../../../../../../../node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, convertIntegrationFnToClass, getClient } from '@sentry/core';\nimport { LRUMap, logger } from '@sentry/utils';\nimport { NODE_VERSION } from '../../nodeVersion.js';\nimport { createRateLimiter, hashFromStack, hashFrames, functionNamesMatch } from './common.js';\n\n/* eslint-disable max-lines */\n\n/** Creates a container for callbacks to be called sequentially */\nfunction createCallbackList(complete) {\n // A collection of callbacks to be executed last to first\n let callbacks = [];\n\n let completedCalled = false;\n function checkedComplete(result) {\n callbacks = [];\n if (completedCalled) {\n return;\n }\n completedCalled = true;\n complete(result);\n }\n\n // complete should be called last\n callbacks.push(checkedComplete);\n\n function add(fn) {\n callbacks.push(fn);\n }\n\n function next(result) {\n const popped = callbacks.pop() || checkedComplete;\n\n try {\n popped(result);\n } catch (_) {\n // If there is an error, we still want to call the complete callback\n checkedComplete(result);\n }\n }\n\n return { add, next };\n}\n\n/**\n * Promise API is available as `Experimental` and in Node 19 only.\n *\n * Callback-based API is `Stable` since v14 and `Experimental` since v8.\n * Because of that, we are creating our own `AsyncSession` class.\n *\n * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api\n * https://nodejs.org/docs/latest-v14.x/api/inspector.html\n */\nclass AsyncSession {\n\n /** Throws if inspector API is not available */\n constructor() {\n /*\n TODO: We really should get rid of this require statement below for a couple of reasons:\n 1. It makes the integration unusable in the SvelteKit SDK, as it's not possible to use `require`\n in SvelteKit server code (at least not by default).\n 2. Throwing in a constructor is bad practice\n\n More context for a future attempt to fix this:\n We already tried replacing it with import but didn't get it to work because of async problems.\n We still called import in the constructor but assigned to a promise which we \"awaited\" in\n `configureAndConnect`. However, this broke the Node integration tests as no local variables\n were reported any more. We probably missed a place where we need to await the promise, too.\n */\n\n // Node can be built without inspector support so this can throw\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { Session } = require('inspector');\n this._session = new Session();\n }\n\n /** @inheritdoc */\n configureAndConnect(onPause, captureAll) {\n this._session.connect();\n\n this._session.on('Debugger.paused', event => {\n onPause(event, () => {\n // After the pause work is complete, resume execution or the exception context memory is leaked\n this._session.post('Debugger.resume');\n });\n });\n\n this._session.post('Debugger.enable');\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n setPauseOnExceptions(captureAll) {\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n /** @inheritdoc */\n getLocalVariables(objectId, complete) {\n this._getProperties(objectId, props => {\n const { add, next } = createCallbackList(complete);\n\n for (const prop of props) {\n if (_optionalChain([prop, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.objectId]) && _optionalChain([prop, 'optionalAccess', _4 => _4.value, 'access', _5 => _5.className]) === 'Array') {\n const id = prop.value.objectId;\n add(vars => this._unrollArray(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _6 => _6.value, 'optionalAccess', _7 => _7.objectId]) && _optionalChain([prop, 'optionalAccess', _8 => _8.value, 'optionalAccess', _9 => _9.className]) === 'Object') {\n const id = prop.value.objectId;\n add(vars => this._unrollObject(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _10 => _10.value, 'optionalAccess', _11 => _11.value]) != null || _optionalChain([prop, 'optionalAccess', _12 => _12.value, 'optionalAccess', _13 => _13.description]) != null) {\n add(vars => this._unrollOther(prop, vars, next));\n }\n }\n\n next({});\n });\n }\n\n /**\n * Gets all the PropertyDescriptors of an object\n */\n _getProperties(objectId, next) {\n this._session.post(\n 'Runtime.getProperties',\n {\n objectId,\n ownProperties: true,\n },\n (err, params) => {\n if (err) {\n next([]);\n } else {\n next(params.result);\n }\n },\n );\n }\n\n /**\n * Unrolls an array property\n */\n _unrollArray(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))\n .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))\n .map(v => _optionalChain([v, 'optionalAccess', _14 => _14.value, 'optionalAccess', _15 => _15.value]));\n\n next(vars);\n });\n }\n\n /**\n * Unrolls an object property\n */\n _unrollObject(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .map(v => [v.name, _optionalChain([v, 'optionalAccess', _16 => _16.value, 'optionalAccess', _17 => _17.value])])\n .reduce((obj, [key, val]) => {\n obj[key] = val;\n return obj;\n }, {} );\n\n next(vars);\n });\n }\n\n /**\n * Unrolls other properties\n */\n _unrollOther(prop, vars, next) {\n if (_optionalChain([prop, 'optionalAccess', _18 => _18.value, 'optionalAccess', _19 => _19.value]) != null) {\n vars[prop.name] = prop.value.value;\n } else if (_optionalChain([prop, 'optionalAccess', _20 => _20.value, 'optionalAccess', _21 => _21.description]) != null && _optionalChain([prop, 'optionalAccess', _22 => _22.value, 'optionalAccess', _23 => _23.type]) !== 'function') {\n vars[prop.name] = `<${prop.value.description}>`;\n }\n\n next(vars);\n }\n}\n\n/**\n * When using Vercel pkg, the inspector module is not available.\n * https://github.com/getsentry/sentry-javascript/issues/6769\n */\nfunction tryNewAsyncSession() {\n try {\n return new AsyncSession();\n } catch (e) {\n return undefined;\n }\n}\n\nconst INTEGRATION_NAME = 'LocalVariables';\n\n/**\n * Adds local variables to exception frames\n */\nconst _localVariablesSyncIntegration = ((\n options = {},\n session = tryNewAsyncSession(),\n) => {\n const cachedFrames = new LRUMap(20);\n let rateLimiter;\n let shouldProcessEvent = false;\n\n function handlePaused(\n stackParser,\n { params: { reason, data, callFrames } },\n complete,\n ) {\n if (reason !== 'exception' && reason !== 'promiseRejection') {\n complete();\n return;\n }\n\n _optionalChain([rateLimiter, 'optionalCall', _24 => _24()]);\n\n // data.description contains the original error.stack\n const exceptionHash = hashFromStack(stackParser, _optionalChain([data, 'optionalAccess', _25 => _25.description]));\n\n if (exceptionHash == undefined) {\n complete();\n return;\n }\n\n const { add, next } = createCallbackList(frames => {\n cachedFrames.set(exceptionHash, frames);\n complete();\n });\n\n // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack\n // For this reason we only attempt to get local variables for the first 5 frames\n for (let i = 0; i < Math.min(callFrames.length, 5); i++) {\n const { scopeChain, functionName, this: obj } = callFrames[i];\n\n const localScope = scopeChain.find(scope => scope.type === 'local');\n\n // obj.className is undefined in ESM modules\n const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;\n\n if (_optionalChain([localScope, 'optionalAccess', _26 => _26.object, 'access', _27 => _27.objectId]) === undefined) {\n add(frames => {\n frames[i] = { function: fn };\n next(frames);\n });\n } else {\n const id = localScope.object.objectId;\n add(frames =>\n _optionalChain([session, 'optionalAccess', _28 => _28.getLocalVariables, 'call', _29 => _29(id, vars => {\n frames[i] = { function: fn, vars };\n next(frames);\n })]),\n );\n }\n }\n\n next([]);\n }\n\n function addLocalVariablesToException(exception) {\n const hash = hashFrames(_optionalChain([exception, 'optionalAccess', _30 => _30.stacktrace, 'optionalAccess', _31 => _31.frames]));\n\n if (hash === undefined) {\n return;\n }\n\n // Check if we have local variables for an exception that matches the hash\n // remove is identical to get but also removes the entry from the cache\n const cachedFrame = cachedFrames.remove(hash);\n\n if (cachedFrame === undefined) {\n return;\n }\n\n // Filter out frames where the function name is `new Promise` since these are in the error.stack frames\n // but do not appear in the debugger call frames\n const frames = (_optionalChain([exception, 'access', _32 => _32.stacktrace, 'optionalAccess', _33 => _33.frames]) || []).filter(frame => frame.function !== 'new Promise');\n\n for (let i = 0; i < frames.length; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frames.length - i - 1;\n\n // Drop out if we run out of frames to match up\n if (!frames[frameIndex] || !cachedFrame[i]) {\n break;\n }\n\n if (\n // We need to have vars to add\n cachedFrame[i].vars === undefined ||\n // We're not interested in frames that are not in_app because the vars are not relevant\n frames[frameIndex].in_app === false ||\n // The function names need to match\n !functionNamesMatch(frames[frameIndex].function, cachedFrame[i].function)\n ) {\n continue;\n }\n\n frames[frameIndex].vars = cachedFrame[i].vars;\n }\n }\n\n function addLocalVariablesToEvent(event) {\n for (const exception of _optionalChain([event, 'optionalAccess', _34 => _34.exception, 'optionalAccess', _35 => _35.values]) || []) {\n addLocalVariablesToException(exception);\n }\n\n return event;\n }\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const client = getClient();\n const clientOptions = _optionalChain([client, 'optionalAccess', _36 => _36.getOptions, 'call', _37 => _37()]);\n\n if (session && _optionalChain([clientOptions, 'optionalAccess', _38 => _38.includeLocalVariables])) {\n // Only setup this integration if the Node version is >= v18\n // https://github.com/getsentry/sentry-javascript/issues/7697\n const unsupportedNodeVersion = NODE_VERSION.major < 18;\n\n if (unsupportedNodeVersion) {\n logger.log('The `LocalVariables` integration is only supported on Node >= v18.');\n return;\n }\n\n const captureAll = options.captureAllExceptions !== false;\n\n session.configureAndConnect(\n (ev, complete) =>\n handlePaused(clientOptions.stackParser, ev , complete),\n captureAll,\n );\n\n if (captureAll) {\n const max = options.maxExceptionsPerSecond || 50;\n\n rateLimiter = createRateLimiter(\n max,\n () => {\n logger.log('Local variables rate-limit lifted.');\n _optionalChain([session, 'optionalAccess', _39 => _39.setPauseOnExceptions, 'call', _40 => _40(true)]);\n },\n seconds => {\n logger.log(\n `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,\n );\n _optionalChain([session, 'optionalAccess', _41 => _41.setPauseOnExceptions, 'call', _42 => _42(false)]);\n },\n );\n }\n\n shouldProcessEvent = true;\n }\n },\n processEvent(event) {\n if (shouldProcessEvent) {\n return addLocalVariablesToEvent(event);\n }\n\n return event;\n },\n // These are entirely for testing\n _getCachedFramesCount() {\n return cachedFrames.size;\n },\n _getFirstCachedFrame() {\n return cachedFrames.values()[0];\n },\n };\n}) ;\n\nconst localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);\n\n/**\n * Adds local variables to exception frames.\n * @deprecated Use `localVariablesSyncIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LocalVariablesSync = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n localVariablesSyncIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { LocalVariablesSync, createCallbackList, localVariablesSyncIntegration };\n//# sourceMappingURL=local-variables-sync.js.map\n"],"names":[],"mappings":";;;;;;;AASA,SAAS,mBAAmB,UAAU;AAEpC,MAAI,YAAY,CAAA;AAEhB,MAAI,kBAAkB;AACtB,WAAS,gBAAgB,QAAQ;AAC/B,gBAAY,CAAA;AACZ,QAAI,iBAAiB;AACnB;AAAA,IACD;AACD,sBAAkB;AAClB,aAAS,MAAM;AAAA,EAChB;AAGD,YAAU,KAAK,eAAe;AAE9B,W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AGlG,cAAM,yBAAyB,aAAa,QAAQ;AAEpD,YAAI,wBAAwB;AAC1B,iBAAO,IAAI,oEAAoE;AAC/E;AAAA,QACD;AAED,cAAM,aAAa,QAAQ,yBAAyB;AAEpD,gBAAQ;AAAA,UACN,CAAC,IAAI,aACH,aAAa,cAAc,aAAa,IAAK,QAAQ;AAAA,UACvD;AAAA,QACV;AAEQ,YAAI,YAAY;AACd,gBAAM,MAAM,QAAQ,0BAA0B;AAE9C,wBAAc;AAAA,YACZ;AAAA,YACA,MAAM;AACJ,qBAAO,IAAI,oCAAoC;AAC/C,6BAAe,CAAC,SAAS,kBAAkB,SAAO,IAAI,sBAAsB,QAAQ,SAAO,IAAI,IAAI,CAAC,CAAC;AAAA,YACtG;AAAA,YACD,aAAW;AACT,qBAAO;AAAA,gBACL,qFAAqF,OAAO;AAAA,cAC5G;AACc,6BAAe,CAAC,SAAS,kBAAkB,SAAO,IAAI,sBAAsB,QAAQ,SAAO,IAAI,KAAK,CAAC,CAAC;AAAA,YACvG;AAAA,UACb;AAAA,QACS;AAED,6BAAqB;AAAA,MACtB;AAAA,IACF;AAAA,IACD,aAAa,OAAO;AAClB,UAAI,oBAAoB;AACtB,eAAO,yBAAyB,KAAK;AAAA,MACtC;AAED,aAAO;AAAA,IACR;AAAA;AAAA,IAED,wBAAwB;AACtB,aAAO,aAAa;AAAA,IACrB;AAAA,IACD,uBAAuB;AACrB,aAAO,aAAa,SAAS,CAAC;AAAA,IAC/B;AAAA,EACL;AACA;AAEK,MAAC,gCAAgC,kBAAkB,8BAA8B;AAO3D;AAAA,EACzB;AAAA,EACA;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"local-variables-sync.js","sources":["../../../../../../../../../node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, convertIntegrationFnToClass, getClient } from '@sentry/core';\nimport { LRUMap, logger } from '@sentry/utils';\nimport { NODE_VERSION } from '../../nodeVersion.js';\nimport { createRateLimiter, hashFromStack, hashFrames, functionNamesMatch } from './common.js';\n\n/* eslint-disable max-lines */\n\n/** Creates a container for callbacks to be called sequentially */\nfunction createCallbackList(complete) {\n // A collection of callbacks to be executed last to first\n let callbacks = [];\n\n let completedCalled = false;\n function checkedComplete(result) {\n callbacks = [];\n if (completedCalled) {\n return;\n }\n completedCalled = true;\n complete(result);\n }\n\n // complete should be called last\n callbacks.push(checkedComplete);\n\n function add(fn) {\n callbacks.push(fn);\n }\n\n function next(result) {\n const popped = callbacks.pop() || checkedComplete;\n\n try {\n popped(result);\n } catch (_) {\n // If there is an error, we still want to call the complete callback\n checkedComplete(result);\n }\n }\n\n return { add, next };\n}\n\n/**\n * Promise API is available as `Experimental` and in Node 19 only.\n *\n * Callback-based API is `Stable` since v14 and `Experimental` since v8.\n * Because of that, we are creating our own `AsyncSession` class.\n *\n * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api\n * https://nodejs.org/docs/latest-v14.x/api/inspector.html\n */\nclass AsyncSession {\n\n /** Throws if inspector API is not available */\n constructor() {\n /*\n TODO: We really should get rid of this require statement below for a couple of reasons:\n 1. It makes the integration unusable in the SvelteKit SDK, as it's not possible to use `require`\n in SvelteKit server code (at least not by default).\n 2. Throwing in a constructor is bad practice\n\n More context for a future attempt to fix this:\n We already tried replacing it with import but didn't get it to work because of async problems.\n We still called import in the constructor but assigned to a promise which we \"awaited\" in\n `configureAndConnect`. However, this broke the Node integration tests as no local variables\n were reported any more. We probably missed a place where we need to await the promise, too.\n */\n\n // Node can be built without inspector support so this can throw\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { Session } = require('inspector');\n this._session = new Session();\n }\n\n /** @inheritdoc */\n configureAndConnect(onPause, captureAll) {\n this._session.connect();\n\n this._session.on('Debugger.paused', event => {\n onPause(event, () => {\n // After the pause work is complete, resume execution or the exception context memory is leaked\n this._session.post('Debugger.resume');\n });\n });\n\n this._session.post('Debugger.enable');\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n setPauseOnExceptions(captureAll) {\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n /** @inheritdoc */\n getLocalVariables(objectId, complete) {\n this._getProperties(objectId, props => {\n const { add, next } = createCallbackList(complete);\n\n for (const prop of props) {\n if (_optionalChain([prop, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.objectId]) && _optionalChain([prop, 'optionalAccess', _4 => _4.value, 'access', _5 => _5.className]) === 'Array') {\n const id = prop.value.objectId;\n add(vars => this._unrollArray(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _6 => _6.value, 'optionalAccess', _7 => _7.objectId]) && _optionalChain([prop, 'optionalAccess', _8 => _8.value, 'optionalAccess', _9 => _9.className]) === 'Object') {\n const id = prop.value.objectId;\n add(vars => this._unrollObject(id, prop.name, vars, next));\n } else if (_optionalChain([prop, 'optionalAccess', _10 => _10.value, 'optionalAccess', _11 => _11.value]) != null || _optionalChain([prop, 'optionalAccess', _12 => _12.value, 'optionalAccess', _13 => _13.description]) != null) {\n add(vars => this._unrollOther(prop, vars, next));\n }\n }\n\n next({});\n });\n }\n\n /**\n * Gets all the PropertyDescriptors of an object\n */\n _getProperties(objectId, next) {\n this._session.post(\n 'Runtime.getProperties',\n {\n objectId,\n ownProperties: true,\n },\n (err, params) => {\n if (err) {\n next([]);\n } else {\n next(params.result);\n }\n },\n );\n }\n\n /**\n * Unrolls an array property\n */\n _unrollArray(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))\n .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))\n .map(v => _optionalChain([v, 'optionalAccess', _14 => _14.value, 'optionalAccess', _15 => _15.value]));\n\n next(vars);\n });\n }\n\n /**\n * Unrolls an object property\n */\n _unrollObject(objectId, name, vars, next) {\n this._getProperties(objectId, props => {\n vars[name] = props\n .map(v => [v.name, _optionalChain([v, 'optionalAccess', _16 => _16.value, 'optionalAccess', _17 => _17.value])])\n .reduce((obj, [key, val]) => {\n obj[key] = val;\n return obj;\n }, {} );\n\n next(vars);\n });\n }\n\n /**\n * Unrolls other properties\n */\n _unrollOther(prop, vars, next) {\n if (_optionalChain([prop, 'optionalAccess', _18 => _18.value, 'optionalAccess', _19 => _19.value]) != null) {\n vars[prop.name] = prop.value.value;\n } else if (_optionalChain([prop, 'optionalAccess', _20 => _20.value, 'optionalAccess', _21 => _21.description]) != null && _optionalChain([prop, 'optionalAccess', _22 => _22.value, 'optionalAccess', _23 => _23.type]) !== 'function') {\n vars[prop.name] = `<${prop.value.description}>`;\n }\n\n next(vars);\n }\n}\n\n/**\n * When using Vercel pkg, the inspector module is not available.\n * https://github.com/getsentry/sentry-javascript/issues/6769\n */\nfunction tryNewAsyncSession() {\n try {\n return new AsyncSession();\n } catch (e) {\n return undefined;\n }\n}\n\nconst INTEGRATION_NAME = 'LocalVariables';\n\n/**\n * Adds local variables to exception frames\n */\nconst _localVariablesSyncIntegration = ((\n options = {},\n session = tryNewAsyncSession(),\n) => {\n const cachedFrames = new LRUMap(20);\n let rateLimiter;\n let shouldProcessEvent = false;\n\n function handlePaused(\n stackParser,\n { params: { reason, data, callFrames } },\n complete,\n ) {\n if (reason !== 'exception' && reason !== 'promiseRejection') {\n complete();\n return;\n }\n\n _optionalChain([rateLimiter, 'optionalCall', _24 => _24()]);\n\n // data.description contains the original error.stack\n const exceptionHash = hashFromStack(stackParser, _optionalChain([data, 'optionalAccess', _25 => _25.description]));\n\n if (exceptionHash == undefined) {\n complete();\n return;\n }\n\n const { add, next } = createCallbackList(frames => {\n cachedFrames.set(exceptionHash, frames);\n complete();\n });\n\n // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack\n // For this reason we only attempt to get local variables for the first 5 frames\n for (let i = 0; i < Math.min(callFrames.length, 5); i++) {\n const { scopeChain, functionName, this: obj } = callFrames[i];\n\n const localScope = scopeChain.find(scope => scope.type === 'local');\n\n // obj.className is undefined in ESM modules\n const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;\n\n if (_optionalChain([localScope, 'optionalAccess', _26 => _26.object, 'access', _27 => _27.objectId]) === undefined) {\n add(frames => {\n frames[i] = { function: fn };\n next(frames);\n });\n } else {\n const id = localScope.object.objectId;\n add(frames =>\n _optionalChain([session, 'optionalAccess', _28 => _28.getLocalVariables, 'call', _29 => _29(id, vars => {\n frames[i] = { function: fn, vars };\n next(frames);\n })]),\n );\n }\n }\n\n next([]);\n }\n\n function addLocalVariablesToException(exception) {\n const hash = hashFrames(_optionalChain([exception, 'optionalAccess', _30 => _30.stacktrace, 'optionalAccess', _31 => _31.frames]));\n\n if (hash === undefined) {\n return;\n }\n\n // Check if we have local variables for an exception that matches the hash\n // remove is identical to get but also removes the entry from the cache\n const cachedFrame = cachedFrames.remove(hash);\n\n if (cachedFrame === undefined) {\n return;\n }\n\n // Filter out frames where the function name is `new Promise` since these are in the error.stack frames\n // but do not appear in the debugger call frames\n const frames = (_optionalChain([exception, 'access', _32 => _32.stacktrace, 'optionalAccess', _33 => _33.frames]) || []).filter(frame => frame.function !== 'new Promise');\n\n for (let i = 0; i < frames.length; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frames.length - i - 1;\n\n // Drop out if we run out of frames to match up\n if (!frames[frameIndex] || !cachedFrame[i]) {\n break;\n }\n\n if (\n // We need to have vars to add\n cachedFrame[i].vars === undefined ||\n // We're not interested in frames that are not in_app because the vars are not relevant\n frames[frameIndex].in_app === false ||\n // The function names need to match\n !functionNamesMatch(frames[frameIndex].function, cachedFrame[i].function)\n ) {\n continue;\n }\n\n frames[frameIndex].vars = cachedFrame[i].vars;\n }\n }\n\n function addLocalVariablesToEvent(event) {\n for (const exception of _optionalChain([event, 'optionalAccess', _34 => _34.exception, 'optionalAccess', _35 => _35.values]) || []) {\n addLocalVariablesToException(exception);\n }\n\n return event;\n }\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const client = getClient();\n const clientOptions = _optionalChain([client, 'optionalAccess', _36 => _36.getOptions, 'call', _37 => _37()]);\n\n if (session && _optionalChain([clientOptions, 'optionalAccess', _38 => _38.includeLocalVariables])) {\n // Only setup this integration if the Node version is >= v18\n // https://github.com/getsentry/sentry-javascript/issues/7697\n const unsupportedNodeVersion = NODE_VERSION.major < 18;\n\n if (unsupportedNodeVersion) {\n logger.log('The `LocalVariables` integration is only supported on Node >= v18.');\n return;\n }\n\n const captureAll = options.captureAllExceptions !== false;\n\n session.configureAndConnect(\n (ev, complete) =>\n handlePaused(clientOptions.stackParser, ev , complete),\n captureAll,\n );\n\n if (captureAll) {\n const max = options.maxExceptionsPerSecond || 50;\n\n rateLimiter = createRateLimiter(\n max,\n () => {\n logger.log('Local variables rate-limit lifted.');\n _optionalChain([session, 'optionalAccess', _39 => _39.setPauseOnExceptions, 'call', _40 => _40(true)]);\n },\n seconds => {\n logger.log(\n `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,\n );\n _optionalChain([session, 'optionalAccess', _41 => _41.setPauseOnExceptions, 'call', _42 => _42(false)]);\n },\n );\n }\n\n shouldProcessEvent = true;\n }\n },\n processEvent(event) {\n if (shouldProcessEvent) {\n return addLocalVariablesToEvent(event);\n }\n\n return event;\n },\n // These are entirely for testing\n _getCachedFramesCount() {\n return cachedFrames.size;\n },\n _getFirstCachedFrame() {\n return cachedFrames.values()[0];\n },\n };\n}) ;\n\nconst localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);\n\n/**\n * Adds local variables to exception frames.\n * @deprecated Use `localVariablesSyncIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst LocalVariablesSync = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n localVariablesSyncIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { LocalVariablesSync, createCallbackList, localVariablesSyncIntegration };\n//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AAa,OAAM,EAAG,CAAC;AAAA,IAChC;AAAA,EACJ;AACA;AAEK,MAAC,gCAAgC,kBAAkB,8BAA8B;AAO3D;AAAA,EACzB;AAAA,EACA;AACF;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"modules.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/modules.js"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\n\nlet moduleCache;\n\nconst INTEGRATION_NAME = 'Modules';\n\n/** Extract information about paths */\nfunction getPaths() {\n try {\n return require.cache ? Object.keys(require.cache ) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules()\n\n {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = getPaths();\n const infos\n\n = {};\n const seen\n\n = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = () => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8'))\n\n;\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\nfunction _getModules() {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n}\n\nconst _modulesIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event) {\n event.modules = {\n ...event.modules,\n ..._getModules(),\n };\n\n return event;\n },\n };\n}) ;\n\nconst modulesIntegration = defineIntegration(_modulesIntegration);\n\n/**\n * Add node modules / packages to the event.\n * @deprecated Use `modulesIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Modules = convertIntegrationFnToClass(INTEGRATION_NAME, modulesIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { Modules, modulesIntegration };\n//# sourceMappingURL=modules.js.map\n"],"names":["path","dirname","join","existsSync","readFileSync","defineIntegration","convertIntegrationFnToClass"],"mappings":";;;;;AAIA,IAAI;AAEJ,MAAM,mBAAmB;AAGzB,SAAS,WAAW;AAClB,MAAI;AACF,WAAO,QAAQ,QAAQ,OAAO,KAAK,QAAQ,KAAO,IAAG;EACtD,SAAQ,GAAG;AACV,WAAO;EACR;AACH;AAGA,SAAS,iBAER;AACC,QAAM,YAAa,QAAQ,QAAQ,QAAQ,KAAK,SAAU;AAC1D,QAAM,QAAQ;AACd,QAAM,QAEL;AACD,QAAM,OAEL;AAED,QAAM,QAAQA,YAAQ;AACpB,QAAI,MAAMA;AAGV,UAAM,QAAQ,MAAM;AAClB,YAAM,OAAO;AACb,YAAMC,KAAAA,QAAQ,IAAI;AAElB,UAAI,CAAC,OAAO,SAAS,OAAO,KAAK,IAAI,GAAG;AACtC,eAAO;AAAA,MACR;AACD,UAAI,UAAU,QAAQ,GAAG,IAAI,GAAG;AAC9B,eAAO,MAAK;AAAA,MACb;AAED,YAAM,UAAUC,KAAAA,KAAK,MAAM,cAAc;AACzC,WAAK,IAAI,IAAI;AAEb,UAAI,CAACC,GAAAA,WAAW,OAAO,GAAG;AACxB,eAAO,MAAK;AAAA,MACb;AAED,UAAI;AACF,cAAM,OAAO,KAAK,MAAMC,GAAAA,aAAa,SAAS,MAAM,CAAC;AAGrD,cAAM,KAAK,IAAI,IAAI,KAAK;AAAA,MACzB,SAAQ,KAAK;AAAA,MAEb;AAAA,IACP;AAEI;EACJ,CAAG;AAED,SAAO;AACT;AAGA,SAAS,cAAc;AACrB,MAAI,CAAC,aAAa;AAChB,kBAAc,eAAc;AAAA,EAC7B;AACD,SAAO;AACT;AAEA,MAAM,sBAAuB,MAAM;AACjC,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,aAAa,OAAO;AAClB,YAAM,UAAU;AAAA,QACd,GAAG,MAAM;AAAA,QACT,GAAG,YAAa;AAAA,MACxB;AAEM,aAAO;AAAA,IACR;AAAA,EACL;AACA;AAEK,MAAC,qBAAqBC,YAAiB,kBAAC,mBAAmB;AAOhDC,YAAAA,4BAA4B,kBAAkB,kBAAkB;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"modules.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/modules.js"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\n\nlet moduleCache;\n\nconst INTEGRATION_NAME = 'Modules';\n\n/** Extract information about paths */\nfunction getPaths() {\n try {\n return require.cache ? Object.keys(require.cache ) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules()\n\n {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = getPaths();\n const infos\n\n = {};\n const seen\n\n = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = () => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8'))\n\n;\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\nfunction _getModules() {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n}\n\nconst _modulesIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event) {\n event.modules = {\n ...event.modules,\n ..._getModules(),\n };\n\n return event;\n },\n };\n}) ;\n\nconst modulesIntegration = defineIntegration(_modulesIntegration);\n\n/**\n * Add node modules / packages to the event.\n * @deprecated Use `modulesIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Modules = convertIntegrationFnToClass(INTEGRATION_NAME, modulesIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { Modules, modulesIntegration };\n//# sourceMappingURL=modules.js.map\n"],"names":["path","dirname","join","existsSync","readFileSync","defineIntegration","convertIntegrationFnToClass"],"mappings":";;;;;AAIA,IAAI;AAEJ,MAAM,mBAAmB;AAGzB,SAAS,WAAW;AAClB,MAAI;AACF,WAAO,QAAQ,QAAQ,OAAO,KAAK,QAAQ,KAAK,IAAK,CAAA;AAAA,EACvD,SAAS,GAAG;AACV,WAAO,CAAA;AAAA,EACT;AACF;AAGA,SAAS,iBAER;AACC,QAAM,YAAa,QAAQ,QAAQ,QAAQ,KAAK,SAAU,CAAA;AAC1D,QAAM,QAAQ,SAAQ;AACtB,QAAM,QAEL,CAAA;AACD,QAAM,OAEL,CAAA;AAED,QAAM,QAAQA,YAAQ;AACpB,QAAI,MAAMA;AAGV,UAAM,QAAQ,MAAM;AAClB,YAAM,OAAO;AACb,YAAMC,KAAAA,QAAQ,IAAI;AAElB,UAAI,CAAC,OAAO,SAAS,OAAO,KAAK,IAAI,GAAG;AACtC,eAAO;AAAA,MACT;AACA,UAAI,UAAU,QAAQ,GAAG,IAAI,GAAG;AAC9B,eAAO,MAAK;AAAA,MACd;AAEA,YAAM,UAAUC,KAAAA,KAAK,MAAM,cAAc;AACzC,WAAK,IAAI,IAAI;AAEb,UAAI,CAACC,GAAAA,WAAW,OAAO,GAAG;AACxB,eAAO,MAAK;AAAA,MACd;AAEA,UAAI;AACF,cAAM,OAAO,KAAK,MAAMC,GAAAA,aAAa,SAAS,MAAM,CAAC;AAGrD,cAAM,KAAK,IAAI,IAAI,KAAK;AAAA,MAC1B,SAAS,KAAK;AAAA,MAEd;AAAA,IACF;AAEA,UAAK;AAAA,EACP,CAAC;AAED,SAAO;AACT;AAGA,SAAS,cAAc;AACrB,MAAI,CAAC,aAAa;AAChB,kBAAc,eAAc;AAAA,EAC9B;AACA,SAAO;AACT;AAEA,MAAM,sBAAuB,MAAM;AACjC,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,aAAa,OAAO;AAClB,YAAM,UAAU;AAAA,QACd,GAAG,MAAM;AAAA,QACT,GAAG,YAAW;AAAA,MACtB;AAEM,aAAO;AAAA,IACT;AAAA,EACJ;AACA;AAEK,MAAC,qBAAqBC,YAAAA,kBAAkB,mBAAmB;AAOhDC,YAAAA,4BAA4B,kBAAkB,kBAAkB;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"modules.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/modules.js"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\n\nlet moduleCache;\n\nconst INTEGRATION_NAME = 'Modules';\n\n/** Extract information about paths */\nfunction getPaths() {\n try {\n return require.cache ? Object.keys(require.cache ) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules()\n\n {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = getPaths();\n const infos\n\n = {};\n const seen\n\n = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = () => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8'))\n\n;\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\nfunction _getModules() {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n}\n\nconst _modulesIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event) {\n event.modules = {\n ...event.modules,\n ..._getModules(),\n };\n\n return event;\n },\n };\n}) ;\n\nconst modulesIntegration = defineIntegration(_modulesIntegration);\n\n/**\n * Add node modules / packages to the event.\n * @deprecated Use `modulesIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Modules = convertIntegrationFnToClass(INTEGRATION_NAME, modulesIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { Modules, modulesIntegration };\n//# sourceMappingURL=modules.js.map\n"],"names":[],"mappings":";;;AAIA,IAAI;AAEJ,MAAM,mBAAmB;AAGzB,SAAS,WAAW;AAClB,MAAI;AACF,WAAO,QAAQ,QAAQ,OAAO,KAAK,QAAQ,KAAO,IAAG;EACtD,SAAQ,GAAG;AACV,WAAO;EACR;AACH;AAGA,SAAS,iBAER;AACC,QAAM,YAAa,QAAQ,QAAQ,QAAQ,KAAK,SAAU;AAC1D,QAAM,QAAQ;AACd,QAAM,QAEL;AACD,QAAM,OAEL;AAED,QAAM,QAAQ,UAAQ;AACpB,QAAI,MAAM;AAGV,UAAM,QAAQ,MAAM;AAClB,YAAM,OAAO;AACb,YAAM,QAAQ,IAAI;AAElB,UAAI,CAAC,OAAO,SAAS,OAAO,KAAK,IAAI,GAAG;AACtC,eAAO;AAAA,MACR;AACD,UAAI,UAAU,QAAQ,GAAG,IAAI,GAAG;AAC9B,eAAO,MAAK;AAAA,MACb;AAED,YAAM,UAAU,KAAK,MAAM,cAAc;AACzC,WAAK,IAAI,IAAI;AAEb,UAAI,CAAC,WAAW,OAAO,GAAG;AACxB,eAAO,MAAK;AAAA,MACb;AAED,UAAI;AACF,cAAM,OAAO,KAAK,MAAM,aAAa,SAAS,MAAM,CAAC;AAGrD,cAAM,KAAK,IAAI,IAAI,KAAK;AAAA,MACzB,SAAQ,KAAK;AAAA,MAEb;AAAA,IACP;AAEI;EACJ,CAAG;AAED,SAAO;AACT;AAGA,SAAS,cAAc;AACrB,MAAI,CAAC,aAAa;AAChB,kBAAc,eAAc;AAAA,EAC7B;AACD,SAAO;AACT;AAEA,MAAM,sBAAuB,MAAM;AACjC,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,aAAa,OAAO;AAClB,YAAM,UAAU;AAAA,QACd,GAAG,MAAM;AAAA,QACT,GAAG,YAAa;AAAA,MACxB;AAEM,aAAO;AAAA,IACR;AAAA,EACL;AACA;AAEK,MAAC,qBAAqB,kBAAkB,mBAAmB;AAOhD,4BAA4B,kBAAkB,kBAAkB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"modules.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/modules.js"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { dirname, join } from 'path';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\n\nlet moduleCache;\n\nconst INTEGRATION_NAME = 'Modules';\n\n/** Extract information about paths */\nfunction getPaths() {\n try {\n return require.cache ? Object.keys(require.cache ) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules()\n\n {\n const mainPaths = (require.main && require.main.paths) || [];\n const paths = getPaths();\n const infos\n\n = {};\n const seen\n\n = {};\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = () => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen[orig]) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen[orig] = true;\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8'))\n\n;\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\nfunction _getModules() {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n}\n\nconst _modulesIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event) {\n event.modules = {\n ...event.modules,\n ..._getModules(),\n };\n\n return event;\n },\n };\n}) ;\n\nconst modulesIntegration = defineIntegration(_modulesIntegration);\n\n/**\n * Add node modules / packages to the event.\n * @deprecated Use `modulesIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Modules = convertIntegrationFnToClass(INTEGRATION_NAME, modulesIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nexport { Modules, modulesIntegration };\n//# sourceMappingURL=modules.js.map\n"],"names":[],"mappings":";;;AAIA,IAAI;AAEJ,MAAM,mBAAmB;AAGzB,SAAS,WAAW;AAClB,MAAI;AACF,WAAO,QAAQ,QAAQ,OAAO,KAAK,QAAQ,KAAK,IAAK,CAAA;AAAA,EACvD,SAAS,GAAG;AACV,WAAO,CAAA;AAAA,EACT;AACF;AAGA,SAAS,iBAER;AACC,QAAM,YAAa,QAAQ,QAAQ,QAAQ,KAAK,SAAU,CAAA;AAC1D,QAAM,QAAQ,SAAQ;AACtB,QAAM,QAEL,CAAA;AACD,QAAM,OAEL,CAAA;AAED,QAAM,QAAQ,UAAQ;AACpB,QAAI,MAAM;AAGV,UAAM,QAAQ,MAAM;AAClB,YAAM,OAAO;AACb,YAAM,QAAQ,IAAI;AAElB,UAAI,CAAC,OAAO,SAAS,OAAO,KAAK,IAAI,GAAG;AACtC,eAAO;AAAA,MACT;AACA,UAAI,UAAU,QAAQ,GAAG,IAAI,GAAG;AAC9B,eAAO,MAAK;AAAA,MACd;AAEA,YAAM,UAAU,KAAK,MAAM,cAAc;AACzC,WAAK,IAAI,IAAI;AAEb,UAAI,CAAC,WAAW,OAAO,GAAG;AACxB,eAAO,MAAK;AAAA,MACd;AAEA,UAAI;AACF,cAAM,OAAO,KAAK,MAAM,aAAa,SAAS,MAAM,CAAC;AAGrD,cAAM,KAAK,IAAI,IAAI,KAAK;AAAA,MAC1B,SAAS,KAAK;AAAA,MAEd;AAAA,IACF;AAEA,UAAK;AAAA,EACP,CAAC;AAED,SAAO;AACT;AAGA,SAAS,cAAc;AACrB,MAAI,CAAC,aAAa;AAChB,kBAAc,eAAc;AAAA,EAC9B;AACA,SAAO;AACT;AAEA,MAAM,sBAAuB,MAAM;AACjC,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,aAAa,OAAO;AAClB,YAAM,UAAU;AAAA,QACd,GAAG,MAAM;AAAA,QACT,GAAG,YAAW;AAAA,MACtB;AAEM,aAAO;AAAA,IACT;AAAA,EACJ;AACA;AAEK,MAAC,qBAAqB,kBAAkB,mBAAmB;AAOhD,4BAA4B,kBAAkB,kBAAkB;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"onuncaughtexception.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onuncaughtexception.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUncaughtException';\n\nconst _onUncaughtExceptionIntegration = ((options = {}) => {\n const _options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('uncaughtException', makeErrorHandler(client, _options));\n },\n };\n}) ;\n\nconst onUncaughtExceptionIntegration = defineIntegration(_onUncaughtExceptionIntegration);\n\n/**\n * Global Exception handler.\n * @deprecated Use `onUncaughtExceptionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUncaughtException = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUncaughtExceptionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/** Exported only for tests */\nfunction makeErrorHandler(client, options) {\n const timeout = 2000;\n let caughtFirstError = false;\n let caughtSecondError = false;\n let calledFatalError = false;\n let firstError;\n\n const clientOptions = client.getOptions();\n\n return Object.assign(\n (error) => {\n let onFatalError = logAndExitProcess;\n\n if (options.onFatalError) {\n onFatalError = options.onFatalError;\n } else if (clientOptions.onFatalError) {\n onFatalError = clientOptions.onFatalError ;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = (\n global.process.listeners('uncaughtException')\n ).reduce((acc, listener) => {\n if (\n // There are 3 listeners we ignore:\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n (listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing\n (listener )._errorHandler // the handler we register in this integration\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (getClient() === client) {\n captureException(error, {\n originalException: error,\n captureContext: {\n level: 'fatal',\n },\n mechanism: {\n handled: false,\n type: 'onuncaughtexception',\n },\n });\n }\n\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n DEBUG_BUILD &&\n logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n },\n { _errorHandler: true },\n );\n}\n\nexport { OnUncaughtException, makeErrorHandler, onUncaughtExceptionIntegration };\n//# sourceMappingURL=onuncaughtexception.js.map\n"],"names":["defineIntegration","convertIntegrationFnToClass","logAndExitProcess","getClient","captureException","DEBUG_BUILD","logger"],"mappings":";;;;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,kCAAmC,CAAC,UAAU,OAAO;AACzD,QAAM,WAAW;AAAA,IACf,sCAAsC;AAAA,IACtC,GAAG;AAAA,EACP;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,MAAM,QAAQ;AACZ,aAAO,QAAQ,GAAG,qBAAqB,iBAAiB,QAAQ,QAAQ,CAAC;AAAA,IAC1E;AAAA,EACL;AACA;AAEK,MAAC,iCAAiCA,YAAiB,kBAAC,+BAA+B;AAO5DC,YAA2B;AAAA,EACrD;AAAA,EACA;AACF;AAOA,SAAS,iBAAiB,QAAQ,SAAS;AACzC,QAAM,UAAU;AAChB,MAAI,mBAAmB;AACvB,MAAI,oBAAoB;AACxB,MAAI,mBAAmB;AACvB,MAAI;AAEJ,QAAM,gBAAgB,OAAO;AAE7B,SAAO,OAAO;AAAA,IACZ,CAAC,UAAU;AACT,UAAI,eAAeC,cAAAA;AAEnB,UAAI,QAAQ,cAAc;AACxB,uBAAe,QAAQ;AAAA,MAC/B,WAAiB,cAAc,cAAc;AACrC,uBAAe,cAAc;AAAA,MAC9B;AAOD,YAAM,6BACJ,OAAO,QAAQ,UAAU,mBAAmB,EAC5C,OAAO,CAAC,KAAK,aAAa;AAC1B;AAAA;AAAA,UAEE,SAAS,SAAS;AAAA,UACjB,SAAS,OAAO,SAAS,QAAQ;AAAA,UACjC,SAAW;AAAA,UACZ;AACA,iBAAO;AAAA,QACjB,OAAe;AACL,iBAAO,MAAM;AAAA,QACd;AAAA,MACF,GAAE,CAAC;AAEJ,YAAM,mBAAmB,+BAA+B;AACxD,YAAM,gCAAgC,QAAQ,wCAAwC;AAEtF,UAAI,CAAC,kBAAkB;AAIrB,qBAAa;AACb,2BAAmB;AAEnB,YAAIC,UAAAA,UAAW,MAAK,QAAQ;AAC1BC,oBAAAA,iBAAiB,OAAO;AAAA,YACtB,mBAAmB;AAAA,YACnB,gBAAgB;AAAA,cACd,OAAO;AAAA,YACR;AAAA,YACD,WAAW;AAAA,cACT,SAAS;AAAA,cACT,MAAM;AAAA,YACP;AAAA,UACb,CAAW;AAAA,QACF;AAED,YAAI,CAAC,oBAAoB,+BAA+B;AACtD,6BAAmB;AACnB,uBAAa,KAAK;AAAA,QACnB;AAAA,MACT,OAAa;AACL,YAAI,+BAA+B;AACjC,cAAI,kBAAkB;AAEpBC,uBAAW,eACTC,OAAAA,OAAO;AAAA,cACL;AAAA,YAChB;AACYJ,0BAAiB,kBAAC,KAAK;AAAA,UACnC,WAAqB,CAAC,mBAAmB;AAe7B,gCAAoB;AACpB,uBAAW,MAAM;AACf,kBAAI,CAAC,kBAAkB;AAErB,mCAAmB;AACnB,6BAAa,YAAY,KAAK;AAAA,cAC/B;AAAA,YACF,GAAE,OAAO;AAAA,UACX;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACD,EAAE,eAAe,KAAM;AAAA,EAC3B;AACA;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"onuncaughtexception.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onuncaughtexception.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUncaughtException';\n\nconst _onUncaughtExceptionIntegration = ((options = {}) => {\n const _options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('uncaughtException', makeErrorHandler(client, _options));\n },\n };\n}) ;\n\nconst onUncaughtExceptionIntegration = defineIntegration(_onUncaughtExceptionIntegration);\n\n/**\n * Global Exception handler.\n * @deprecated Use `onUncaughtExceptionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUncaughtException = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUncaughtExceptionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/** Exported only for tests */\nfunction makeErrorHandler(client, options) {\n const timeout = 2000;\n let caughtFirstError = false;\n let caughtSecondError = false;\n let calledFatalError = false;\n let firstError;\n\n const clientOptions = client.getOptions();\n\n return Object.assign(\n (error) => {\n let onFatalError = logAndExitProcess;\n\n if (options.onFatalError) {\n onFatalError = options.onFatalError;\n } else if (clientOptions.onFatalError) {\n onFatalError = clientOptions.onFatalError ;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = (\n global.process.listeners('uncaughtException')\n ).reduce((acc, listener) => {\n if (\n // There are 3 listeners we ignore:\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n (listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing\n (listener )._errorHandler // the handler we register in this integration\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (getClient() === client) {\n captureException(error, {\n originalException: error,\n captureContext: {\n level: 'fatal',\n },\n mechanism: {\n handled: false,\n type: 'onuncaughtexception',\n },\n });\n }\n\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n DEBUG_BUILD &&\n logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n },\n { _errorHandler: true },\n );\n}\n\nexport { OnUncaughtException, makeErrorHandler, onUncaughtExceptionIntegration };\n//# sourceMappingURL=onuncaughtexception.js.map\n"],"names":["defineIntegration","convertIntegrationFnToClass","logAndExitProcess","getClient","captureException","DEBUG_BUILD","logger"],"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;AAAA,YACnB,gBAAgB;AAAA,cACd,OAAO;AAAA,YACrB;AAAA,YACY,WAAW;AAAA,cACT,SAAS;AAAA,cACT,MAAM;AAAA,YACpB;AAAA,UACA,CAAW;AAAA,QACH;AAEA,YAAI,CAAC,oBAAoB,+BAA+B;AACtD,6BAAmB;AACnB,uBAAa,KAAK;AAAA,QACpB;AAAA,MACF,OAAO;AACL,YAAI,+BAA+B;AACjC,cAAI,kBAAkB;AAEpBC,uBAAAA,eACEC,OAAAA,OAAO;AAAA,cACL;AAAA,YAChB;AACYJ,0BAAAA,kBAAkB,KAAK;AAAA,UACzB,WAAW,CAAC,mBAAmB;AAe7B,gCAAoB;AACpB,uBAAW,MAAM;AACf,kBAAI,CAAC,kBAAkB;AAErB,mCAAmB;AACnB,6BAAa,YAAY,KAAK;AAAA,cAChC;AAAA,YACF,GAAG,OAAO;AAAA,UACZ;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,EAAE,eAAe,KAAI;AAAA,EACzB;AACA;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"onuncaughtexception.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onuncaughtexception.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUncaughtException';\n\nconst _onUncaughtExceptionIntegration = ((options = {}) => {\n const _options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('uncaughtException', makeErrorHandler(client, _options));\n },\n };\n}) ;\n\nconst onUncaughtExceptionIntegration = defineIntegration(_onUncaughtExceptionIntegration);\n\n/**\n * Global Exception handler.\n * @deprecated Use `onUncaughtExceptionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUncaughtException = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUncaughtExceptionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/** Exported only for tests */\nfunction makeErrorHandler(client, options) {\n const timeout = 2000;\n let caughtFirstError = false;\n let caughtSecondError = false;\n let calledFatalError = false;\n let firstError;\n\n const clientOptions = client.getOptions();\n\n return Object.assign(\n (error) => {\n let onFatalError = logAndExitProcess;\n\n if (options.onFatalError) {\n onFatalError = options.onFatalError;\n } else if (clientOptions.onFatalError) {\n onFatalError = clientOptions.onFatalError ;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = (\n global.process.listeners('uncaughtException')\n ).reduce((acc, listener) => {\n if (\n // There are 3 listeners we ignore:\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n (listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing\n (listener )._errorHandler // the handler we register in this integration\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (getClient() === client) {\n captureException(error, {\n originalException: error,\n captureContext: {\n level: 'fatal',\n },\n mechanism: {\n handled: false,\n type: 'onuncaughtexception',\n },\n });\n }\n\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n DEBUG_BUILD &&\n logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n },\n { _errorHandler: true },\n );\n}\n\nexport { OnUncaughtException, makeErrorHandler, onUncaughtExceptionIntegration };\n//# sourceMappingURL=onuncaughtexception.js.map\n"],"names":[],"mappings":";;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,kCAAmC,CAAC,UAAU,OAAO;AACzD,QAAM,WAAW;AAAA,IACf,sCAAsC;AAAA,IACtC,GAAG;AAAA,EACP;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA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I,kBAAkB;AAEpB,2BACE,OAAO;AAAA,cACL;AAAA,YAChB;AACY,8BAAkB,KAAK;AAAA,UACnC,WAAqB,CAAC,mBAAmB;AAe7B,gCAAoB;AACpB,uBAAW,MAAM;AACf,kBAAI,CAAC,kBAAkB;AAErB,mCAAmB;AACnB,6BAAa,YAAY,KAAK;AAAA,cAC/B;AAAA,YACF,GAAE,OAAO;AAAA,UACX;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACD,EAAE,eAAe,KAAM;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"onuncaughtexception.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onuncaughtexception.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUncaughtException';\n\nconst _onUncaughtExceptionIntegration = ((options = {}) => {\n const _options = {\n exitEvenIfOtherHandlersAreRegistered: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('uncaughtException', makeErrorHandler(client, _options));\n },\n };\n}) ;\n\nconst onUncaughtExceptionIntegration = defineIntegration(_onUncaughtExceptionIntegration);\n\n/**\n * Global Exception handler.\n * @deprecated Use `onUncaughtExceptionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUncaughtException = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUncaughtExceptionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/** Exported only for tests */\nfunction makeErrorHandler(client, options) {\n const timeout = 2000;\n let caughtFirstError = false;\n let caughtSecondError = false;\n let calledFatalError = false;\n let firstError;\n\n const clientOptions = client.getOptions();\n\n return Object.assign(\n (error) => {\n let onFatalError = logAndExitProcess;\n\n if (options.onFatalError) {\n onFatalError = options.onFatalError;\n } else if (clientOptions.onFatalError) {\n onFatalError = clientOptions.onFatalError ;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = (\n global.process.listeners('uncaughtException')\n ).reduce((acc, listener) => {\n if (\n // There are 3 listeners we ignore:\n listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself\n (listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing\n (listener )._errorHandler // the handler we register in this integration\n ) {\n return acc;\n } else {\n return acc + 1;\n }\n }, 0);\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (getClient() === client) {\n captureException(error, {\n originalException: error,\n captureContext: {\n level: 'fatal',\n },\n mechanism: {\n handled: false,\n type: 'onuncaughtexception',\n },\n });\n }\n\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n DEBUG_BUILD &&\n logger.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n },\n { _errorHandler: true },\n );\n}\n\nexport { OnUncaughtException, makeErrorHandler, onUncaughtExceptionIntegration };\n//# sourceMappingURL=onuncaughtexception.js.map\n"],"names":[],"mappings":";;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,kCAAmC,CAAC,UAAU,OAAO;AACzD,QAAM,WAAW;AAAA,IACf,sCAAsC;AAAA,IACtC,GAAG;AAAA,EACP;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,MAAM,QAAQ;AACZ,aAAO,QAAQ,GAAG,qBAAqB,iBAAiB,QAAQ,QAAQ,CAAC;AAAA,IAC3E;AAAA,EACJ;AACA;AAEK,MAAC,iCAAiC,kBAAkB,+BAA+B;AAO5D;AAAA,EAC1B;AAAA,EACA;AACF;AAOA,SAAS,iBAAiB,QAAQ,SAAS;AACzC,QAAM,UAAU;AAChB,MAAI,mBAAmB;AACvB,MAAI,oBAAoB;AACxB,MAAI,mBAAmB;AACvB,MAA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,eAAe,KAAI;AAAA,EACzB;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"onunhandledrejection.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onunhandledrejection.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { consoleSandbox } from '@sentry/utils';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUnhandledRejection';\n\nconst _onUnhandledRejectionIntegration = ((options = {}) => {\n const mode = options.mode || 'warn';\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode }));\n },\n };\n}) ;\n\nconst onUnhandledRejectionIntegration = defineIntegration(_onUnhandledRejectionIntegration);\n\n/**\n * Global Promise Rejection handler.\n * @deprecated Use `onUnhandledRejectionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUnhandledRejection = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUnhandledRejectionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n *\n * Exported only for tests.\n */\nfunction makeUnhandledPromiseHandler(\n client,\n options,\n) {\n return function sendUnhandledPromise(reason, promise) {\n if (getClient() !== client) {\n return;\n }\n\n captureException(reason, {\n originalException: promise,\n captureContext: {\n extra: { unhandledPromiseRejection: true },\n },\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n\n handleRejection(reason, options);\n };\n}\n\n/**\n * Handler for `mode` option\n\n */\nfunction handleRejection(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reason,\n options,\n) {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n}\n\nexport { OnUnhandledRejection, makeUnhandledPromiseHandler, onUnhandledRejectionIntegration };\n//# sourceMappingURL=onunhandledrejection.js.map\n"],"names":["defineIntegration","convertIntegrationFnToClass","getClient","captureException","consoleSandbox","logAndExitProcess"],"mappings":";;;;;;AAIA,MAAM,mBAAmB;AAEzB,MAAM,mCAAoC,CAAC,UAAU,OAAO;AAC1D,QAAM,OAAO,QAAQ,QAAQ;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,MAAM,QAAQ;AACZ,aAAO,QAAQ,GAAG,sBAAsB,4BAA4B,QAAQ,EAAE,KAAM,CAAA,CAAC;AAAA,IACtF;AAAA,EACL;AACA;AAEK,MAAC,kCAAkCA,YAAiB,kBAAC,gCAAgC;AAO7DC,YAA2B;AAAA,EACtD;AAAA,EACA;AACF;AAaA,SAAS,4BACP,QACA,SACA;AACA,SAAO,SAAS,qBAAqB,QAAQ,SAAS;AACpD,QAAIC,UAAAA,UAAW,MAAK,QAAQ;AAC1B;AAAA,IACD;AAEDC,cAAAA,iBAAiB,QAAQ;AAAA,MACvB,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,QACd,OAAO,EAAE,2BAA2B,KAAM;AAAA,MAC3C;AAAA,MACD,WAAW;AAAA,QACT,SAAS;AAAA,QACT,MAAM;AAAA,MACP;AAAA,IACP,CAAK;AAED,oBAAgB,QAAQ,OAAO;AAAA,EACnC;AACA;AAMA,SAAS,gBAEP,QACA,SACA;AAEA,QAAM,mBACJ;AAMF,MAAI,QAAQ,SAAS,QAAQ;AAC3BC,WAAAA,eAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAE7B,cAAQ,MAAM,UAAU,OAAO,QAAQ,OAAO,QAAQ,MAAM;AAAA,IAClE,CAAK;AAAA,EACL,WAAa,QAAQ,SAAS,UAAU;AACpCA,WAAAA,eAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAAA,IACnC,CAAK;AACDC,kBAAiB,kBAAC,MAAM;AAAA,EACzB;AAEH;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"onunhandledrejection.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onunhandledrejection.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { consoleSandbox } from '@sentry/utils';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUnhandledRejection';\n\nconst _onUnhandledRejectionIntegration = ((options = {}) => {\n const mode = options.mode || 'warn';\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode }));\n },\n };\n}) ;\n\nconst onUnhandledRejectionIntegration = defineIntegration(_onUnhandledRejectionIntegration);\n\n/**\n * Global Promise Rejection handler.\n * @deprecated Use `onUnhandledRejectionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUnhandledRejection = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUnhandledRejectionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n *\n * Exported only for tests.\n */\nfunction makeUnhandledPromiseHandler(\n client,\n options,\n) {\n return function sendUnhandledPromise(reason, promise) {\n if (getClient() !== client) {\n return;\n }\n\n captureException(reason, {\n originalException: promise,\n captureContext: {\n extra: { unhandledPromiseRejection: true },\n },\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n\n handleRejection(reason, options);\n };\n}\n\n/**\n * Handler for `mode` option\n\n */\nfunction handleRejection(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reason,\n options,\n) {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n}\n\nexport { OnUnhandledRejection, makeUnhandledPromiseHandler, onUnhandledRejectionIntegration };\n//# sourceMappingURL=onunhandledrejection.js.map\n"],"names":["defineIntegration","convertIntegrationFnToClass","getClient","captureException","consoleSandbox","logAndExitProcess"],"mappings":";;;;;;AAIA,MAAM,mBAAmB;AAEzB,MAAM,mCAAoC,CAAC,UAAU,OAAO;AAC1D,QAAM,OAAO,QAAQ,QAAQ;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,MAAM,QAAQ;AACZ,aAAO,QAAQ,GAAG,sBAAsB,4BAA4B,QAAQ,EAAE,KAAI,CAAE,CAAC;AAAA,IACvF;AAAA,EACJ;AACA;AAEK,MAAC,kCAAkCA,YAAAA,kBAAkB,gCAAgC;AAO7DC,YAAAA;AAAAA,EAC3B;AAAA,EACA;AACF;AAaA,SAAS,4BACP,QACA,SACA;AACA,SAAO,SAAS,qBAAqB,QAAQ,SAAS;AACpD,QAAIC,UAAAA,UAAS,MAAO,QAAQ;AAC1B;AAAA,IACF;AAEAC,cAAAA,iBAAiB,QAAQ;AAAA,MACvB,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,QACd,OAAO,EAAE,2BAA2B,KAAI;AAAA,MAChD;AAAA,MACM,WAAW;AAAA,QACT,SAAS;AAAA,QACT,MAAM;AAAA,MACd;AAAA,IACA,CAAK;AAED,oBAAgB,QAAQ,OAAO;AAAA,EACjC;AACF;AAMA,SAAS,gBAEP,QACA,SACA;AAEA,QAAM,mBACJ;AAMF,MAAI,QAAQ,SAAS,QAAQ;AAC3BC,WAAAA,eAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAE7B,cAAQ,MAAM,UAAU,OAAO,QAAQ,OAAO,QAAQ,MAAM;AAAA,IAC9D,CAAC;AAAA,EACH,WAAW,QAAQ,SAAS,UAAU;AACpCA,WAAAA,eAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAAA,IAC/B,CAAC;AACDC,kBAAAA,kBAAkB,MAAM;AAAA,EAC1B;AAEF;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"onunhandledrejection.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onunhandledrejection.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { consoleSandbox } from '@sentry/utils';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUnhandledRejection';\n\nconst _onUnhandledRejectionIntegration = ((options = {}) => {\n const mode = options.mode || 'warn';\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode }));\n },\n };\n}) ;\n\nconst onUnhandledRejectionIntegration = defineIntegration(_onUnhandledRejectionIntegration);\n\n/**\n * Global Promise Rejection handler.\n * @deprecated Use `onUnhandledRejectionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUnhandledRejection = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUnhandledRejectionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n *\n * Exported only for tests.\n */\nfunction makeUnhandledPromiseHandler(\n client,\n options,\n) {\n return function sendUnhandledPromise(reason, promise) {\n if (getClient() !== client) {\n return;\n }\n\n captureException(reason, {\n originalException: promise,\n captureContext: {\n extra: { unhandledPromiseRejection: true },\n },\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n\n handleRejection(reason, options);\n };\n}\n\n/**\n * Handler for `mode` option\n\n */\nfunction handleRejection(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reason,\n options,\n) {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n}\n\nexport { OnUnhandledRejection, makeUnhandledPromiseHandler, onUnhandledRejectionIntegration };\n//# sourceMappingURL=onunhandledrejection.js.map\n"],"names":[],"mappings":";;;;AAIA,MAAM,mBAAmB;AAEzB,MAAM,mCAAoC,CAAC,UAAU,OAAO;AAC1D,QAAM,OAAO,QAAQ,QAAQ;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,MAAM,QAAQ;AACZ,aAAO,QAAQ,GAAG,sBAAsB,4BAA4B,QAAQ,EAAE,KAAM,CAAA,CAAC;AAAA,IACtF;AAAA,EACL;AACA;AAEK,MAAC,kCAAkC,kBAAkB,gCAAgC;AAO7D;AAAA,EAC3B;AAAA,EACA;AACF;AAaA,SAAS,4BACP,QACA,SACA;AACA,SAAO,SAAS,qBAAqB,QAAQ,SAAS;AACpD,QAAI,UAAW,MAAK,QAAQ;AAC1B;AAAA,IACD;AAED,qBAAiB,QAAQ;AAAA,MACvB,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,QACd,OAAO,EAAE,2BAA2B,KAAM;AAAA,MAC3C;AAAA,MACD,WAAW;AAAA,QACT,SAAS;AAAA,QACT,MAAM;AAAA,MACP;AAAA,IACP,CAAK;AAED,oBAAgB,QAAQ,OAAO;AAAA,EACnC;AACA;AAMA,SAAS,gBAEP,QACA,SACA;AAEA,QAAM,mBACJ;AAMF,MAAI,QAAQ,SAAS,QAAQ;AAC3B,mBAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAE7B,cAAQ,MAAM,UAAU,OAAO,QAAQ,OAAO,QAAQ,MAAM;AAAA,IAClE,CAAK;AAAA,EACL,WAAa,QAAQ,SAAS,UAAU;AACpC,mBAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAAA,IACnC,CAAK;AACD,sBAAkB,MAAM;AAAA,EACzB;AAEH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"onunhandledrejection.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/onunhandledrejection.js"],"sourcesContent":["import { defineIntegration, convertIntegrationFnToClass, getClient, captureException } from '@sentry/core';\nimport { consoleSandbox } from '@sentry/utils';\nimport { logAndExitProcess } from './utils/errorhandling.js';\n\nconst INTEGRATION_NAME = 'OnUnhandledRejection';\n\nconst _onUnhandledRejectionIntegration = ((options = {}) => {\n const mode = options.mode || 'warn';\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode }));\n },\n };\n}) ;\n\nconst onUnhandledRejectionIntegration = defineIntegration(_onUnhandledRejectionIntegration);\n\n/**\n * Global Promise Rejection handler.\n * @deprecated Use `onUnhandledRejectionIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst OnUnhandledRejection = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n onUnhandledRejectionIntegration,\n)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\n/**\n * Send an exception with reason\n * @param reason string\n * @param promise promise\n *\n * Exported only for tests.\n */\nfunction makeUnhandledPromiseHandler(\n client,\n options,\n) {\n return function sendUnhandledPromise(reason, promise) {\n if (getClient() !== client) {\n return;\n }\n\n captureException(reason, {\n originalException: promise,\n captureContext: {\n extra: { unhandledPromiseRejection: true },\n },\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n\n handleRejection(reason, options);\n };\n}\n\n/**\n * Handler for `mode` option\n\n */\nfunction handleRejection(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reason,\n options,\n) {\n // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240\n const rejectionWarning =\n 'This error originated either by ' +\n 'throwing inside of an async function without a catch block, ' +\n 'or by rejecting a promise which was not handled with .catch().' +\n ' The promise rejected with the reason:';\n\n /* eslint-disable no-console */\n if (options.mode === 'warn') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n console.error(reason && reason.stack ? reason.stack : reason);\n });\n } else if (options.mode === 'strict') {\n consoleSandbox(() => {\n console.warn(rejectionWarning);\n });\n logAndExitProcess(reason);\n }\n /* eslint-enable no-console */\n}\n\nexport { OnUnhandledRejection, makeUnhandledPromiseHandler, onUnhandledRejectionIntegration };\n//# sourceMappingURL=onunhandledrejection.js.map\n"],"names":[],"mappings":";;;;AAIA,MAAM,mBAAmB;AAEzB,MAAM,mCAAoC,CAAC,UAAU,OAAO;AAC1D,QAAM,OAAO,QAAQ,QAAQ;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,MAAM,QAAQ;AACZ,aAAO,QAAQ,GAAG,sBAAsB,4BAA4B,QAAQ,EAAE,KAAI,CAAE,CAAC;AAAA,IACvF;AAAA,EACJ;AACA;AAEK,MAAC,kCAAkC,kBAAkB,gCAAgC;AAO7D;AAAA,EAC3B;AAAA,EACA;AACF;AAaA,SAAS,4BACP,QACA,SACA;AACA,SAAO,SAAS,qBAAqB,QAAQ,SAAS;AACpD,QAAI,UAAS,MAAO,QAAQ;AAC1B;AAAA,IACF;AAEA,qBAAiB,QAAQ;AAAA,MACvB,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,QACd,OAAO,EAAE,2BAA2B,KAAI;AAAA,MAChD;AAAA,MACM,WAAW;AAAA,QACT,SAAS;AAAA,QACT,MAAM;AAAA,MACd;AAAA,IACA,CAAK;AAED,oBAAgB,QAAQ,OAAO;AAAA,EACjC;AACF;AAMA,SAAS,gBAEP,QACA,SACA;AAEA,QAAM,mBACJ;AAMF,MAAI,QAAQ,SAAS,QAAQ;AAC3B,mBAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAE7B,cAAQ,MAAM,UAAU,OAAO,QAAQ,OAAO,QAAQ,MAAM;AAAA,IAC9D,CAAC;AAAA,EACH,WAAW,QAAQ,SAAS,UAAU;AACpC,mBAAe,MAAM;AACnB,cAAQ,KAAK,gBAAgB;AAAA,IAC/B,CAAC;AACD,sBAAkB,MAAM;AAAA,EAC1B;AAEF;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/spotlight.js"],"sourcesContent":["import * as http from 'http';\nimport { URL } from 'url';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { logger, serializeEnvelope } from '@sentry/utils';\n\nconst INTEGRATION_NAME = 'Spotlight';\n\nconst _spotlightIntegration = ((options = {}) => {\n const _options = {\n sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream',\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') {\n logger.warn(\"[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?\");\n }\n connectToSpotlight(client, _options);\n },\n };\n}) ;\n\nconst spotlightIntegration = defineIntegration(_spotlightIntegration);\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n *\n * Important: This integration only works with Node 18 or newer.\n *\n * @deprecated Use `spotlightIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Spotlight = convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nfunction connectToSpotlight(client, options) {\n const spotlightUrl = parseSidecarUrl(options.sidecarUrl);\n if (!spotlightUrl) {\n return;\n }\n\n let failedRequests = 0;\n\n if (typeof client.on !== 'function') {\n logger.warn('[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)');\n return;\n }\n\n client.on('beforeEnvelope', (envelope) => {\n if (failedRequests > 3) {\n logger.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests');\n return;\n }\n\n const serializedEnvelope = serializeEnvelope(envelope);\n\n const request = getNativeHttpRequest();\n const req = request(\n {\n method: 'POST',\n path: spotlightUrl.pathname,\n hostname: spotlightUrl.hostname,\n port: spotlightUrl.port,\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n res.setEncoding('utf8');\n },\n );\n\n req.on('error', () => {\n failedRequests++;\n logger.warn('[Spotlight] Failed to send envelope to Spotlight Sidecar');\n });\n req.write(serializedEnvelope);\n req.end();\n });\n}\n\nfunction parseSidecarUrl(url) {\n try {\n return new URL(`${url}`);\n } catch (e) {\n logger.warn(`[Spotlight] Invalid sidecar URL: ${url}`);\n return undefined;\n }\n}\n\n/**\n * We want to get an unpatched http request implementation to avoid capturing our own calls.\n */\nfunction getNativeHttpRequest() {\n const { request } = http;\n if (isWrapped(request)) {\n return request.__sentry_original__;\n }\n\n return request;\n}\n\nfunction isWrapped(impl) {\n return '__sentry_original__' in impl;\n}\n\nexport { Spotlight, getNativeHttpRequest, spotlightIntegration };\n//# sourceMappingURL=spotlight.js.map\n"],"names":["logger","defineIntegration","convertIntegrationFnToClass","envelope","serializeEnvelope","url","URL","http"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,wBAAyB,CAAC,UAAU,OAAO;AAC/C,QAAM,WAAW;AAAA,IACf,YAAY,QAAQ,cAAc;AAAA,EACtC;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,MAAM,QAAQ;AACZ,UAAI,OAAO,YAAY,YAAY,QAAQ,OAAO,QAAQ,IAAI,aAAa,eAAe;AACxFA,sBAAO,KAAK,4FAA4F;AAAA,MACzG;AACD,yBAAmB,QAAQ,QAAQ;AAAA,IACpC;AAAA,EACL;AACA;AAEK,MAAC,uBAAuBC,YAAiB,kBAAC,qBAAqB;AAYlDC,YAAAA,4BAA4B,kBAAkB,oBAAoB;AAMpF,SAAS,mBAAmB,QAAQ,SAAS;AAC3C,QAAM,eAAe,gBAAgB,QAAQ,UAAU;AACvD,MAAI,CAAC,cAAc;AACjB;AAAA,EACD;AAED,MAAI,iBAAiB;AAErB,MAAI,OAAO,OAAO,OAAO,YAAY;AACnCF,kBAAO,KAAK,2FAA2F;AACvG;AAAA,EACD;AAED,SAAO,GAAG,kBAAkB,CAACG,eAAa;AACxC,QAAI,iBAAiB,GAAG;AACtBH,oBAAO,KAAK,sFAAsF;AAClG;AAAA,IACD;AAED,UAAM,qBAAqBI,2BAAkBD,UAAQ;AAErD,UAAM,UAAU;AAChB,UAAM,MAAM;AAAA,MACV;AAAA,QACE,QAAQ;AAAA,QACR,MAAM,aAAa;AAAA,QACnB,UAAU,aAAa;AAAA,QACvB,MAAM,aAAa;AAAA,QACnB,SAAS;AAAA,UACP,gBAAgB;AAAA,QACjB;AAAA,MACF;AAAA,MACD,SAAO;AACL,YAAI,GAAG,QAAQ,MAAM;AAAA,QAE7B,CAAS;AAED,YAAI,GAAG,OAAO,MAAM;AAAA,QAE5B,CAAS;AACD,YAAI,YAAY,MAAM;AAAA,MACvB;AAAA,IACP;AAEI,QAAI,GAAG,SAAS,MAAM;AACpB;AACAH,oBAAO,KAAK,0DAA0D;AAAA,IAC5E,CAAK;AACD,QAAI,MAAM,kBAAkB;AAC5B,QAAI,IAAG;AAAA,EACX,CAAG;AACH;AAEA,SAAS,gBAAgBK,OAAK;AAC5B,MAAI;AACF,WAAO,IAAIC,IAAAA,IAAI,GAAGD,KAAG,EAAE;AAAA,EACxB,SAAQ,GAAG;AACVL,WAAAA,OAAO,KAAK,oCAAoCK,KAAG,EAAE;AACrD,WAAO;AAAA,EACR;AACH;AAKA,SAAS,uBAAuB;AAC9B,QAAM,EAAE,QAAS,IAAGE;AACpB,MAAI,UAAU,OAAO,GAAG;AACtB,WAAO,QAAQ;AAAA,EAChB;AAED,SAAO;AACT;AAEA,SAAS,UAAU,MAAM;AACvB,SAAO,yBAAyB;AAClC;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"spotlight.cjs","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/spotlight.js"],"sourcesContent":["import * as http from 'http';\nimport { URL } from 'url';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { logger, serializeEnvelope } from '@sentry/utils';\n\nconst INTEGRATION_NAME = 'Spotlight';\n\nconst _spotlightIntegration = ((options = {}) => {\n const _options = {\n sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream',\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') {\n logger.warn(\"[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?\");\n }\n connectToSpotlight(client, _options);\n },\n };\n}) ;\n\nconst spotlightIntegration = defineIntegration(_spotlightIntegration);\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n *\n * Important: This integration only works with Node 18 or newer.\n *\n * @deprecated Use `spotlightIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Spotlight = convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nfunction connectToSpotlight(client, options) {\n const spotlightUrl = parseSidecarUrl(options.sidecarUrl);\n if (!spotlightUrl) {\n return;\n }\n\n let failedRequests = 0;\n\n if (typeof client.on !== 'function') {\n logger.warn('[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)');\n return;\n }\n\n client.on('beforeEnvelope', (envelope) => {\n if (failedRequests > 3) {\n logger.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests');\n return;\n }\n\n const serializedEnvelope = serializeEnvelope(envelope);\n\n const request = getNativeHttpRequest();\n const req = request(\n {\n method: 'POST',\n path: spotlightUrl.pathname,\n hostname: spotlightUrl.hostname,\n port: spotlightUrl.port,\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n res.setEncoding('utf8');\n },\n );\n\n req.on('error', () => {\n failedRequests++;\n logger.warn('[Spotlight] Failed to send envelope to Spotlight Sidecar');\n });\n req.write(serializedEnvelope);\n req.end();\n });\n}\n\nfunction parseSidecarUrl(url) {\n try {\n return new URL(`${url}`);\n } catch (e) {\n logger.warn(`[Spotlight] Invalid sidecar URL: ${url}`);\n return undefined;\n }\n}\n\n/**\n * We want to get an unpatched http request implementation to avoid capturing our own calls.\n */\nfunction getNativeHttpRequest() {\n const { request } = http;\n if (isWrapped(request)) {\n return request.__sentry_original__;\n }\n\n return request;\n}\n\nfunction isWrapped(impl) {\n return '__sentry_original__' in impl;\n}\n\nexport { Spotlight, getNativeHttpRequest, spotlightIntegration };\n//# sourceMappingURL=spotlight.js.map\n"],"names":["logger","defineIntegration","convertIntegrationFnToClass","envelope","serializeEnvelope","url","URL","http"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,wBAAyB,CAAC,UAAU,OAAO;AAC/C,QAAM,WAAW;AAAA,IACf,YAAY,QAAQ,cAAc;AAAA,EACtC;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,MAAM,QAAQ;AACZ,UAAI,OAAO,YAAY,YAAY,QAAQ,OAAO,QAAQ,IAAI,aAAa,eAAe;AACxFA,eAAAA,OAAO,KAAK,4FAA4F;AAAA,MAC1G;AACA,yBAAmB,QAAQ,QAAQ;AAAA,IACrC;AAAA,EACJ;AACA;AAEK,MAAC,uBAAuBC,YAAAA,kBAAkB,qBAAqB;AAYlDC,YAAAA,4BAA4B,kBAAkB,oBAAoB;AAMpF,SAAS,mBAAmB,QAAQ,SAAS;AAC3C,QAAM,eAAe,gBAAgB,QAAQ,UAAU;AACvD,MAAI,CAAC,cAAc;AACjB;AAAA,EACF;AAEA,MAAI,iBAAiB;AAErB,MAAI,OAAO,OAAO,OAAO,YAAY;AACnCF,WAAAA,OAAO,KAAK,2FAA2F;AACvG;AAAA,EACF;AAEA,SAAO,GAAG,kBAAkB,CAACG,eAAa;AACxC,QAAI,iBAAiB,GAAG;AACtBH,aAAAA,OAAO,KAAK,sFAAsF;AAClG;AAAA,IACF;AAEA,UAAM,qBAAqBI,SAAAA,kBAAkBD,UAAQ;AAErD,UAAM,UAAU,qBAAoB;AACpC,UAAM,MAAM;AAAA,MACV;AAAA,QACE,QAAQ;AAAA,QACR,MAAM,aAAa;AAAA,QACnB,UAAU,aAAa;AAAA,QACvB,MAAM,aAAa;AAAA,QACnB,SAAS;AAAA,UACP,gBAAgB;AAAA,QAC1B;AAAA,MACA;AAAA,MACM,SAAO;AACL,YAAI,GAAG,QAAQ,MAAM;AAAA,QAErB,CAAC;AAED,YAAI,GAAG,OAAO,MAAM;AAAA,QAEpB,CAAC;AACD,YAAI,YAAY,MAAM;AAAA,MACxB;AAAA,IACN;AAEI,QAAI,GAAG,SAAS,MAAM;AACpB;AACAH,aAAAA,OAAO,KAAK,0DAA0D;AAAA,IACxE,CAAC;AACD,QAAI,MAAM,kBAAkB;AAC5B,QAAI,IAAG;AAAA,EACT,CAAC;AACH;AAEA,SAAS,gBAAgBK,OAAK;AAC5B,MAAI;AACF,WAAO,IAAIC,IAAAA,IAAI,GAAGD,KAAG,EAAE;AAAA,EACzB,SAAS,GAAG;AACVL,WAAAA,OAAO,KAAK,oCAAoCK,KAAG,EAAE;AACrD,WAAO;AAAA,EACT;AACF;AAKA,SAAS,uBAAuB;AAC9B,QAAM,EAAE,QAAO,IAAKE;AACpB,MAAI,UAAU,OAAO,GAAG;AACtB,WAAO,QAAQ;AAAA,EACjB;AAEA,SAAO;AACT;AAEA,SAAS,UAAU,MAAM;AACvB,SAAO,yBAAyB;AAClC;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/spotlight.js"],"sourcesContent":["import * as http from 'http';\nimport { URL } from 'url';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { logger, serializeEnvelope } from '@sentry/utils';\n\nconst INTEGRATION_NAME = 'Spotlight';\n\nconst _spotlightIntegration = ((options = {}) => {\n const _options = {\n sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream',\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') {\n logger.warn(\"[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?\");\n }\n connectToSpotlight(client, _options);\n },\n };\n}) ;\n\nconst spotlightIntegration = defineIntegration(_spotlightIntegration);\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n *\n * Important: This integration only works with Node 18 or newer.\n *\n * @deprecated Use `spotlightIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Spotlight = convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nfunction connectToSpotlight(client, options) {\n const spotlightUrl = parseSidecarUrl(options.sidecarUrl);\n if (!spotlightUrl) {\n return;\n }\n\n let failedRequests = 0;\n\n if (typeof client.on !== 'function') {\n logger.warn('[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)');\n return;\n }\n\n client.on('beforeEnvelope', (envelope) => {\n if (failedRequests > 3) {\n logger.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests');\n return;\n }\n\n const serializedEnvelope = serializeEnvelope(envelope);\n\n const request = getNativeHttpRequest();\n const req = request(\n {\n method: 'POST',\n path: spotlightUrl.pathname,\n hostname: spotlightUrl.hostname,\n port: spotlightUrl.port,\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n res.setEncoding('utf8');\n },\n );\n\n req.on('error', () => {\n failedRequests++;\n logger.warn('[Spotlight] Failed to send envelope to Spotlight Sidecar');\n });\n req.write(serializedEnvelope);\n req.end();\n });\n}\n\nfunction parseSidecarUrl(url) {\n try {\n return new URL(`${url}`);\n } catch (e) {\n logger.warn(`[Spotlight] Invalid sidecar URL: ${url}`);\n return undefined;\n }\n}\n\n/**\n * We want to get an unpatched http request implementation to avoid capturing our own calls.\n */\nfunction getNativeHttpRequest() {\n const { request } = http;\n if (isWrapped(request)) {\n return request.__sentry_original__;\n }\n\n return request;\n}\n\nfunction isWrapped(impl) {\n return '__sentry_original__' in impl;\n}\n\nexport { Spotlight, getNativeHttpRequest, spotlightIntegration };\n//# sourceMappingURL=spotlight.js.map\n"],"names":[],"mappings":";;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,wBAAyB,CAAC,UAAU,OAAO;AAC/C,QAAM,WAAW;AAAA,IACf,YAAY,QAAQ,cAAc;AAAA,EACtC;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAE;AAAA;AAAA,IACd,MAAM,QAAQ;AACZ,UAAI,OAAO,YAAY,YAAY,QAAQ,OAAO,QAAQ,IAAI,aAAa,eAAe;AACxF,eAAO,KAAK,4FAA4F;AAAA,MACzG;AACD,yBAAmB,QAAQ,QAAQ;AAAA,IACpC;AAAA,EACL;AACA;AAEK,MAAC,uBAAuB,kBAAkB,qBAAqB;AAYlD,4BAA4B,kBAAkB,oBAAoB;AAMpF,SAAS,mBAAmB,QAAQ,SAAS;AAC3C,QAAM,eAAe,gBAAgB,QAAQ,UAAU;AACvD,MAAI,CAAC,cAAc;AACjB;AAAA,EACD;AAED,MAAI,iBAAiB;AAErB,MAAI,OAAO,OAAO,OAAO,YAAY;AACnC,WAAO,KAAK,2FAA2F;AACvG;AAAA,EACD;AAED,SAAO,GAAG,kBAAkB,CAAC,aAAa;AACxC,QAAI,iBAAiB,GAAG;AACtB,aAAO,KAAK,sFAAsF;AAClG;AAAA,IACD;AAED,UAAM,qBAAqB,kBAAkB,QAAQ;AAErD,UAAM,UAAU;AAChB,UAAM,MAAM;AAAA,MACV;AAAA,QACE,QAAQ;AAAA,QACR,MAAM,aAAa;AAAA,QACnB,UAAU,aAAa;AAAA,QACvB,MAAM,aAAa;AAAA,QACnB,SAAS;AAAA,UACP,gBAAgB;AAAA,QACjB;AAAA,MACF;AAAA,MACD,SAAO;AACL,YAAI,GAAG,QAAQ,MAAM;AAAA,QAE7B,CAAS;AAED,YAAI,GAAG,OAAO,MAAM;AAAA,QAE5B,CAAS;AACD,YAAI,YAAY,MAAM;AAAA,MACvB;AAAA,IACP;AAEI,QAAI,GAAG,SAAS,MAAM;AACpB;AACA,aAAO,KAAK,0DAA0D;AAAA,IAC5E,CAAK;AACD,QAAI,MAAM,kBAAkB;AAC5B,QAAI,IAAG;AAAA,EACX,CAAG;AACH;AAEA,SAAS,gBAAgB,KAAK;AAC5B,MAAI;AACF,WAAO,IAAI,IAAI,GAAG,GAAG,EAAE;AAAA,EACxB,SAAQ,GAAG;AACV,WAAO,KAAK,oCAAoC,GAAG,EAAE;AACrD,WAAO;AAAA,EACR;AACH;AAKA,SAAS,uBAAuB;AAC9B,QAAM,EAAE,QAAS,IAAG;AACpB,MAAI,UAAU,OAAO,GAAG;AACtB,WAAO,QAAQ;AAAA,EAChB;AAED,SAAO;AACT;AAEA,SAAS,UAAU,MAAM;AACvB,SAAO,yBAAyB;AAClC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"spotlight.js","sources":["../../../../../../../../node_modules/@sentry/node/esm/integrations/spotlight.js"],"sourcesContent":["import * as http from 'http';\nimport { URL } from 'url';\nimport { defineIntegration, convertIntegrationFnToClass } from '@sentry/core';\nimport { logger, serializeEnvelope } from '@sentry/utils';\n\nconst INTEGRATION_NAME = 'Spotlight';\n\nconst _spotlightIntegration = ((options = {}) => {\n const _options = {\n sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream',\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n setup(client) {\n if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') {\n logger.warn(\"[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?\");\n }\n connectToSpotlight(client, _options);\n },\n };\n}) ;\n\nconst spotlightIntegration = defineIntegration(_spotlightIntegration);\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n *\n * Important: This integration only works with Node 18 or newer.\n *\n * @deprecated Use `spotlightIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst Spotlight = convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration)\n\n;\n\n// eslint-disable-next-line deprecation/deprecation\n\nfunction connectToSpotlight(client, options) {\n const spotlightUrl = parseSidecarUrl(options.sidecarUrl);\n if (!spotlightUrl) {\n return;\n }\n\n let failedRequests = 0;\n\n if (typeof client.on !== 'function') {\n logger.warn('[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)');\n return;\n }\n\n client.on('beforeEnvelope', (envelope) => {\n if (failedRequests > 3) {\n logger.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests');\n return;\n }\n\n const serializedEnvelope = serializeEnvelope(envelope);\n\n const request = getNativeHttpRequest();\n const req = request(\n {\n method: 'POST',\n path: spotlightUrl.pathname,\n hostname: spotlightUrl.hostname,\n port: spotlightUrl.port,\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n },\n res => {\n res.on('data', () => {\n // Drain socket\n });\n\n res.on('end', () => {\n // Drain socket\n });\n res.setEncoding('utf8');\n },\n );\n\n req.on('error', () => {\n failedRequests++;\n logger.warn('[Spotlight] Failed to send envelope to Spotlight Sidecar');\n });\n req.write(serializedEnvelope);\n req.end();\n });\n}\n\nfunction parseSidecarUrl(url) {\n try {\n return new URL(`${url}`);\n } catch (e) {\n logger.warn(`[Spotlight] Invalid sidecar URL: ${url}`);\n return undefined;\n }\n}\n\n/**\n * We want to get an unpatched http request implementation to avoid capturing our own calls.\n */\nfunction getNativeHttpRequest() {\n const { request } = http;\n if (isWrapped(request)) {\n return request.__sentry_original__;\n }\n\n return request;\n}\n\nfunction isWrapped(impl) {\n return '__sentry_original__' in impl;\n}\n\nexport { Spotlight, getNativeHttpRequest, spotlightIntegration };\n//# sourceMappingURL=spotlight.js.map\n"],"names":[],"mappings":";;;;;AAKA,MAAM,mBAAmB;AAEzB,MAAM,wBAAyB,CAAC,UAAU,OAAO;AAC/C,QAAM,WAAW;AAAA,IACf,YAAY,QAAQ,cAAc;AAAA,EACtC;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,MAAM,QAAQ;AACZ,UAAI,OAAO,YAAY,YAAY,QAAQ,OAAO,QAAQ,IAAI,aAAa,eAAe;AACxF,eAAO,KAAK,4FAA4F;AAAA,MAC1G;AACA,yBAAmB,QAAQ,QAAQ;AAAA,IACrC;AAAA,EACJ;AACA;AAEK,MAAC,uBAAuB,kBAAkB,qBAAqB;AAYlD,4BAA4B,kBAAkB,oBAAoB;AAMpF,SAAS,mBAAmB,QAAQ,SAAS;AAC3C,QAAM,eAAe,gBAAgB,QAAQ,UAAU;AACvD,MAAI,CAAC,cAAc;AACjB;AAAA,EACF;AAEA,MAAI,iBAAiB;AAErB,MAAI,OAAO,OAAO,OAAO,YAAY;AACnC,WAAO,KAAK,2FAA2F;AACvG;AAAA,EACF;AAEA,SAAO,GAAG,kBAAkB,CAAC,aAAa;AACxC,QAAI,iBAAiB,GAAG;AACtB,aAAO,KAAK,sFAAsF;AAClG;AAAA,IACF;AAEA,UAAM,qBAAqB,kBAAkB,QAAQ;AAErD,UAAM,UAAU,qBAAoB;AACpC,UAAM,MAAM;AAAA,MACV;AAAA,QACE,QAAQ;AAAA,QACR,MAAM,aAAa;AAAA,QACnB,UAAU,aAAa;AAAA,QACvB,MAAM,aAAa;AAAA,QACnB,SAAS;AAAA,UACP,gBAAgB;AAAA,QAC1B;AAAA,MACA;AAAA,MACM,SAAO;AACL,YAAI,GAAG,QAAQ,MAAM;AAAA,QAErB,CAAC;AAED,YAAI,GAAG,OAAO,MAAM;AAAA,QAEpB,CAAC;AACD,YAAI,YAAY,MAAM;AAAA,MACxB;AAAA,IACN;AAEI,QAAI,GAAG,SAAS,MAAM;AACpB;AACA,aAAO,KAAK,0DAA0D;AAAA,IACxE,CAAC;AACD,QAAI,MAAM,kBAAkB;AAC5B,QAAI,IAAG;AAAA,EACT,CAAC;AACH;AAEA,SAAS,gBAAgB,KAAK;AAC5B,MAAI;AACF,WAAO,IAAI,IAAI,GAAG,GAAG,EAAE;AAAA,EACzB,SAAS,GAAG;AACV,WAAO,KAAK,oCAAoC,GAAG,EAAE;AACrD,WAAO;AAAA,EACT;AACF;AAKA,SAAS,uBAAuB;AAC9B,QAAM,EAAE,QAAO,IAAK;AACpB,MAAI,UAAU,OAAO,GAAG;AACtB,WAAO,QAAQ;AAAA,EACjB;AAEA,SAAO;AACT;AAEA,SAAS,UAAU,MAAM;AACvB,SAAO,yBAAyB;AAClC;","x_google_ignoreList":[0]}
@@ -14,8 +14,8 @@ const tracing = require('./../../../_node_modules/@sentry/utils/esm/tracing.cjs'
14
14
  const baggage = require('./../../../_node_modules/@sentry/utils/esm/baggage.cjs');
15
15
  const dynamicSamplingContext = require('./../../../_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs');
16
16
  const spanstatus = require('./../../../_node_modules/@sentry/core/esm/tracing/spanstatus.cjs');
17
- const url = require('./../../../_node_modules/@sentry/utils/esm/url.cjs');
18
17
  const string = require('./../../../_node_modules/@sentry/utils/esm/string.cjs');
18
+ const url = require('./../../../_node_modules/@sentry/utils/esm/url.cjs');
19
19
  exports.ChannelName = void 0;
20
20
  (function(ChannelName) {
21
21
  const RequestCreate = "undici:request:create";
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../../../../node_modules/@sentry/node/esm/integrations/undici/index.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, hasTracingEnabled, getClient, isSentryRequestUrl, getCurrentScope, getIsolationScope, getActiveSpan, spanToTraceHeader, getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromClient, setHttpStatus, addBreadcrumb } from '@sentry/core';\nimport { LRUMap, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, parseUrl, stringMatchesSomePattern, getSanitizedUrlString } from '@sentry/utils';\nimport { NODE_VERSION } from '../../nodeVersion.js';\n\nvar ChannelName;(function (ChannelName) {\n // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md#undicirequestcreate\n const RequestCreate = 'undici:request:create'; ChannelName[\"RequestCreate\"] = RequestCreate;\n const RequestEnd = 'undici:request:headers'; ChannelName[\"RequestEnd\"] = RequestEnd;\n const RequestError = 'undici:request:error'; ChannelName[\"RequestError\"] = RequestError;\n})(ChannelName || (ChannelName = {}));\n\n// Please note that you cannot use `console.log` to debug the callbacks registered to the `diagnostics_channel` API.\n// To debug, you can use `writeFileSync` to write to a file:\n// https://nodejs.org/api/async_hooks.html#printing-in-asynchook-callbacks\n//\n// import { writeFileSync } from 'fs';\n// import { format } from 'util';\n//\n// function debug(...args: any): void {\n// // Use a function like this one when debugging inside an AsyncHook callback\n// // @ts-expect-error any\n// writeFileSync('log.out', `${format(...args)}\\n`, { flag: 'a' });\n// }\n\nconst _nativeNodeFetchintegration = ((options) => {\n // eslint-disable-next-line deprecation/deprecation\n return new Undici(options) ;\n}) ;\n\nconst nativeNodeFetchintegration = defineIntegration(_nativeNodeFetchintegration);\n\n/**\n * Instruments outgoing HTTP requests made with the `undici` package via\n * Node's `diagnostics_channel` API.\n *\n * Supports Undici 4.7.0 or higher.\n *\n * Requires Node 16.17.0 or higher.\n *\n * @deprecated Use `nativeNodeFetchintegration()` instead.\n */\nclass Undici {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Undici';}\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n __init() {this.name = Undici.id;}\n\n __init2() {this._createSpanUrlMap = new LRUMap(100);}\n __init3() {this._headersUrlMap = new LRUMap(100);}\n\n constructor(_options = {}) {Undici.prototype.__init.call(this);Undici.prototype.__init2.call(this);Undici.prototype.__init3.call(this);Undici.prototype.__init4.call(this);Undici.prototype.__init5.call(this);Undici.prototype.__init6.call(this);\n this._options = {\n breadcrumbs: _options.breadcrumbs === undefined ? true : _options.breadcrumbs,\n tracing: _options.tracing,\n shouldCreateSpanForRequest: _options.shouldCreateSpanForRequest,\n };\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobalEventProcessor) {\n // Requires Node 16+ to use the diagnostics_channel API.\n if (NODE_VERSION.major < 16) {\n return;\n }\n\n let ds;\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n ds = require('diagnostics_channel') ;\n } catch (e) {\n // no-op\n }\n\n if (!ds || !ds.subscribe) {\n return;\n }\n\n // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md\n ds.subscribe(ChannelName.RequestCreate, this._onRequestCreate);\n ds.subscribe(ChannelName.RequestEnd, this._onRequestEnd);\n ds.subscribe(ChannelName.RequestError, this._onRequestError);\n }\n\n /** Helper that wraps shouldCreateSpanForRequest option */\n _shouldCreateSpan(url) {\n if (this._options.tracing === false || (this._options.tracing === undefined && !hasTracingEnabled())) {\n return false;\n }\n\n if (this._options.shouldCreateSpanForRequest === undefined) {\n return true;\n }\n\n const cachedDecision = this._createSpanUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = this._options.shouldCreateSpanForRequest(url);\n this._createSpanUrlMap.set(url, decision);\n return decision;\n }\n\n __init4() {this._onRequestCreate = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([getClient, 'call', _10 => _10(), 'optionalAccess', _11 => _11.getIntegration, 'call', _12 => _12(Undici)])) {\n return;\n }\n\n const { request } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n const client = getClient();\n if (!client) {\n return;\n }\n\n if (isSentryRequestUrl(stringUrl, client) || request.__sentry_span__ !== undefined) {\n return;\n }\n\n const clientOptions = client.getOptions();\n const scope = getCurrentScope();\n const isolationScope = getIsolationScope();\n const parentSpan = getActiveSpan();\n\n const span = this._shouldCreateSpan(stringUrl) ? createRequestSpan(parentSpan, request, stringUrl) : undefined;\n if (span) {\n request.__sentry_span__ = span;\n }\n\n const shouldAttachTraceData = (url) => {\n if (clientOptions.tracePropagationTargets === undefined) {\n return true;\n }\n\n const cachedDecision = this._headersUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = stringMatchesSomePattern(url, clientOptions.tracePropagationTargets);\n this._headersUrlMap.set(url, decision);\n return decision;\n };\n\n if (shouldAttachTraceData(stringUrl)) {\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span\n ? getDynamicSamplingContextFromSpan(span)\n : getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n setHeadersOnRequest(request, sentryTraceHeader, sentryBaggageHeader);\n }\n };}\n\n __init5() {this._onRequestEnd = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([getClient, 'call', _13 => _13(), 'optionalAccess', _14 => _14.getIntegration, 'call', _15 => _15(Undici)])) {\n return;\n }\n\n const { request, response } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n if (isSentryRequestUrl(stringUrl, getClient())) {\n return;\n }\n\n const span = request.__sentry_span__;\n if (span) {\n setHttpStatus(span, response.statusCode);\n span.end();\n }\n\n if (this._options.breadcrumbs) {\n addBreadcrumb(\n {\n category: 'http',\n data: {\n method: request.method,\n status_code: response.statusCode,\n url: stringUrl,\n },\n type: 'http',\n },\n {\n event: 'response',\n request,\n response,\n },\n );\n }\n };}\n\n __init6() {this._onRequestError = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([getClient, 'call', _16 => _16(), 'optionalAccess', _17 => _17.getIntegration, 'call', _18 => _18(Undici)])) {\n return;\n }\n\n const { request } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n if (isSentryRequestUrl(stringUrl, getClient())) {\n return;\n }\n\n const span = request.__sentry_span__;\n if (span) {\n span.setStatus('internal_error');\n span.end();\n }\n\n if (this._options.breadcrumbs) {\n addBreadcrumb(\n {\n category: 'http',\n data: {\n method: request.method,\n url: stringUrl,\n },\n level: 'error',\n type: 'http',\n },\n {\n event: 'error',\n request,\n },\n );\n }\n };}\n}Undici.__initStatic();\n\nfunction setHeadersOnRequest(\n request,\n sentryTrace,\n sentryBaggageHeader,\n) {\n let hasSentryHeaders;\n if (Array.isArray(request.headers)) {\n hasSentryHeaders = request.headers.some(headerLine => headerLine === 'sentry-trace');\n } else {\n const headerLines = request.headers.split('\\r\\n');\n hasSentryHeaders = headerLines.some(headerLine => headerLine.startsWith('sentry-trace:'));\n }\n\n if (hasSentryHeaders) {\n return;\n }\n\n request.addHeader('sentry-trace', sentryTrace);\n if (sentryBaggageHeader) {\n request.addHeader('baggage', sentryBaggageHeader);\n }\n}\n\nfunction createRequestSpan(\n activeSpan,\n request,\n stringUrl,\n) {\n const url = parseUrl(stringUrl);\n\n const method = request.method || 'GET';\n const data = {\n 'http.method': method,\n };\n if (url.search) {\n data['http.query'] = url.search;\n }\n if (url.hash) {\n data['http.fragment'] = url.hash;\n }\n // eslint-disable-next-line deprecation/deprecation\n return _optionalChain([activeSpan, 'optionalAccess', _19 => _19.startChild, 'call', _20 => _20({\n op: 'http.client',\n origin: 'auto.http.node.undici',\n description: `${method} ${getSanitizedUrlString(url)}`,\n data,\n })]);\n}\n\nexport { ChannelName, Undici, nativeNodeFetchintegration };\n//# sourceMappingURL=index.js.map\n"],"names":["ChannelName","defineIntegration","LRUMap","NODE_VERSION","url","hasTracingEnabled","_optionalChain","getClient","isSentryRequestUrl","getCurrentScope","getIsolationScope","getActiveSpan","stringMatchesSomePattern","spanToTraceHeader","generateSentryTraceHeader","dynamicSamplingContextToSentryBaggageHeader","getDynamicSamplingContextFromSpan","getDynamicSamplingContextFromClient","setHttpStatus","addBreadcrumb","parseUrl","getSanitizedUrlString"],"mappings":";;;;;;;;;;;;;;;;;;AAKIA,QAAY,cAAA;AAAA,CAAC,SAAU,aAAa;AAEtC,QAAM,gBAAgB;AAAyB,cAAY,eAAe,IAAI;AAC9E,QAAM,aAAa;AAA0B,cAAY,YAAY,IAAI;AACzE,QAAM,eAAe;AAAwB,cAAY,cAAc,IAAI;AAC7E,GAAGA,wBAAgBA,QAAAA,cAAc,CAAE,EAAC;AAepC,MAAM,8BAA+B,CAAC,YAAY;AAEhD,SAAO,IAAI,OAAO,OAAO;AAC3B;AAEK,MAAC,6BAA6BC,YAAiB,kBAAC,2BAA2B;AAYhF,MAAM,OAAQ;AAAA;AAAA;AAAA;AAAA,EAIX,OAAO,eAAe;AAAC,SAAK,KAAK;AAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1C,SAAS;AAAC,SAAK,OAAO,OAAO;AAAA,EAAG;AAAA,EAE/B,UAAU;AAAC,SAAK,oBAAoB,IAAIC,IAAM,OAAC,GAAG;AAAA,EAAE;AAAA,EACpD,UAAU;AAAC,SAAK,iBAAiB,IAAIA,IAAM,OAAC,GAAG;AAAA,EAAE;AAAA,EAElD,YAAY,WAAW,IAAI;AAAC,WAAO,UAAU,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AAI;AAAA,EAC7B;AAED,SAAOE,eAAc,eAAC,CAAC,YAAY,kBAAkB,SAAO,IAAI,YAAY,QAAQ,SAAO,IAAI;AAAA,IAC7F,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,aAAa,GAAG,MAAM,IAAIe,IAAqB,sBAACjB,KAAG,CAAC;AAAA,IACpD;AAAA,EACD,CAAA,CAAC,CAAC;AACL;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../../../../node_modules/@sentry/node/esm/integrations/undici/index.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils';\nimport { defineIntegration, hasTracingEnabled, getClient, isSentryRequestUrl, getCurrentScope, getIsolationScope, getActiveSpan, spanToTraceHeader, getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromClient, setHttpStatus, addBreadcrumb } from '@sentry/core';\nimport { LRUMap, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, parseUrl, stringMatchesSomePattern, getSanitizedUrlString } from '@sentry/utils';\nimport { NODE_VERSION } from '../../nodeVersion.js';\n\nvar ChannelName;(function (ChannelName) {\n // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md#undicirequestcreate\n const RequestCreate = 'undici:request:create'; ChannelName[\"RequestCreate\"] = RequestCreate;\n const RequestEnd = 'undici:request:headers'; ChannelName[\"RequestEnd\"] = RequestEnd;\n const RequestError = 'undici:request:error'; ChannelName[\"RequestError\"] = RequestError;\n})(ChannelName || (ChannelName = {}));\n\n// Please note that you cannot use `console.log` to debug the callbacks registered to the `diagnostics_channel` API.\n// To debug, you can use `writeFileSync` to write to a file:\n// https://nodejs.org/api/async_hooks.html#printing-in-asynchook-callbacks\n//\n// import { writeFileSync } from 'fs';\n// import { format } from 'util';\n//\n// function debug(...args: any): void {\n// // Use a function like this one when debugging inside an AsyncHook callback\n// // @ts-expect-error any\n// writeFileSync('log.out', `${format(...args)}\\n`, { flag: 'a' });\n// }\n\nconst _nativeNodeFetchintegration = ((options) => {\n // eslint-disable-next-line deprecation/deprecation\n return new Undici(options) ;\n}) ;\n\nconst nativeNodeFetchintegration = defineIntegration(_nativeNodeFetchintegration);\n\n/**\n * Instruments outgoing HTTP requests made with the `undici` package via\n * Node's `diagnostics_channel` API.\n *\n * Supports Undici 4.7.0 or higher.\n *\n * Requires Node 16.17.0 or higher.\n *\n * @deprecated Use `nativeNodeFetchintegration()` instead.\n */\nclass Undici {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Undici';}\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n __init() {this.name = Undici.id;}\n\n __init2() {this._createSpanUrlMap = new LRUMap(100);}\n __init3() {this._headersUrlMap = new LRUMap(100);}\n\n constructor(_options = {}) {Undici.prototype.__init.call(this);Undici.prototype.__init2.call(this);Undici.prototype.__init3.call(this);Undici.prototype.__init4.call(this);Undici.prototype.__init5.call(this);Undici.prototype.__init6.call(this);\n this._options = {\n breadcrumbs: _options.breadcrumbs === undefined ? true : _options.breadcrumbs,\n tracing: _options.tracing,\n shouldCreateSpanForRequest: _options.shouldCreateSpanForRequest,\n };\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobalEventProcessor) {\n // Requires Node 16+ to use the diagnostics_channel API.\n if (NODE_VERSION.major < 16) {\n return;\n }\n\n let ds;\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n ds = require('diagnostics_channel') ;\n } catch (e) {\n // no-op\n }\n\n if (!ds || !ds.subscribe) {\n return;\n }\n\n // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md\n ds.subscribe(ChannelName.RequestCreate, this._onRequestCreate);\n ds.subscribe(ChannelName.RequestEnd, this._onRequestEnd);\n ds.subscribe(ChannelName.RequestError, this._onRequestError);\n }\n\n /** Helper that wraps shouldCreateSpanForRequest option */\n _shouldCreateSpan(url) {\n if (this._options.tracing === false || (this._options.tracing === undefined && !hasTracingEnabled())) {\n return false;\n }\n\n if (this._options.shouldCreateSpanForRequest === undefined) {\n return true;\n }\n\n const cachedDecision = this._createSpanUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = this._options.shouldCreateSpanForRequest(url);\n this._createSpanUrlMap.set(url, decision);\n return decision;\n }\n\n __init4() {this._onRequestCreate = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([getClient, 'call', _10 => _10(), 'optionalAccess', _11 => _11.getIntegration, 'call', _12 => _12(Undici)])) {\n return;\n }\n\n const { request } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n const client = getClient();\n if (!client) {\n return;\n }\n\n if (isSentryRequestUrl(stringUrl, client) || request.__sentry_span__ !== undefined) {\n return;\n }\n\n const clientOptions = client.getOptions();\n const scope = getCurrentScope();\n const isolationScope = getIsolationScope();\n const parentSpan = getActiveSpan();\n\n const span = this._shouldCreateSpan(stringUrl) ? createRequestSpan(parentSpan, request, stringUrl) : undefined;\n if (span) {\n request.__sentry_span__ = span;\n }\n\n const shouldAttachTraceData = (url) => {\n if (clientOptions.tracePropagationTargets === undefined) {\n return true;\n }\n\n const cachedDecision = this._headersUrlMap.get(url);\n if (cachedDecision !== undefined) {\n return cachedDecision;\n }\n\n const decision = stringMatchesSomePattern(url, clientOptions.tracePropagationTargets);\n this._headersUrlMap.set(url, decision);\n return decision;\n };\n\n if (shouldAttachTraceData(stringUrl)) {\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span\n ? getDynamicSamplingContextFromSpan(span)\n : getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n setHeadersOnRequest(request, sentryTraceHeader, sentryBaggageHeader);\n }\n };}\n\n __init5() {this._onRequestEnd = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([getClient, 'call', _13 => _13(), 'optionalAccess', _14 => _14.getIntegration, 'call', _15 => _15(Undici)])) {\n return;\n }\n\n const { request, response } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n if (isSentryRequestUrl(stringUrl, getClient())) {\n return;\n }\n\n const span = request.__sentry_span__;\n if (span) {\n setHttpStatus(span, response.statusCode);\n span.end();\n }\n\n if (this._options.breadcrumbs) {\n addBreadcrumb(\n {\n category: 'http',\n data: {\n method: request.method,\n status_code: response.statusCode,\n url: stringUrl,\n },\n type: 'http',\n },\n {\n event: 'response',\n request,\n response,\n },\n );\n }\n };}\n\n __init6() {this._onRequestError = (message) => {\n // eslint-disable-next-line deprecation/deprecation\n if (!_optionalChain([getClient, 'call', _16 => _16(), 'optionalAccess', _17 => _17.getIntegration, 'call', _18 => _18(Undici)])) {\n return;\n }\n\n const { request } = message ;\n\n const stringUrl = request.origin ? request.origin.toString() + request.path : request.path;\n\n if (isSentryRequestUrl(stringUrl, getClient())) {\n return;\n }\n\n const span = request.__sentry_span__;\n if (span) {\n span.setStatus('internal_error');\n span.end();\n }\n\n if (this._options.breadcrumbs) {\n addBreadcrumb(\n {\n category: 'http',\n data: {\n method: request.method,\n url: stringUrl,\n },\n level: 'error',\n type: 'http',\n },\n {\n event: 'error',\n request,\n },\n );\n }\n };}\n}Undici.__initStatic();\n\nfunction setHeadersOnRequest(\n request,\n sentryTrace,\n sentryBaggageHeader,\n) {\n let hasSentryHeaders;\n if (Array.isArray(request.headers)) {\n hasSentryHeaders = request.headers.some(headerLine => headerLine === 'sentry-trace');\n } else {\n const headerLines = request.headers.split('\\r\\n');\n hasSentryHeaders = headerLines.some(headerLine => headerLine.startsWith('sentry-trace:'));\n }\n\n if (hasSentryHeaders) {\n return;\n }\n\n request.addHeader('sentry-trace', sentryTrace);\n if (sentryBaggageHeader) {\n request.addHeader('baggage', sentryBaggageHeader);\n }\n}\n\nfunction createRequestSpan(\n activeSpan,\n request,\n stringUrl,\n) {\n const url = parseUrl(stringUrl);\n\n const method = request.method || 'GET';\n const data = {\n 'http.method': method,\n };\n if (url.search) {\n data['http.query'] = url.search;\n }\n if (url.hash) {\n data['http.fragment'] = url.hash;\n }\n // eslint-disable-next-line deprecation/deprecation\n return _optionalChain([activeSpan, 'optionalAccess', _19 => _19.startChild, 'call', _20 => _20({\n op: 'http.client',\n origin: 'auto.http.node.undici',\n description: `${method} ${getSanitizedUrlString(url)}`,\n data,\n })]);\n}\n\nexport { ChannelName, Undici, nativeNodeFetchintegration };\n//# sourceMappingURL=index.js.map\n"],"names":["ChannelName","defineIntegration","LRUMap","NODE_VERSION","url","hasTracingEnabled","_optionalChain","getClient","isSentryRequestUrl","getCurrentScope","getIsolationScope","getActiveSpan","stringMatchesSomePattern","spanToTraceHeader","generateSentryTraceHeader","dynamicSamplingContextToSentryBaggageHeader","getDynamicSamplingContextFromSpan","getDynamicSamplingContextFromClient","setHttpStatus","addBreadcrumb","parseUrl","getSanitizedUrlString"],"mappings":";;;;;;;;;;;;;;;;;;AAKIA,QAAAA,cAAAA;AAAAA,CAAa,SAAU,aAAa;AAEtC,QAAM,gBAAgB;AAAyB,cAAY,eAAe,IAAI;AAC9E,QAAM,aAAa;AAA0B,cAAY,YAAY,IAAI;AACzE,QAAM,eAAe;AAAwB,cAAY,cAAc,IAAI;AAC7E,GAAGA,QAAAA,gBAAgBA,sBAAc,CAAA,EAAG;AAepC,MAAM,8BAA+B,CAAC,YAAY;AAEhD,SAAO,IAAI,OAAO,OAAO;AAC3B;AAEK,MAAC,6BAA6BC,YAAAA,kBAAkB,2BAA2B;AAYhF,MAAM,OAAQ;AAAA;AAAA;AAAA;AAAA,EAIX,OAAO,eAAe;AAAC,SAAK,KAAK;AAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1C,SAAS;AAAC,SAAK,OAAO,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W,mBAAmB;AAAA,EAClD;AACF;AAEA,SAAS,kBACP,YACA,SACA,WACA;AACA,QAAMf,QAAMgB,IAAAA,SAAS,SAAS;AAE9B,QAAM,SAAS,QAAQ,UAAU;AACjC,QAAM,OAAO;AAAA,IACX,eAAe;AAAA,EACnB;AACE,MAAIhB,MAAI,QAAQ;AACd,SAAK,YAAY,IAAIA,MAAI;AAAA,EAC3B;AACA,MAAIA,MAAI,MAAM;AACZ,SAAK,eAAe,IAAIA,MAAI;AAAA,EAC9B;AAEA,SAAOE,eAAAA,eAAe,CAAC,YAAY,kBAAkB,SAAO,IAAI,YAAY,QAAQ,SAAO,IAAI;AAAA,IAC7F,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,aAAa,GAAG,MAAM,IAAIe,IAAAA,sBAAsBjB,KAAG,CAAC;AAAA,IACpD;AAAA,EACJ,CAAG,CAAC,CAAC;AACL;;;","x_google_ignoreList":[0]}
@@ -12,8 +12,8 @@ import { generateSentryTraceHeader } from './../../../_node_modules/@sentry/util
12
12
  import { dynamicSamplingContextToSentryBaggageHeader } from './../../../_node_modules/@sentry/utils/esm/baggage.js';
13
13
  import { getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromClient } from './../../../_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js';
14
14
  import { setHttpStatus } from './../../../_node_modules/@sentry/core/esm/tracing/spanstatus.js';
15
- import { parseUrl, getSanitizedUrlString } from './../../../_node_modules/@sentry/utils/esm/url.js';
16
15
  import { stringMatchesSomePattern } from './../../../_node_modules/@sentry/utils/esm/string.js';
16
+ import { parseUrl, getSanitizedUrlString } from './../../../_node_modules/@sentry/utils/esm/url.js';
17
17
  var ChannelName;
18
18
  (function(ChannelName2) {
19
19
  const RequestCreate = "undici:request:create";