@sentry/replay 8.0.0-alpha.5 → 10.59.0

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 (268) hide show
  1. package/LICENSE +18 -11
  2. package/README.md +8 -17
  3. package/build/npm/cjs/index.js +8390 -0
  4. package/build/npm/cjs/index.js.map +1 -0
  5. package/build/npm/cjs/worker-bundler.js +1 -0
  6. package/build/npm/esm/index.js +8387 -0
  7. package/build/npm/esm/index.js.map +1 -0
  8. package/build/npm/esm/package.json +1 -0
  9. package/build/npm/esm/worker-bundler.js +1 -0
  10. package/{types → build/npm/types}/constants.d.ts +3 -2
  11. package/build/npm/types/constants.d.ts.map +1 -0
  12. package/{types → build/npm/types}/coreHandlers/handleAfterSendEvent.d.ts +1 -1
  13. package/{types → build/npm/types}/coreHandlers/handleAfterSendEvent.d.ts.map +1 -1
  14. package/{types → build/npm/types}/coreHandlers/handleBeforeSendEvent.d.ts +1 -1
  15. package/{types → build/npm/types}/coreHandlers/handleBeforeSendEvent.d.ts.map +1 -1
  16. package/{types → build/npm/types}/coreHandlers/handleBreadcrumbs.d.ts +1 -1
  17. package/{types → build/npm/types}/coreHandlers/handleBreadcrumbs.d.ts.map +1 -1
  18. package/{types → build/npm/types}/coreHandlers/handleClick.d.ts +2 -2
  19. package/{types → build/npm/types}/coreHandlers/handleClick.d.ts.map +1 -1
  20. package/{types → build/npm/types}/coreHandlers/handleDom.d.ts +1 -1
  21. package/{types → build/npm/types}/coreHandlers/handleDom.d.ts.map +1 -1
  22. package/{types → build/npm/types}/coreHandlers/handleGlobalEvent.d.ts +1 -1
  23. package/{types → build/npm/types}/coreHandlers/handleGlobalEvent.d.ts.map +1 -1
  24. package/{types → build/npm/types}/coreHandlers/handleHistory.d.ts +1 -1
  25. package/{types → build/npm/types}/coreHandlers/handleHistory.d.ts.map +1 -1
  26. package/{types → build/npm/types}/coreHandlers/handleKeyboardEvent.d.ts +1 -1
  27. package/{types → build/npm/types}/coreHandlers/handleKeyboardEvent.d.ts.map +1 -1
  28. package/{types → build/npm/types}/coreHandlers/handleNetworkBreadcrumbs.d.ts +1 -1
  29. package/{types → build/npm/types}/coreHandlers/handleNetworkBreadcrumbs.d.ts.map +1 -1
  30. package/build/npm/types/coreHandlers/performanceObserver.d.ts.map +1 -0
  31. package/{types → build/npm/types}/coreHandlers/util/addBreadcrumbEvent.d.ts +1 -1
  32. package/{types → build/npm/types}/coreHandlers/util/addBreadcrumbEvent.d.ts.map +1 -1
  33. package/{types → build/npm/types}/coreHandlers/util/addFeedbackBreadcrumb.d.ts +1 -1
  34. package/{types → build/npm/types}/coreHandlers/util/addFeedbackBreadcrumb.d.ts.map +1 -1
  35. package/{types → build/npm/types}/coreHandlers/util/addNetworkBreadcrumb.d.ts.map +1 -1
  36. package/{types → build/npm/types}/coreHandlers/util/domUtils.d.ts +1 -1
  37. package/{types → build/npm/types}/coreHandlers/util/domUtils.d.ts.map +1 -1
  38. package/{types → build/npm/types}/coreHandlers/util/fetchUtils.d.ts +4 -3
  39. package/build/npm/types/coreHandlers/util/fetchUtils.d.ts.map +1 -0
  40. package/{types → build/npm/types}/coreHandlers/util/getAttributesToRecord.d.ts.map +1 -1
  41. package/{types → build/npm/types}/coreHandlers/util/networkUtils.d.ts +2 -3
  42. package/build/npm/types/coreHandlers/util/networkUtils.d.ts.map +1 -0
  43. package/{types → build/npm/types}/coreHandlers/util/onWindowOpen.d.ts.map +1 -1
  44. package/{types → build/npm/types}/coreHandlers/util/shouldSampleForBufferEvent.d.ts +2 -2
  45. package/{types → build/npm/types}/coreHandlers/util/shouldSampleForBufferEvent.d.ts.map +1 -1
  46. package/{types → build/npm/types}/coreHandlers/util/xhrUtils.d.ts +4 -3
  47. package/build/npm/types/coreHandlers/util/xhrUtils.d.ts.map +1 -0
  48. package/{types → build/npm/types}/eventBuffer/EventBufferArray.d.ts +2 -0
  49. package/build/npm/types/eventBuffer/EventBufferArray.d.ts.map +1 -0
  50. package/{types → build/npm/types}/eventBuffer/EventBufferCompressionWorker.d.ts +5 -3
  51. package/build/npm/types/eventBuffer/EventBufferCompressionWorker.d.ts.map +1 -0
  52. package/{types → build/npm/types}/eventBuffer/EventBufferProxy.d.ts +5 -1
  53. package/build/npm/types/eventBuffer/EventBufferProxy.d.ts.map +1 -0
  54. package/{types → build/npm/types}/eventBuffer/WorkerHandler.d.ts +3 -1
  55. package/build/npm/types/eventBuffer/WorkerHandler.d.ts.map +1 -0
  56. package/{types → build/npm/types}/eventBuffer/index.d.ts +2 -2
  57. package/build/npm/types/eventBuffer/index.d.ts.map +1 -0
  58. package/{types → build/npm/types}/integration.d.ts +26 -13
  59. package/build/npm/types/integration.d.ts.map +1 -0
  60. package/{types → build/npm/types}/replay.d.ts +32 -27
  61. package/build/npm/types/replay.d.ts.map +1 -0
  62. package/{types → build/npm/types}/session/Session.d.ts.map +1 -1
  63. package/build/npm/types/session/fetchSession.d.ts +6 -0
  64. package/build/npm/types/session/fetchSession.d.ts.map +1 -0
  65. package/{types → build/npm/types}/session/loadOrCreateSession.d.ts +1 -2
  66. package/build/npm/types/session/loadOrCreateSession.d.ts.map +1 -0
  67. package/{types → build/npm/types}/types/performance.d.ts +16 -4
  68. package/{types → build/npm/types}/types/performance.d.ts.map +1 -1
  69. package/{types → build/npm/types}/types/replay.d.ts +53 -42
  70. package/build/npm/types/types/replay.d.ts.map +1 -0
  71. package/{types → build/npm/types}/types/replayFrame.d.ts +14 -7
  72. package/build/npm/types/types/replayFrame.d.ts.map +1 -0
  73. package/{types → build/npm/types}/types/request.d.ts +1 -1
  74. package/build/npm/types/types/request.d.ts.map +1 -0
  75. package/{types-ts3.8 → build/npm/types}/types/rrweb.d.ts +64 -60
  76. package/{types → build/npm/types}/types/rrweb.d.ts.map +1 -1
  77. package/{types → build/npm/types}/util/addEvent.d.ts.map +1 -1
  78. package/{types → build/npm/types}/util/addGlobalListeners.d.ts.map +1 -1
  79. package/build/npm/types/util/createPerformanceEntries.d.ts +52 -0
  80. package/build/npm/types/util/createPerformanceEntries.d.ts.map +1 -0
  81. package/{types → build/npm/types}/util/createPerformanceSpans.d.ts.map +1 -1
  82. package/{types → build/npm/types}/util/createReplayEnvelope.d.ts +1 -1
  83. package/{types → build/npm/types}/util/createReplayEnvelope.d.ts.map +1 -1
  84. package/{types → build/npm/types}/util/debounce.d.ts.map +1 -1
  85. package/{types → build/npm/types}/util/eventUtils.d.ts +1 -1
  86. package/{types → build/npm/types}/util/eventUtils.d.ts.map +1 -1
  87. package/{types → build/npm/types}/util/getPrivacyOptions.d.ts +3 -3
  88. package/build/npm/types/util/getPrivacyOptions.d.ts.map +1 -0
  89. package/build/npm/types/util/getRecordingSamplingOptions.d.ts +10 -0
  90. package/build/npm/types/util/getRecordingSamplingOptions.d.ts.map +1 -0
  91. package/{types → build/npm/types}/util/handleRecordingEmit.d.ts +1 -0
  92. package/build/npm/types/util/handleRecordingEmit.d.ts.map +1 -0
  93. package/{types → build/npm/types}/util/isRrwebError.d.ts +1 -1
  94. package/{types → build/npm/types}/util/isRrwebError.d.ts.map +1 -1
  95. package/build/npm/types/util/logger.d.ts +24 -0
  96. package/build/npm/types/util/logger.d.ts.map +1 -0
  97. package/{types → build/npm/types}/util/maskAttribute.d.ts +2 -0
  98. package/{types → build/npm/types}/util/maskAttribute.d.ts.map +1 -1
  99. package/{types → build/npm/types}/util/prepareRecordingData.d.ts +1 -1
  100. package/{types → build/npm/types}/util/prepareRecordingData.d.ts.map +1 -1
  101. package/{types → build/npm/types}/util/prepareReplayEvent.d.ts +2 -5
  102. package/build/npm/types/util/prepareReplayEvent.d.ts.map +1 -0
  103. package/build/npm/types/util/resetReplayIdOnDynamicSamplingContext.d.ts +14 -0
  104. package/build/npm/types/util/resetReplayIdOnDynamicSamplingContext.d.ts.map +1 -0
  105. package/build/npm/types/util/rrweb.d.ts +7 -0
  106. package/build/npm/types/util/rrweb.d.ts.map +1 -0
  107. package/{types → build/npm/types}/util/sendReplay.d.ts.map +1 -1
  108. package/{types → build/npm/types}/util/sendReplayRequest.d.ts +8 -2
  109. package/build/npm/types/util/sendReplayRequest.d.ts.map +1 -0
  110. package/{types → build/npm/types}/util/shouldFilterRequest.d.ts.map +1 -1
  111. package/build/npm/types/worker-bundler.d.ts +2 -0
  112. package/build/npm/types/worker-bundler.d.ts.map +1 -0
  113. package/{types-ts3.8 → build/npm/types-ts3.8}/constants.d.ts +3 -2
  114. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleAfterSendEvent.d.ts +1 -1
  115. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleBeforeSendEvent.d.ts +1 -1
  116. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleBreadcrumbs.d.ts +1 -1
  117. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleClick.d.ts +2 -2
  118. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleDom.d.ts +1 -1
  119. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleGlobalEvent.d.ts +1 -1
  120. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleHistory.d.ts +1 -1
  121. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleKeyboardEvent.d.ts +1 -1
  122. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleNetworkBreadcrumbs.d.ts +1 -1
  123. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/addBreadcrumbEvent.d.ts +1 -1
  124. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/addFeedbackBreadcrumb.d.ts +1 -1
  125. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/domUtils.d.ts +1 -1
  126. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/fetchUtils.d.ts +4 -3
  127. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/networkUtils.d.ts +2 -6
  128. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/shouldSampleForBufferEvent.d.ts +2 -2
  129. package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/xhrUtils.d.ts +4 -3
  130. package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/EventBufferArray.d.ts +2 -0
  131. package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/EventBufferCompressionWorker.d.ts +5 -3
  132. package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/EventBufferProxy.d.ts +4 -1
  133. package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/WorkerHandler.d.ts +3 -1
  134. package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/index.d.ts +2 -2
  135. package/{types-ts3.8 → build/npm/types-ts3.8}/integration.d.ts +26 -13
  136. package/{types-ts3.8 → build/npm/types-ts3.8}/replay.d.ts +32 -27
  137. package/{types-ts3.8 → build/npm/types-ts3.8}/session/fetchSession.d.ts +1 -1
  138. package/{types-ts3.8 → build/npm/types-ts3.8}/session/loadOrCreateSession.d.ts +1 -2
  139. package/{types-ts3.8 → build/npm/types-ts3.8}/types/performance.d.ts +16 -4
  140. package/{types-ts3.8 → build/npm/types-ts3.8}/types/replay.d.ts +53 -42
  141. package/{types-ts3.8 → build/npm/types-ts3.8}/types/replayFrame.d.ts +14 -7
  142. package/{types-ts3.8 → build/npm/types-ts3.8}/types/request.d.ts +1 -1
  143. package/{types → build/npm/types-ts3.8}/types/rrweb.d.ts +64 -60
  144. package/build/npm/types-ts3.8/util/createPerformanceEntries.d.ts +52 -0
  145. package/{types-ts3.8 → build/npm/types-ts3.8}/util/createReplayEnvelope.d.ts +1 -1
  146. package/{types-ts3.8 → build/npm/types-ts3.8}/util/eventUtils.d.ts +1 -1
  147. package/{types-ts3.8 → build/npm/types-ts3.8}/util/getPrivacyOptions.d.ts +3 -3
  148. package/build/npm/types-ts3.8/util/getRecordingSamplingOptions.d.ts +10 -0
  149. package/{types-ts3.8 → build/npm/types-ts3.8}/util/handleRecordingEmit.d.ts +1 -0
  150. package/{types-ts3.8 → build/npm/types-ts3.8}/util/isRrwebError.d.ts +1 -1
  151. package/build/npm/types-ts3.8/util/logger.d.ts +24 -0
  152. package/{types-ts3.8 → build/npm/types-ts3.8}/util/maskAttribute.d.ts +2 -0
  153. package/{types-ts3.8 → build/npm/types-ts3.8}/util/prepareRecordingData.d.ts +1 -1
  154. package/{types-ts3.8 → build/npm/types-ts3.8}/util/prepareReplayEvent.d.ts +2 -5
  155. package/build/npm/types-ts3.8/util/resetReplayIdOnDynamicSamplingContext.d.ts +14 -0
  156. package/build/npm/types-ts3.8/util/rrweb.d.ts +7 -0
  157. package/{types-ts3.8 → build/npm/types-ts3.8}/util/sendReplayRequest.d.ts +8 -2
  158. package/build/npm/types-ts3.8/worker-bundler.d.ts +2 -0
  159. package/package.json +65 -27
  160. package/cjs/index.js +0 -9382
  161. package/cjs/index.js.map +0 -1
  162. package/esm/index.js +0 -9375
  163. package/esm/index.js.map +0 -1
  164. package/esm/package.json +0 -1
  165. package/types/constants.d.ts.map +0 -1
  166. package/types/coreHandlers/performanceObserver.d.ts.map +0 -1
  167. package/types/coreHandlers/util/fetchUtils.d.ts.map +0 -1
  168. package/types/coreHandlers/util/networkUtils.d.ts.map +0 -1
  169. package/types/coreHandlers/util/xhrUtils.d.ts.map +0 -1
  170. package/types/eventBuffer/EventBufferArray.d.ts.map +0 -1
  171. package/types/eventBuffer/EventBufferCompressionWorker.d.ts.map +0 -1
  172. package/types/eventBuffer/EventBufferProxy.d.ts.map +0 -1
  173. package/types/eventBuffer/WorkerHandler.d.ts.map +0 -1
  174. package/types/eventBuffer/index.d.ts.map +0 -1
  175. package/types/integration.d.ts.map +0 -1
  176. package/types/replay.d.ts.map +0 -1
  177. package/types/session/fetchSession.d.ts +0 -6
  178. package/types/session/fetchSession.d.ts.map +0 -1
  179. package/types/session/index.d.ts +0 -2
  180. package/types/session/index.d.ts.map +0 -1
  181. package/types/session/loadOrCreateSession.d.ts.map +0 -1
  182. package/types/types/replay.d.ts.map +0 -1
  183. package/types/types/replayFrame.d.ts.map +0 -1
  184. package/types/types/request.d.ts.map +0 -1
  185. package/types/util/createPerformanceEntries.d.ts +0 -13
  186. package/types/util/createPerformanceEntries.d.ts.map +0 -1
  187. package/types/util/getPrivacyOptions.d.ts.map +0 -1
  188. package/types/util/handleRecordingEmit.d.ts.map +0 -1
  189. package/types/util/log.d.ts +0 -10
  190. package/types/util/log.d.ts.map +0 -1
  191. package/types/util/prepareReplayEvent.d.ts.map +0 -1
  192. package/types/util/sendReplayRequest.d.ts.map +0 -1
  193. package/types-ts3.8/session/index.d.ts +0 -2
  194. package/types-ts3.8/util/createPerformanceEntries.d.ts +0 -13
  195. package/types-ts3.8/util/log.d.ts +0 -10
  196. /package/{types → build/npm/types}/coreHandlers/performanceObserver.d.ts +0 -0
  197. /package/{types → build/npm/types}/coreHandlers/util/addNetworkBreadcrumb.d.ts +0 -0
  198. /package/{types → build/npm/types}/coreHandlers/util/getAttributesToRecord.d.ts +0 -0
  199. /package/{types → build/npm/types}/coreHandlers/util/onWindowOpen.d.ts +0 -0
  200. /package/{types → build/npm/types}/debug-build.d.ts +0 -0
  201. /package/{types → build/npm/types}/debug-build.d.ts.map +0 -0
  202. /package/{types → build/npm/types}/eventBuffer/error.d.ts +0 -0
  203. /package/{types → build/npm/types}/eventBuffer/error.d.ts.map +0 -0
  204. /package/{types → build/npm/types}/index.d.ts +0 -0
  205. /package/{types → build/npm/types}/index.d.ts.map +0 -0
  206. /package/{types → build/npm/types}/session/Session.d.ts +0 -0
  207. /package/{types → build/npm/types}/session/clearSession.d.ts +0 -0
  208. /package/{types → build/npm/types}/session/clearSession.d.ts.map +0 -0
  209. /package/{types → build/npm/types}/session/createSession.d.ts +0 -0
  210. /package/{types → build/npm/types}/session/createSession.d.ts.map +0 -0
  211. /package/{types → build/npm/types}/session/saveSession.d.ts +0 -0
  212. /package/{types → build/npm/types}/session/saveSession.d.ts.map +0 -0
  213. /package/{types → build/npm/types}/session/shouldRefreshSession.d.ts +0 -0
  214. /package/{types → build/npm/types}/session/shouldRefreshSession.d.ts.map +0 -0
  215. /package/{types → build/npm/types}/types/index.d.ts +0 -0
  216. /package/{types → build/npm/types}/types/index.d.ts.map +0 -0
  217. /package/{types → build/npm/types}/util/addEvent.d.ts +0 -0
  218. /package/{types → build/npm/types}/util/addGlobalListeners.d.ts +0 -0
  219. /package/{types → build/npm/types}/util/addMemoryEntry.d.ts +0 -0
  220. /package/{types → build/npm/types}/util/addMemoryEntry.d.ts.map +0 -0
  221. /package/{types → build/npm/types}/util/createBreadcrumb.d.ts +0 -0
  222. /package/{types → build/npm/types}/util/createBreadcrumb.d.ts.map +0 -0
  223. /package/{types → build/npm/types}/util/createPerformanceSpans.d.ts +0 -0
  224. /package/{types → build/npm/types}/util/debounce.d.ts +0 -0
  225. /package/{types → build/npm/types}/util/getReplay.d.ts +0 -0
  226. /package/{types → build/npm/types}/util/getReplay.d.ts.map +0 -0
  227. /package/{types → build/npm/types}/util/hasSessionStorage.d.ts +0 -0
  228. /package/{types → build/npm/types}/util/hasSessionStorage.d.ts.map +0 -0
  229. /package/{types → build/npm/types}/util/isExpired.d.ts +0 -0
  230. /package/{types → build/npm/types}/util/isExpired.d.ts.map +0 -0
  231. /package/{types → build/npm/types}/util/isSampled.d.ts +0 -0
  232. /package/{types → build/npm/types}/util/isSampled.d.ts.map +0 -0
  233. /package/{types → build/npm/types}/util/isSessionExpired.d.ts +0 -0
  234. /package/{types → build/npm/types}/util/isSessionExpired.d.ts.map +0 -0
  235. /package/{types → build/npm/types}/util/sendReplay.d.ts +0 -0
  236. /package/{types → build/npm/types}/util/shouldFilterRequest.d.ts +0 -0
  237. /package/{types → build/npm/types}/util/throttle.d.ts +0 -0
  238. /package/{types → build/npm/types}/util/throttle.d.ts.map +0 -0
  239. /package/{types → build/npm/types}/util/timestamp.d.ts +0 -0
  240. /package/{types → build/npm/types}/util/timestamp.d.ts.map +0 -0
  241. /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/performanceObserver.d.ts +0 -0
  242. /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/addNetworkBreadcrumb.d.ts +0 -0
  243. /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/getAttributesToRecord.d.ts +0 -0
  244. /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/onWindowOpen.d.ts +0 -0
  245. /package/{types-ts3.8 → build/npm/types-ts3.8}/debug-build.d.ts +0 -0
  246. /package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/error.d.ts +0 -0
  247. /package/{types-ts3.8 → build/npm/types-ts3.8}/index.d.ts +0 -0
  248. /package/{types-ts3.8 → build/npm/types-ts3.8}/session/Session.d.ts +0 -0
  249. /package/{types-ts3.8 → build/npm/types-ts3.8}/session/clearSession.d.ts +0 -0
  250. /package/{types-ts3.8 → build/npm/types-ts3.8}/session/createSession.d.ts +0 -0
  251. /package/{types-ts3.8 → build/npm/types-ts3.8}/session/saveSession.d.ts +0 -0
  252. /package/{types-ts3.8 → build/npm/types-ts3.8}/session/shouldRefreshSession.d.ts +0 -0
  253. /package/{types-ts3.8 → build/npm/types-ts3.8}/types/index.d.ts +0 -0
  254. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/addEvent.d.ts +0 -0
  255. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/addGlobalListeners.d.ts +0 -0
  256. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/addMemoryEntry.d.ts +0 -0
  257. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/createBreadcrumb.d.ts +0 -0
  258. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/createPerformanceSpans.d.ts +0 -0
  259. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/debounce.d.ts +0 -0
  260. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/getReplay.d.ts +0 -0
  261. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/hasSessionStorage.d.ts +0 -0
  262. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/isExpired.d.ts +0 -0
  263. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/isSampled.d.ts +0 -0
  264. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/isSessionExpired.d.ts +0 -0
  265. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/sendReplay.d.ts +0 -0
  266. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/shouldFilterRequest.d.ts +0 -0
  267. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/throttle.d.ts +0 -0
  268. /package/{types-ts3.8 → build/npm/types-ts3.8}/util/timestamp.d.ts +0 -0
@@ -0,0 +1,52 @@
1
+ import { AllPerformanceEntry, AllPerformanceEntryData, ReplayContainer, ReplayPerformanceEntry, WebVitalData } from '../types';
2
+ export interface Metric {
3
+ /**
4
+ * The current value of the metric.
5
+ */
6
+ value: number;
7
+ /**
8
+ * The rating as to whether the metric value is within the "good",
9
+ * "needs improvement", or "poor" thresholds of the metric.
10
+ */
11
+ rating: 'good' | 'needs-improvement' | 'poor';
12
+ /**
13
+ * Any performance entries relevant to the metric value calculation.
14
+ * The array may also be empty if the metric value was not based on any
15
+ * entries (e.g. a CLS value of 0 given no layout shifts).
16
+ */
17
+ entries: PerformanceEntry[] | LayoutShift[];
18
+ }
19
+ interface LayoutShift extends PerformanceEntry {
20
+ value: number;
21
+ sources: LayoutShiftAttribution[];
22
+ hadRecentInput: boolean;
23
+ }
24
+ interface LayoutShiftAttribution {
25
+ node?: Node;
26
+ previousRect: DOMRectReadOnly;
27
+ currentRect: DOMRectReadOnly;
28
+ }
29
+ /**
30
+ * Handler creater for web vitals
31
+ */
32
+ export declare function webVitalHandler(getter: (metric: Metric) => ReplayPerformanceEntry<AllPerformanceEntryData>, replay: ReplayContainer): (data: {
33
+ metric: Metric;
34
+ }) => void;
35
+ /**
36
+ * Create replay performance entries from the browser performance entries.
37
+ */
38
+ export declare function createPerformanceEntries(entries: AllPerformanceEntry[]): ReplayPerformanceEntry<AllPerformanceEntryData>[];
39
+ /**
40
+ * Add a LCP event to the replay based on a LCP metric.
41
+ */
42
+ export declare function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
43
+ /**
44
+ * Add a CLS event to the replay based on a CLS metric.
45
+ */
46
+ export declare function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
47
+ /**
48
+ * Add an INP event to the replay based on an INP metric.
49
+ */
50
+ export declare function getInteractionToNextPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
51
+ export {};
52
+ //# sourceMappingURL=createPerformanceEntries.d.ts.map
@@ -1,4 +1,4 @@
1
- import { DsnComponents, ReplayEnvelope, ReplayEvent, ReplayRecordingData } from '@sentry/types';
1
+ import { DsnComponents, ReplayEnvelope, ReplayEvent, ReplayRecordingData } from '@sentry/core';
2
2
  /**
3
3
  * Create a replay envelope ready to be sent.
4
4
  * This includes both the replay event, as well as the recording data.
@@ -1,4 +1,4 @@
1
- import { ErrorEvent, Event, FeedbackEvent, ReplayEvent, TransactionEvent } from '@sentry/types';
1
+ import { ErrorEvent, Event, FeedbackEvent, ReplayEvent, TransactionEvent } from '@sentry/core';
2
2
  /** If the event is an error event */
3
3
  export declare function isErrorEvent(event: Event): event is ErrorEvent;
4
4
  /** If the event is a transaction event */
@@ -1,5 +1,5 @@
1
- import { DeprecatedPrivacyOptions, ReplayIntegrationPrivacyOptions } from '../types';
2
- type GetPrivacyOptions = Required<Pick<ReplayIntegrationPrivacyOptions, Exclude<keyof ReplayIntegrationPrivacyOptions, 'maskFn'>>> & Pick<DeprecatedPrivacyOptions, Exclude<keyof DeprecatedPrivacyOptions, 'maskInputOptions'>>;
1
+ import { ReplayIntegrationPrivacyOptions } from '../types';
2
+ type GetPrivacyOptions = Required<Pick<ReplayIntegrationPrivacyOptions, Exclude<keyof ReplayIntegrationPrivacyOptions, 'maskFn'>>>;
3
3
  interface GetPrivacyReturn {
4
4
  maskTextSelector: string;
5
5
  unmaskTextSelector: string;
@@ -12,6 +12,6 @@ interface GetPrivacyReturn {
12
12
  /**
13
13
  * Returns privacy related configuration for use in rrweb
14
14
  */
15
- export declare function getPrivacyOptions({ mask, unmask, block, unblock, ignore, blockClass, blockSelector, maskTextClass, maskTextSelector, ignoreClass, }: GetPrivacyOptions): GetPrivacyReturn;
15
+ export declare function getPrivacyOptions({ mask, unmask, block, unblock, ignore }: GetPrivacyOptions): GetPrivacyReturn;
16
16
  export {};
17
17
  //# sourceMappingURL=getPrivacyOptions.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread
3
+ * https://github.com/getsentry/sentry-javascript/issues/14534
4
+ */
5
+ export declare function getRecordingSamplingOptions(): Partial<{
6
+ sampling: {
7
+ mousemove: boolean;
8
+ };
9
+ }>;
10
+ //# sourceMappingURL=getRecordingSamplingOptions.d.ts.map
@@ -6,6 +6,7 @@ type RecordingEmitCallback = (event: RecordingEvent, isCheckout?: boolean) => vo
6
6
  * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.
7
7
  */
8
8
  export declare function getHandleRecordingEmit(replay: ReplayContainer): RecordingEmitCallback;
9
+ export declare function syncMirrorAttributesFromMutationEvent(event: RecordingEvent): void;
9
10
  /**
10
11
  * Exported for tests
11
12
  */
@@ -1,4 +1,4 @@
1
- import { Event, EventHint } from '@sentry/types';
1
+ import { Event, EventHint } from '@sentry/core';
2
2
  /**
3
3
  * Returns true if we think the given event is an error originating inside of rrweb.
4
4
  */
@@ -0,0 +1,24 @@
1
+ import { debug as coreDebug } from '@sentry/core';
2
+ interface LoggerConfig {
3
+ captureExceptions: boolean;
4
+ traceInternals: boolean;
5
+ }
6
+ type CoreDebugLogger = typeof coreDebug;
7
+ interface ReplayDebugLogger extends CoreDebugLogger {
8
+ /**
9
+ * Calls `debug.log` but saves breadcrumb in the next tick due to race
10
+ * conditions before replay is initialized.
11
+ */
12
+ infoTick: CoreDebugLogger['log'];
13
+ /**
14
+ * Captures exceptions (`Error`) if "capture internal exceptions" is enabled
15
+ */
16
+ exception: CoreDebugLogger['error'];
17
+ /**
18
+ * Configures the logger with additional debugging behavior
19
+ */
20
+ setConfig(config: Partial<LoggerConfig>): void;
21
+ }
22
+ export declare const debug: ReplayDebugLogger;
23
+ export {};
24
+ //# sourceMappingURL=logger.d.ts.map
@@ -9,6 +9,8 @@ interface MaskAttributeParams {
9
9
  }
10
10
  /**
11
11
  * Masks an attribute if necessary, otherwise return attribute value as-is.
12
+ * Keys listed in `maskAttributes` are masked even when `maskAllText` is false;
13
+ * masking `value` on submit/button inputs without listing `value` still requires `maskAllText`.
12
14
  */
13
15
  export declare function maskAttribute({ el, key, maskAttributes, maskAllText, privacyOptions, value, }: MaskAttributeParams): string;
14
16
  export {};
@@ -1,4 +1,4 @@
1
- import { ReplayRecordingData } from '@sentry/types';
1
+ import { ReplayRecordingData } from '@sentry/core';
2
2
  /**
3
3
  * Prepare the recording data ready to be sent.
4
4
  */
@@ -1,12 +1,9 @@
1
- import { IntegrationIndex } from '@sentry/core';
2
- import { Client, ReplayEvent, Scope } from '@sentry/types';
1
+ import { Client, ReplayEvent, Scope } from '@sentry/core';
3
2
  /**
4
3
  * Prepare a replay event & enrich it with the SDK metadata.
5
4
  */
6
5
  export declare function prepareReplayEvent({ client, scope, replayId: event_id, event, }: {
7
- client: Client & {
8
- _integrations?: IntegrationIndex;
9
- };
6
+ client: Client;
10
7
  scope: Scope;
11
8
  replayId: string;
12
9
  event: ReplayEvent;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Reset the `replay_id` field on the DSC.
3
+ */
4
+ export declare function resetReplayIdOnDynamicSamplingContext(): void;
5
+ /**
6
+ * Set the `replay_id` field on the cached DSC.
7
+ * This is needed after a session refresh because the cached DSC on the scope
8
+ * (set by browserTracingIntegration when the idle span ended) persists across
9
+ * session boundaries. Without updating it, the new session's replay_id would
10
+ * never appear in DSC since `getDynamicSamplingContextFromClient` (and its
11
+ * `createDsc` hook) is not called when a cached DSC already exists.
12
+ */
13
+ export declare function setReplayIdOnDynamicSamplingContext(replayId: string): void;
14
+ //# sourceMappingURL=resetReplayIdOnDynamicSamplingContext.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vendored in from @sentry/rrweb.
3
+ *
4
+ * This is a copy of the function from rrweb, it is not nicely exported there.
5
+ */
6
+ export declare function closestElementOfNode(node: Node | null): HTMLElement | null;
7
+ //# sourceMappingURL=rrweb.d.ts.map
@@ -1,5 +1,4 @@
1
- import { TransportMakeRequestResponse } from '@sentry/types';
2
- import { RateLimits } from '@sentry/utils';
1
+ import { RateLimits, TransportMakeRequestResponse } from '@sentry/core';
3
2
  import { SendReplayData } from '../types';
4
3
  /**
5
4
  * Send replay attachment using `fetch()`
@@ -18,4 +17,11 @@ export declare class RateLimitError extends Error {
18
17
  rateLimits: RateLimits;
19
18
  constructor(rateLimits: RateLimits);
20
19
  }
20
+ /**
21
+ * This error indicates that the replay duration limit was exceeded and the session is too long.
22
+ *
23
+ */
24
+ export declare class ReplayDurationLimitError extends Error {
25
+ constructor();
26
+ }
21
27
  //# sourceMappingURL=sendReplayRequest.d.ts.map
@@ -0,0 +1,2 @@
1
+ import '@sentry-internal/replay-worker/worker-bundler';
2
+ //# sourceMappingURL=worker-bundler.d.ts.map
package/package.json CHANGED
@@ -1,37 +1,73 @@
1
1
  {
2
2
  "name": "@sentry/replay",
3
- "version": "8.0.0-alpha.5",
3
+ "version": "10.59.0",
4
4
  "description": "User replays for Sentry",
5
- "main": "cjs/index.js",
6
- "module": "esm/index.js",
7
- "types": "types/index.d.ts",
5
+ "main": "build/npm/cjs/index.js",
6
+ "module": "build/npm/esm/index.js",
7
+ "types": "build/npm/types/index.d.ts",
8
8
  "exports": {
9
9
  "./package.json": "./package.json",
10
+ "./worker-bundler": {
11
+ "react-native": "./build/npm/esm/worker-bundler.js",
12
+ "import": {
13
+ "types": "./build/npm/types/worker-bundler.d.ts",
14
+ "default": "./build/npm/esm/worker-bundler.js"
15
+ },
16
+ "require": {
17
+ "types": "./build/npm/types/worker-bundler.d.ts",
18
+ "default": "./build/npm/cjs/worker-bundler.js"
19
+ }
20
+ },
10
21
  ".": {
22
+ "react-native": "./build/npm/esm/index.js",
11
23
  "import": {
12
- "types": "./types/index.d.ts",
13
- "default": "./esm/index.js"
24
+ "types": "./build/npm/types/index.d.ts",
25
+ "default": "./build/npm/esm/index.js"
14
26
  },
15
27
  "require": {
16
- "types": "./types/index.d.ts",
17
- "default": "./cjs/index.js"
28
+ "types": "./build/npm/types/index.d.ts",
29
+ "default": "./build/npm/cjs/index.js"
18
30
  }
19
31
  }
20
32
  },
21
33
  "typesVersions": {
22
- "<4.9": {
23
- "types/index.d.ts": [
24
- "types-ts3.8/index.d.ts"
34
+ "<5.0": {
35
+ "build/npm/types/index.d.ts": [
36
+ "build/npm/types-ts3.8/index.d.ts"
25
37
  ]
26
38
  }
27
39
  },
28
40
  "files": [
29
- "cjs",
30
- "esm",
31
- "types",
32
- "types-ts3.8"
41
+ "/build/npm"
33
42
  ],
34
43
  "sideEffects": false,
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "scripts": {
48
+ "build": "run-p build:transpile build:types build:bundle",
49
+ "build:transpile": "rollup -c rollup.npm.config.mjs",
50
+ "build:bundle": "rollup -c rollup.bundle.config.mjs",
51
+ "build:dev": "run-p build:transpile build:types",
52
+ "build:types": "run-s build:types:core build:types:downlevel",
53
+ "build:types:core": "tsc -p tsconfig.types.json",
54
+ "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
55
+ "build:watch": "run-p build:transpile:watch build:bundle:watch",
56
+ "build:dev:watch": "run-p build:transpile:watch",
57
+ "build:transpile:watch": "yarn build:transpile --watch",
58
+ "build:bundle:watch": "yarn build:bundle --watch",
59
+ "build:tarball": "npm pack",
60
+ "circularDepCheck": "madge --circular src/index.ts",
61
+ "clean": "rimraf build sentry-replay-*.tgz",
62
+ "format": "oxfmt \"src/**/*.ts\" \"test/**/*.ts\" --write",
63
+ "format:check": "oxfmt \"src/**/*.ts\" \"test/**/*.ts\" --check",
64
+ "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware",
65
+ "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware",
66
+ "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module",
67
+ "test": "vitest run",
68
+ "test:watch": "vitest --watch",
69
+ "yalc:publish": "yalc publish --push --sig"
70
+ },
35
71
  "repository": {
36
72
  "type": "git",
37
73
  "url": "git+https://github.com/getsentry/sentry-javascript.git"
@@ -43,20 +79,22 @@
43
79
  },
44
80
  "homepage": "https://docs.sentry.io/platforms/javascript/session-replay/",
45
81
  "devDependencies": {
46
- "@babel/core": "^7.17.5",
47
- "@sentry-internal/replay-worker": "8.0.0-alpha.5",
48
- "@sentry-internal/rrweb": "2.11.0",
49
- "@sentry-internal/rrweb-snapshot": "2.11.0",
50
- "fflate": "^0.8.1",
51
- "jsdom-worker": "^0.2.1"
82
+ "@babel/core": "^7.29.6",
83
+ "@sentry-internal/replay-worker": "10.59.0",
84
+ "@sentry/rrweb": "2.43.2",
85
+ "@sentry/rrweb-snapshot": "2.43.2",
86
+ "fflate": "0.8.2",
87
+ "jest-matcher-utils": "^29.0.0",
88
+ "jsdom-worker": "^0.3.0"
52
89
  },
53
90
  "dependencies": {
54
- "@sentry-internal/tracing": "8.0.0-alpha.5",
55
- "@sentry/core": "8.0.0-alpha.5",
56
- "@sentry/types": "8.0.0-alpha.5",
57
- "@sentry/utils": "8.0.0-alpha.5"
91
+ "@sentry/browser-utils": "10.59.0",
92
+ "@sentry/core": "10.59.0"
58
93
  },
59
94
  "engines": {
60
- "node": ">=14.18"
95
+ "node": ">=18"
96
+ },
97
+ "volta": {
98
+ "extends": "../../package.json"
61
99
  }
62
- }
100
+ }