@sentry/browser 7.0.0-alpha.1 → 7.0.0-beta.2

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 (240) hide show
  1. package/README.md +2 -3
  2. package/cjs/client.js +130 -83
  3. package/cjs/client.js.map +1 -1
  4. package/cjs/eventbuilder.js +225 -167
  5. package/cjs/eventbuilder.js.map +1 -1
  6. package/cjs/exports.js +55 -47
  7. package/cjs/exports.js.map +1 -1
  8. package/cjs/flags.js +7 -3
  9. package/cjs/flags.js.map +1 -1
  10. package/cjs/helpers.js +122 -130
  11. package/cjs/helpers.js.map +1 -1
  12. package/cjs/index.js +78 -13
  13. package/cjs/index.js.map +1 -1
  14. package/cjs/integrations/breadcrumbs.js +223 -192
  15. package/cjs/integrations/breadcrumbs.js.map +1 -1
  16. package/cjs/integrations/dedupe.js +183 -142
  17. package/cjs/integrations/dedupe.js.map +1 -1
  18. package/cjs/integrations/globalhandlers.js +211 -171
  19. package/cjs/integrations/globalhandlers.js.map +1 -1
  20. package/cjs/integrations/httpcontext.js +51 -0
  21. package/cjs/integrations/httpcontext.js.map +1 -0
  22. package/cjs/integrations/index.js +18 -14
  23. package/cjs/integrations/index.js.map +1 -1
  24. package/cjs/integrations/linkederrors.js +79 -51
  25. package/cjs/integrations/linkederrors.js.map +1 -1
  26. package/cjs/integrations/trycatch.js +245 -216
  27. package/cjs/integrations/trycatch.js.map +1 -1
  28. package/cjs/sdk.js +168 -114
  29. package/cjs/sdk.js.map +1 -1
  30. package/cjs/stack-parsers.js +134 -84
  31. package/cjs/stack-parsers.js.map +1 -1
  32. package/cjs/transports/fetch.js +34 -80
  33. package/cjs/transports/fetch.js.map +1 -1
  34. package/cjs/transports/index.js +10 -14
  35. package/cjs/transports/index.js.map +1 -1
  36. package/cjs/transports/utils.js +57 -53
  37. package/cjs/transports/utils.js.map +1 -1
  38. package/cjs/transports/xhr.js +53 -63
  39. package/cjs/transports/xhr.js.map +1 -1
  40. package/esm/client.js +128 -82
  41. package/esm/client.js.map +1 -1
  42. package/esm/eventbuilder.js +218 -160
  43. package/esm/eventbuilder.js.map +1 -1
  44. package/esm/exports.js +12 -7
  45. package/esm/exports.js.map +1 -1
  46. package/esm/flags.js +5 -2
  47. package/esm/flags.js.map +1 -1
  48. package/esm/helpers.js +120 -127
  49. package/esm/helpers.js.map +1 -1
  50. package/esm/index.js +28 -10
  51. package/esm/index.js.map +1 -1
  52. package/esm/integrations/breadcrumbs.js +219 -190
  53. package/esm/integrations/breadcrumbs.js.map +1 -1
  54. package/esm/integrations/dedupe.js +180 -140
  55. package/esm/integrations/dedupe.js.map +1 -1
  56. package/esm/integrations/globalhandlers.js +208 -169
  57. package/esm/integrations/globalhandlers.js.map +1 -1
  58. package/esm/integrations/httpcontext.js +49 -0
  59. package/esm/integrations/httpcontext.js.map +1 -0
  60. package/esm/integrations/index.js +7 -7
  61. package/esm/integrations/index.js.map +1 -1
  62. package/esm/integrations/linkederrors.js +76 -49
  63. package/esm/integrations/linkederrors.js.map +1 -1
  64. package/esm/integrations/trycatch.js +242 -214
  65. package/esm/integrations/trycatch.js.map +1 -1
  66. package/esm/sdk.js +164 -111
  67. package/esm/sdk.js.map +1 -1
  68. package/esm/stack-parsers.js +126 -83
  69. package/esm/stack-parsers.js.map +1 -1
  70. package/esm/transports/fetch.js +32 -79
  71. package/esm/transports/fetch.js.map +1 -1
  72. package/esm/transports/index.js +3 -7
  73. package/esm/transports/index.js.map +1 -1
  74. package/esm/transports/utils.js +56 -52
  75. package/esm/transports/utils.js.map +1 -1
  76. package/esm/transports/xhr.js +51 -62
  77. package/esm/transports/xhr.js.map +1 -1
  78. package/package.json +4 -4
  79. package/types/client.d.ts +24 -18
  80. package/types/client.d.ts.map +1 -1
  81. package/types/eventbuilder.d.ts +1 -1
  82. package/types/exports.d.ts +5 -5
  83. package/types/exports.d.ts.map +1 -1
  84. package/types/helpers.d.ts +0 -5
  85. package/types/helpers.d.ts.map +1 -1
  86. package/types/index.d.ts +2 -3
  87. package/types/index.d.ts.map +1 -1
  88. package/types/integrations/breadcrumbs.d.ts +6 -7
  89. package/types/integrations/breadcrumbs.d.ts.map +1 -1
  90. package/types/integrations/globalhandlers.d.ts.map +1 -1
  91. package/types/integrations/{useragent.d.ts → httpcontext.d.ts} +3 -3
  92. package/types/integrations/httpcontext.d.ts.map +1 -0
  93. package/types/integrations/index.d.ts +1 -1
  94. package/types/integrations/index.d.ts.map +1 -1
  95. package/types/integrations/linkederrors.d.ts.map +1 -1
  96. package/types/sdk.d.ts +4 -4
  97. package/types/sdk.d.ts.map +1 -1
  98. package/types/stack-parsers.d.ts +7 -6
  99. package/types/stack-parsers.d.ts.map +1 -1
  100. package/types/transports/fetch.d.ts +6 -15
  101. package/types/transports/fetch.d.ts.map +1 -1
  102. package/types/transports/index.d.ts +2 -6
  103. package/types/transports/index.d.ts.map +1 -1
  104. package/types/transports/types.d.ts +10 -0
  105. package/types/transports/types.d.ts.map +1 -0
  106. package/types/transports/utils.d.ts +1 -1
  107. package/types/transports/utils.d.ts.map +1 -1
  108. package/types/transports/xhr.d.ts +6 -10
  109. package/types/transports/xhr.d.ts.map +1 -1
  110. package/cjs/client.d.ts +0 -58
  111. package/cjs/client.d.ts.map +0 -1
  112. package/cjs/eventbuilder.d.ts +0 -37
  113. package/cjs/eventbuilder.d.ts.map +0 -1
  114. package/cjs/exports.d.ts +0 -10
  115. package/cjs/exports.d.ts.map +0 -1
  116. package/cjs/flags.d.ts +0 -3
  117. package/cjs/flags.d.ts.map +0 -1
  118. package/cjs/helpers.d.ts +0 -52
  119. package/cjs/helpers.d.ts.map +0 -1
  120. package/cjs/index.d.ts +0 -16
  121. package/cjs/index.d.ts.map +0 -1
  122. package/cjs/integrations/breadcrumbs.d.ts +0 -47
  123. package/cjs/integrations/breadcrumbs.d.ts.map +0 -1
  124. package/cjs/integrations/dedupe.d.ts +0 -21
  125. package/cjs/integrations/dedupe.d.ts.map +0 -1
  126. package/cjs/integrations/globalhandlers.d.ts +0 -30
  127. package/cjs/integrations/globalhandlers.d.ts.map +0 -1
  128. package/cjs/integrations/index.d.ts +0 -7
  129. package/cjs/integrations/index.d.ts.map +0 -1
  130. package/cjs/integrations/linkederrors.d.ts +0 -42
  131. package/cjs/integrations/linkederrors.d.ts.map +0 -1
  132. package/cjs/integrations/trycatch.d.ts +0 -33
  133. package/cjs/integrations/trycatch.d.ts.map +0 -1
  134. package/cjs/integrations/useragent.d.ts +0 -17
  135. package/cjs/integrations/useragent.d.ts.map +0 -1
  136. package/cjs/integrations/useragent.js +0 -42
  137. package/cjs/integrations/useragent.js.map +0 -1
  138. package/cjs/sdk.d.ts +0 -112
  139. package/cjs/sdk.d.ts.map +0 -1
  140. package/cjs/stack-parsers.d.ts +0 -8
  141. package/cjs/stack-parsers.d.ts.map +0 -1
  142. package/cjs/transports/base.d.ts +0 -65
  143. package/cjs/transports/base.d.ts.map +0 -1
  144. package/cjs/transports/base.js +0 -141
  145. package/cjs/transports/base.js.map +0 -1
  146. package/cjs/transports/fetch.d.ts +0 -17
  147. package/cjs/transports/fetch.d.ts.map +0 -1
  148. package/cjs/transports/index.d.ts +0 -7
  149. package/cjs/transports/index.d.ts.map +0 -1
  150. package/cjs/transports/new-fetch.d.ts +0 -10
  151. package/cjs/transports/new-fetch.d.ts.map +0 -1
  152. package/cjs/transports/new-fetch.js +0 -27
  153. package/cjs/transports/new-fetch.js.map +0 -1
  154. package/cjs/transports/new-xhr.d.ts +0 -11
  155. package/cjs/transports/new-xhr.d.ts.map +0 -1
  156. package/cjs/transports/new-xhr.js +0 -46
  157. package/cjs/transports/new-xhr.js.map +0 -1
  158. package/cjs/transports/setup.d.ts +0 -22
  159. package/cjs/transports/setup.d.ts.map +0 -1
  160. package/cjs/transports/setup.js +0 -44
  161. package/cjs/transports/setup.js.map +0 -1
  162. package/cjs/transports/utils.d.ts +0 -48
  163. package/cjs/transports/utils.d.ts.map +0 -1
  164. package/cjs/transports/xhr.d.ts +0 -11
  165. package/cjs/transports/xhr.d.ts.map +0 -1
  166. package/cjs/version.d.ts +0 -2
  167. package/cjs/version.d.ts.map +0 -1
  168. package/cjs/version.js +0 -4
  169. package/cjs/version.js.map +0 -1
  170. package/esm/client.d.ts +0 -58
  171. package/esm/client.d.ts.map +0 -1
  172. package/esm/eventbuilder.d.ts +0 -37
  173. package/esm/eventbuilder.d.ts.map +0 -1
  174. package/esm/exports.d.ts +0 -10
  175. package/esm/exports.d.ts.map +0 -1
  176. package/esm/flags.d.ts +0 -3
  177. package/esm/flags.d.ts.map +0 -1
  178. package/esm/helpers.d.ts +0 -52
  179. package/esm/helpers.d.ts.map +0 -1
  180. package/esm/index.d.ts +0 -16
  181. package/esm/index.d.ts.map +0 -1
  182. package/esm/integrations/breadcrumbs.d.ts +0 -47
  183. package/esm/integrations/breadcrumbs.d.ts.map +0 -1
  184. package/esm/integrations/dedupe.d.ts +0 -21
  185. package/esm/integrations/dedupe.d.ts.map +0 -1
  186. package/esm/integrations/globalhandlers.d.ts +0 -30
  187. package/esm/integrations/globalhandlers.d.ts.map +0 -1
  188. package/esm/integrations/index.d.ts +0 -7
  189. package/esm/integrations/index.d.ts.map +0 -1
  190. package/esm/integrations/linkederrors.d.ts +0 -42
  191. package/esm/integrations/linkederrors.d.ts.map +0 -1
  192. package/esm/integrations/trycatch.d.ts +0 -33
  193. package/esm/integrations/trycatch.d.ts.map +0 -1
  194. package/esm/integrations/useragent.d.ts +0 -17
  195. package/esm/integrations/useragent.d.ts.map +0 -1
  196. package/esm/integrations/useragent.js +0 -41
  197. package/esm/integrations/useragent.js.map +0 -1
  198. package/esm/sdk.d.ts +0 -112
  199. package/esm/sdk.d.ts.map +0 -1
  200. package/esm/stack-parsers.d.ts +0 -8
  201. package/esm/stack-parsers.d.ts.map +0 -1
  202. package/esm/transports/base.d.ts +0 -65
  203. package/esm/transports/base.d.ts.map +0 -1
  204. package/esm/transports/base.js +0 -140
  205. package/esm/transports/base.js.map +0 -1
  206. package/esm/transports/fetch.d.ts +0 -17
  207. package/esm/transports/fetch.d.ts.map +0 -1
  208. package/esm/transports/index.d.ts +0 -7
  209. package/esm/transports/index.d.ts.map +0 -1
  210. package/esm/transports/new-fetch.d.ts +0 -10
  211. package/esm/transports/new-fetch.d.ts.map +0 -1
  212. package/esm/transports/new-fetch.js +0 -25
  213. package/esm/transports/new-fetch.js.map +0 -1
  214. package/esm/transports/new-xhr.d.ts +0 -11
  215. package/esm/transports/new-xhr.d.ts.map +0 -1
  216. package/esm/transports/new-xhr.js +0 -44
  217. package/esm/transports/new-xhr.js.map +0 -1
  218. package/esm/transports/setup.d.ts +0 -22
  219. package/esm/transports/setup.d.ts.map +0 -1
  220. package/esm/transports/setup.js +0 -42
  221. package/esm/transports/setup.js.map +0 -1
  222. package/esm/transports/utils.d.ts +0 -48
  223. package/esm/transports/utils.d.ts.map +0 -1
  224. package/esm/transports/xhr.d.ts +0 -11
  225. package/esm/transports/xhr.d.ts.map +0 -1
  226. package/esm/version.d.ts +0 -2
  227. package/esm/version.d.ts.map +0 -1
  228. package/esm/version.js +0 -3
  229. package/esm/version.js.map +0 -1
  230. package/types/integrations/useragent.d.ts.map +0 -1
  231. package/types/transports/base.d.ts +0 -65
  232. package/types/transports/base.d.ts.map +0 -1
  233. package/types/transports/new-fetch.d.ts +0 -10
  234. package/types/transports/new-fetch.d.ts.map +0 -1
  235. package/types/transports/new-xhr.d.ts +0 -11
  236. package/types/transports/new-xhr.d.ts.map +0 -1
  237. package/types/transports/setup.d.ts +0 -22
  238. package/types/transports/setup.d.ts.map +0 -1
  239. package/types/version.d.ts +0 -2
  240. package/types/version.d.ts.map +0 -1
@@ -1,37 +0,0 @@
1
- import { Event, EventHint, Exception, Severity, SeverityLevel, StackFrame, StackParser } from '@sentry/types';
2
- /**
3
- * This function creates an exception from an TraceKitStackTrace
4
- */
5
- export declare function exceptionFromError(stackParser: StackParser, ex: Error): Exception;
6
- /**
7
- * @hidden
8
- */
9
- export declare function eventFromPlainObject(stackParser: StackParser, exception: Record<string, unknown>, syntheticException?: Error, isUnhandledRejection?: boolean): Event;
10
- /**
11
- * @hidden
12
- */
13
- export declare function eventFromError(stackParser: StackParser, ex: Error): Event;
14
- /** Parses stack frames from an error */
15
- export declare function parseStackFrames(stackParser: StackParser, ex: Error & {
16
- framesToPop?: number;
17
- stacktrace?: string;
18
- }): StackFrame[];
19
- /**
20
- * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
21
- * @hidden
22
- */
23
- export declare function eventFromException(stackParser: StackParser, exception: unknown, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
24
- /**
25
- * Builds and Event from a Message
26
- * @hidden
27
- */
28
- export declare function eventFromMessage(stackParser: StackParser, message: string, level?: Severity | SeverityLevel, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
29
- /**
30
- * @hidden
31
- */
32
- export declare function eventFromUnknownInput(stackParser: StackParser, exception: unknown, syntheticException?: Error, attachStacktrace?: boolean, isUnhandledRejection?: boolean): Event;
33
- /**
34
- * @hidden
35
- */
36
- export declare function eventFromString(stackParser: StackParser, input: string, syntheticException?: Error, attachStacktrace?: boolean): Event;
37
- //# sourceMappingURL=eventbuilder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventbuilder.d.ts","sourceRoot":"","sources":["../../../src/eventbuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAe9G;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,GAAG,SAAS,CAkBjF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,kBAAkB,CAAC,EAAE,KAAK,EAC1B,oBAAoB,CAAC,EAAE,OAAO,GAC7B,KAAK,CA0BP;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,GAAG,KAAK,CAMzE;AAED,wCAAwC;AACxC,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,KAAK,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACxD,UAAU,EAAE,CAed;AAmCD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,SAAS,EAChB,gBAAgB,CAAC,EAAE,OAAO,GACzB,WAAW,CAAC,KAAK,CAAC,CASpB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EAEf,KAAK,GAAE,QAAQ,GAAG,aAAsB,EACxC,IAAI,CAAC,EAAE,SAAS,EAChB,gBAAgB,CAAC,EAAE,OAAO,GACzB,WAAW,CAAC,KAAK,CAAC,CAQpB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,OAAO,EAClB,kBAAkB,CAAC,EAAE,KAAK,EAC1B,gBAAgB,CAAC,EAAE,OAAO,EAC1B,oBAAoB,CAAC,EAAE,OAAO,GAC7B,KAAK,CAiEP;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,MAAM,EACb,kBAAkB,CAAC,EAAE,KAAK,EAC1B,gBAAgB,CAAC,EAAE,OAAO,GACzB,KAAK,CAeP"}
package/esm/exports.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export type { Breadcrumb, BreadcrumbHint, Request, SdkInfo, Event, EventHint, EventStatus, Exception, Response, Severity, SeverityLevel, StackFrame, Stacktrace, Thread, User, } from '@sentry/types';
2
- export type { BrowserOptions } from './client';
3
- export type { ReportDialogOptions } from './helpers';
4
- export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, makeMain, Scope, Session, startTransaction, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core';
5
- export { BrowserClient } from './client';
6
- export { defaultStackParsers, chromeStackParser, geckoStackParser, opera10StackParser, opera11StackParser, winjsStackParser, } from './stack-parsers';
7
- export { injectReportDialog } from './helpers';
8
- export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk';
9
- export { SDK_NAME } from './version';
10
- //# sourceMappingURL=exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/exports.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EAER,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,QAAQ,EACR,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
package/esm/flags.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /** Flag that is true for debug builds, false otherwise. */
2
- export declare const IS_DEBUG_BUILD: boolean;
3
- //# sourceMappingURL=flags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../src/flags.ts"],"names":[],"mappings":"AAgBA,2DAA2D;AAC3D,eAAO,MAAM,cAAc,SAAoE,CAAC"}
package/esm/helpers.d.ts DELETED
@@ -1,52 +0,0 @@
1
- import { DsnLike, Mechanism, WrappedFunction } from '@sentry/types';
2
- /**
3
- * @hidden
4
- */
5
- export declare function shouldIgnoreOnError(): boolean;
6
- /**
7
- * @hidden
8
- */
9
- export declare function ignoreNextOnError(): void;
10
- /**
11
- * Instruments the given function and sends an event to Sentry every time the
12
- * function throws an exception.
13
- *
14
- * @param fn A function to wrap.
15
- * @returns The wrapped function.
16
- * @hidden
17
- */
18
- export declare function wrap(fn: WrappedFunction, options?: {
19
- mechanism?: Mechanism;
20
- }, before?: WrappedFunction): any;
21
- /**
22
- * All properties the report dialog supports
23
- */
24
- export interface ReportDialogOptions {
25
- [key: string]: any;
26
- eventId?: string;
27
- dsn?: DsnLike;
28
- user?: {
29
- email?: string;
30
- name?: string;
31
- };
32
- lang?: string;
33
- title?: string;
34
- subtitle?: string;
35
- subtitle2?: string;
36
- labelName?: string;
37
- labelEmail?: string;
38
- labelComments?: string;
39
- labelClose?: string;
40
- labelSubmit?: string;
41
- errorGeneric?: string;
42
- errorFormEntry?: string;
43
- successMessage?: string;
44
- /** Callback after reportDialog showed up */
45
- onLoad?(): void;
46
- }
47
- /**
48
- * Injects the Report Dialog script
49
- * @hidden
50
- */
51
- export declare function injectReportDialog(options?: ReportDialogOptions): void;
52
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAwB,SAAS,EAAS,eAAe,EAAE,MAAM,eAAe,CAAC;AAgBjG;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,SAAS,CAAC;CAClB,EACN,MAAM,CAAC,EAAE,eAAe,GAEvB,GAAG,CAyGL;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAElC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CA6B1E"}
package/esm/index.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export * from './exports';
2
- import { Integrations as CoreIntegrations } from '@sentry/core';
3
- import * as BrowserIntegrations from './integrations';
4
- import * as Transports from './transports';
5
- declare const INTEGRATIONS: {
6
- GlobalHandlers: typeof BrowserIntegrations.GlobalHandlers;
7
- TryCatch: typeof BrowserIntegrations.TryCatch;
8
- Breadcrumbs: typeof BrowserIntegrations.Breadcrumbs;
9
- LinkedErrors: typeof BrowserIntegrations.LinkedErrors;
10
- UserAgent: typeof BrowserIntegrations.UserAgent;
11
- Dedupe: typeof BrowserIntegrations.Dedupe;
12
- FunctionToString: typeof CoreIntegrations.FunctionToString;
13
- InboundFilters: typeof CoreIntegrations.InboundFilters;
14
- };
15
- export { INTEGRATIONS as Integrations, Transports };
16
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,KAAK,mBAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAU3C,QAAA,MAAM,YAAY;;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -1,47 +0,0 @@
1
- import { Event, Integration } from '@sentry/types';
2
- /** JSDoc */
3
- interface BreadcrumbsOptions {
4
- console: boolean;
5
- dom: boolean | {
6
- serializeAttribute: string | string[];
7
- };
8
- fetch: boolean;
9
- history: boolean;
10
- sentry: boolean;
11
- xhr: boolean;
12
- }
13
- /**
14
- * Default Breadcrumbs instrumentations
15
- * TODO: Deprecated - with v6, this will be renamed to `Instrument`
16
- */
17
- export declare class Breadcrumbs implements Integration {
18
- /**
19
- * @inheritDoc
20
- */
21
- static id: string;
22
- /**
23
- * @inheritDoc
24
- */
25
- name: string;
26
- /** JSDoc */
27
- private readonly _options;
28
- /**
29
- * @inheritDoc
30
- */
31
- constructor(options?: Partial<BreadcrumbsOptions>);
32
- /**
33
- * Create a breadcrumb of `sentry` from the events themselves
34
- */
35
- addSentryBreadcrumb(event: Event): void;
36
- /**
37
- * Instrument browser built-ins w/ breadcrumb capturing
38
- * - Console API
39
- * - DOM API (click/typing)
40
- * - XMLHttpRequest API
41
- * - Fetch API
42
- * - History API
43
- */
44
- setupOnce(): void;
45
- }
46
- export {};
47
- //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAWnD,YAAY;AACZ,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,GAAG;QAAE,kBAAkB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;IACzD,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd;AAED;;;GAGG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAiB;IAEzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAkB;IAErC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C;;OAEG;gBACgB,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAYxD;;OAEG;IACI,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAiB9C;;;;;;;OAOG;IACI,SAAS,IAAI,IAAI;CAiBzB"}
@@ -1,21 +0,0 @@
1
- import { EventProcessor, Hub, Integration } from '@sentry/types';
2
- /** Deduplication filter */
3
- export declare class Dedupe implements Integration {
4
- /**
5
- * @inheritDoc
6
- */
7
- static id: string;
8
- /**
9
- * @inheritDoc
10
- */
11
- name: string;
12
- /**
13
- * @inheritDoc
14
- */
15
- private _previousEvent?;
16
- /**
17
- * @inheritDoc
18
- */
19
- setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
20
- }
21
- //# sourceMappingURL=dedupe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dedupe.d.ts","sourceRoot":"","sources":["../../../../src/integrations/dedupe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,cAAc,EAAa,GAAG,EAAE,WAAW,EAAc,MAAM,eAAe,CAAC;AAK/F,2BAA2B;AAC3B,qBAAa,MAAO,YAAW,WAAW;IACxC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAY;IAEpC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAa;IAEhC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAC,CAAQ;IAE/B;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;CAsB9G"}
@@ -1,30 +0,0 @@
1
- import { Integration } from '@sentry/types';
2
- declare type GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';
3
- /** JSDoc */
4
- declare type GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;
5
- /** Global handlers */
6
- export declare class GlobalHandlers implements Integration {
7
- /**
8
- * @inheritDoc
9
- */
10
- static id: string;
11
- /**
12
- * @inheritDoc
13
- */
14
- name: string;
15
- /** JSDoc */
16
- private readonly _options;
17
- /**
18
- * Stores references functions to installing handlers. Will set to undefined
19
- * after they have been run so that they are not used twice.
20
- */
21
- private _installFunc;
22
- /** JSDoc */
23
- constructor(options?: GlobalHandlersIntegrations);
24
- /**
25
- * @inheritDoc
26
- */
27
- setupOnce(): void;
28
- }
29
- export {};
30
- //# sourceMappingURL=globalhandlers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,WAAW,EAA0B,MAAM,eAAe,CAAC;AAiB3F,aAAK,oCAAoC,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAE/E,YAAY;AACZ,aAAK,0BAA0B,GAAG,MAAM,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;AAExF,sBAAsB;AACtB,qBAAa,cAAe,YAAW,WAAW;IAChD;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAoB;IAE5C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAqB;IAExC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IAEtD;;;OAGG;IACH,OAAO,CAAC,YAAY,CAGlB;IAEF,YAAY;gBACO,OAAO,CAAC,EAAE,0BAA0B;IAOvD;;OAEG;IACI,SAAS,IAAI,IAAI;CAgBzB"}
@@ -1,7 +0,0 @@
1
- export { GlobalHandlers } from './globalhandlers';
2
- export { TryCatch } from './trycatch';
3
- export { Breadcrumbs } from './breadcrumbs';
4
- export { LinkedErrors } from './linkederrors';
5
- export { UserAgent } from './useragent';
6
- export { Dedupe } from './dedupe';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -1,42 +0,0 @@
1
- import { Event, EventHint, Exception, ExtendedError, Integration, StackParser } from '@sentry/types';
2
- interface LinkedErrorsOptions {
3
- key: string;
4
- limit: number;
5
- }
6
- /** Adds SDK info to an event. */
7
- export declare class LinkedErrors implements Integration {
8
- /**
9
- * @inheritDoc
10
- */
11
- static id: string;
12
- /**
13
- * @inheritDoc
14
- */
15
- readonly name: string;
16
- /**
17
- * @inheritDoc
18
- */
19
- private readonly _key;
20
- /**
21
- * @inheritDoc
22
- */
23
- private readonly _limit;
24
- /**
25
- * @inheritDoc
26
- */
27
- constructor(options?: Partial<LinkedErrorsOptions>);
28
- /**
29
- * @inheritDoc
30
- */
31
- setupOnce(): void;
32
- }
33
- /**
34
- * @inheritDoc
35
- */
36
- export declare function _handler(parser: StackParser, key: string, limit: number, event: Event, hint?: EventHint): Event | null;
37
- /**
38
- * JSDOC
39
- */
40
- export declare function _walkErrorTree(parser: StackParser, limit: number, error: ExtendedError, key: string, stack?: Exception[]): Exception[];
41
- export {};
42
- //# sourceMappingURL=linkederrors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linkederrors.d.ts","sourceRoot":"","sources":["../../../../src/integrations/linkederrors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AASrG,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iCAAiC;AACjC,qBAAa,YAAa,YAAW,WAAW;IAC9C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAkB;IAE1C;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAmB;IAE/C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAElD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+B;IAEtD;;OAEG;gBACgB,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM;IAK7D;;OAEG;IACI,SAAS,IAAI,IAAI;CASzB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,EACZ,IAAI,CAAC,EAAE,SAAS,GACf,KAAK,GAAG,IAAI,CAOd;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,SAAS,EAAO,GACtB,SAAS,EAAE,CAMb"}
@@ -1,33 +0,0 @@
1
- import { Integration } from '@sentry/types';
2
- /** JSDoc */
3
- interface TryCatchOptions {
4
- setTimeout: boolean;
5
- setInterval: boolean;
6
- requestAnimationFrame: boolean;
7
- XMLHttpRequest: boolean;
8
- eventTarget: boolean | string[];
9
- }
10
- /** Wrap timer functions and event targets to catch errors and provide better meta data */
11
- export declare class TryCatch implements Integration {
12
- /**
13
- * @inheritDoc
14
- */
15
- static id: string;
16
- /**
17
- * @inheritDoc
18
- */
19
- name: string;
20
- /** JSDoc */
21
- private readonly _options;
22
- /**
23
- * @inheritDoc
24
- */
25
- constructor(options?: Partial<TryCatchOptions>);
26
- /**
27
- * Wrap timer functions and event targets to catch errors
28
- * and provide better metadata.
29
- */
30
- setupOnce(): void;
31
- }
32
- export {};
33
- //# sourceMappingURL=trycatch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trycatch.d.ts","sourceRoot":"","sources":["../../../../src/integrations/trycatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAuC7D,YAAY;AACZ,UAAU,eAAe;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACjC;AAED,0FAA0F;AAC1F,qBAAa,QAAS,YAAW,WAAW;IAC1C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAc;IAEtC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAe;IAElC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C;;OAEG;gBACgB,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAWrD;;;OAGG;IACI,SAAS,IAAI,IAAI;CAyBzB"}
@@ -1,17 +0,0 @@
1
- import { Integration } from '@sentry/types';
2
- /** UserAgent */
3
- export declare class UserAgent implements Integration {
4
- /**
5
- * @inheritDoc
6
- */
7
- static id: string;
8
- /**
9
- * @inheritDoc
10
- */
11
- name: string;
12
- /**
13
- * @inheritDoc
14
- */
15
- setupOnce(): void;
16
- }
17
- //# sourceMappingURL=useragent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useragent.d.ts","sourceRoot":"","sources":["../../../../src/integrations/useragent.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AAKnD,gBAAgB;AAChB,qBAAa,SAAU,YAAW,WAAW;IAC3C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAe;IAEvC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAgB;IAEnC;;OAEG;IACI,SAAS,IAAI,IAAI;CAyBzB"}
@@ -1,41 +0,0 @@
1
- import { __assign } from "tslib";
2
- import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
3
- import { getGlobalObject } from '@sentry/utils';
4
- var global = getGlobalObject();
5
- /** UserAgent */
6
- var UserAgent = /** @class */ (function () {
7
- function UserAgent() {
8
- /**
9
- * @inheritDoc
10
- */
11
- this.name = UserAgent.id;
12
- }
13
- /**
14
- * @inheritDoc
15
- */
16
- UserAgent.prototype.setupOnce = function () {
17
- addGlobalEventProcessor(function (event) {
18
- if (getCurrentHub().getIntegration(UserAgent)) {
19
- // if none of the information we want exists, don't bother
20
- if (!global.navigator && !global.location && !global.document) {
21
- return event;
22
- }
23
- // grab as much info as exists and add it to the event
24
- var url = (event.request && event.request.url) || (global.location && global.location.href);
25
- var referrer = (global.document || {}).referrer;
26
- var userAgent = (global.navigator || {}).userAgent;
27
- var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));
28
- var request = __assign(__assign({}, (url && { url: url })), { headers: headers });
29
- return __assign(__assign({}, event), { request: request });
30
- }
31
- return event;
32
- });
33
- };
34
- /**
35
- * @inheritDoc
36
- */
37
- UserAgent.id = 'UserAgent';
38
- return UserAgent;
39
- }());
40
- export { UserAgent };
41
- //# sourceMappingURL=useragent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useragent.js","sourceRoot":"","sources":["../../../../src/integrations/useragent.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,IAAM,MAAM,GAAG,eAAe,EAAU,CAAC;AAEzC,gBAAgB;AAChB;IAAA;QAME;;WAEG;QACI,SAAI,GAAW,SAAS,CAAC,EAAE,CAAC;IA8BrC,CAAC;IA5BC;;OAEG;IACI,6BAAS,GAAhB;QACE,uBAAuB,CAAC,UAAC,KAAY;YACnC,IAAI,aAAa,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE;gBAC7C,0DAA0D;gBAC1D,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;oBAC7D,OAAO,KAAK,CAAC;iBACd;gBAED,sDAAsD;gBACtD,IAAM,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACtF,IAAA,2CAAQ,CAA2B;gBACnC,IAAA,8CAAS,CAA4B;gBAE7C,IAAM,OAAO,kCACR,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GACxC,CAAC,QAAQ,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,GACnC,CAAC,SAAS,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAC9C,CAAC;gBACF,IAAM,OAAO,yBAAQ,CAAC,GAAG,IAAI,EAAE,GAAG,KAAA,EAAE,CAAC,KAAE,OAAO,SAAA,GAAE,CAAC;gBAEjD,6BAAY,KAAK,KAAE,OAAO,SAAA,IAAG;aAC9B;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IArCD;;OAEG;IACW,YAAE,GAAW,WAAW,CAAC;IAmCzC,gBAAC;CAAA,AAvCD,IAuCC;SAvCY,SAAS","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject<Window>();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (global.location && global.location.href);\n const { referrer } = global.document || {};\n const { userAgent } = global.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...(url && { url }), headers };\n\n return { ...event, request };\n }\n return event;\n });\n }\n}\n"]}
package/esm/sdk.d.ts DELETED
@@ -1,112 +0,0 @@
1
- import { Integrations as CoreIntegrations } from '@sentry/core';
2
- import { BrowserOptions } from './client';
3
- import { ReportDialogOptions } from './helpers';
4
- import { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';
5
- export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | GlobalHandlers | TryCatch | Breadcrumbs | LinkedErrors | UserAgent | Dedupe)[];
6
- /**
7
- * The Sentry Browser SDK Client.
8
- *
9
- * To use this SDK, call the {@link init} function as early as possible when
10
- * loading the web page. To set context information or send manual events, use
11
- * the provided methods.
12
- *
13
- * @example
14
- *
15
- * ```
16
- *
17
- * import { init } from '@sentry/browser';
18
- *
19
- * init({
20
- * dsn: '__DSN__',
21
- * // ...
22
- * });
23
- * ```
24
- *
25
- * @example
26
- * ```
27
- *
28
- * import { configureScope } from '@sentry/browser';
29
- * configureScope((scope: Scope) => {
30
- * scope.setExtra({ battery: 0.7 });
31
- * scope.setTag({ user_mode: 'admin' });
32
- * scope.setUser({ id: '4711' });
33
- * });
34
- * ```
35
- *
36
- * @example
37
- * ```
38
- *
39
- * import { addBreadcrumb } from '@sentry/browser';
40
- * addBreadcrumb({
41
- * message: 'My Breadcrumb',
42
- * // ...
43
- * });
44
- * ```
45
- *
46
- * @example
47
- *
48
- * ```
49
- *
50
- * import * as Sentry from '@sentry/browser';
51
- * Sentry.captureMessage('Hello, world!');
52
- * Sentry.captureException(new Error('Good bye'));
53
- * Sentry.captureEvent({
54
- * message: 'Manual',
55
- * stacktrace: [
56
- * // ...
57
- * ],
58
- * });
59
- * ```
60
- *
61
- * @see {@link BrowserOptions} for documentation on configuration options.
62
- */
63
- export declare function init(options?: BrowserOptions): void;
64
- /**
65
- * Present the user with a report dialog.
66
- *
67
- * @param options Everything is optional, we try to fetch all info need from the global scope.
68
- */
69
- export declare function showReportDialog(options?: ReportDialogOptions): void;
70
- /**
71
- * This is the getter for lastEventId.
72
- *
73
- * @returns The last event id of a captured event.
74
- */
75
- export declare function lastEventId(): string | undefined;
76
- /**
77
- * This function is here to be API compatible with the loader.
78
- * @hidden
79
- */
80
- export declare function forceLoad(): void;
81
- /**
82
- * This function is here to be API compatible with the loader.
83
- * @hidden
84
- */
85
- export declare function onLoad(callback: () => void): void;
86
- /**
87
- * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
88
- *
89
- * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
90
- * the client to wait until all events are sent before resolving the promise.
91
- * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
92
- * doesn't (or if there's no client defined).
93
- */
94
- export declare function flush(timeout?: number): PromiseLike<boolean>;
95
- /**
96
- * Call `close()` on the current client, if there is one. See {@link Client.close}.
97
- *
98
- * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
99
- * parameter will cause the client to wait until all events are sent before disabling itself.
100
- * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
101
- * doesn't (or if there's no client defined).
102
- */
103
- export declare function close(timeout?: number): PromiseLike<boolean>;
104
- /**
105
- * Wrap code within a try/catch block so the SDK is able to capture errors.
106
- *
107
- * @param fn A function to wrap.
108
- *
109
- * @returns The result of wrapped function call.
110
- */
111
- export declare function wrap(fn: (...args: any) => any): any;
112
- //# sourceMappingURL=sdk.d.ts.map
package/esm/sdk.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAI5F,OAAO,EAAiB,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAwB,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIxG,eAAO,MAAM,mBAAmB,uJAS/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI,CA2BvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAiBxE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAO5D;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAO5D;AAED;;;;;;GAMG;AAEH,wBAAgB,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,CAEnD"}
@@ -1,8 +0,0 @@
1
- import { StackLineParser } from '@sentry/types';
2
- export declare const chromeStackParser: StackLineParser;
3
- export declare const geckoStackParser: StackLineParser;
4
- export declare const winjsStackParser: StackLineParser;
5
- export declare const opera10StackParser: StackLineParser;
6
- export declare const opera11StackParser: StackLineParser;
7
- export declare const defaultStackParsers: StackLineParser[];
8
- //# sourceMappingURL=stack-parsers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stack-parsers.d.ts","sourceRoot":"","sources":["../../../src/stack-parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAqB,MAAM,eAAe,CAAC;AA8D/E,eAAO,MAAM,iBAAiB,EAAE,eAA2C,CAAC;AAoC5E,eAAO,MAAM,gBAAgB,EAAE,eAAyC,CAAC;AAazE,eAAO,MAAM,gBAAgB,EAAE,eAAyC,CAAC;AASzE,eAAO,MAAM,kBAAkB,EAAE,eAA6C,CAAC;AAU/E,eAAO,MAAM,kBAAkB,EAAE,eAA6C,CAAC;AAE/E,eAAO,MAAM,mBAAmB,mBAA0D,CAAC"}
@@ -1,65 +0,0 @@
1
- import { APIDetails } from '@sentry/core';
2
- import { Event, Outcome, Response as SentryResponse, SentryRequest, SentryRequestType, Session, Transport, TransportOptions } from '@sentry/types';
3
- import { PromiseBuffer, RateLimits } from '@sentry/utils';
4
- /** Base Transport class implementation */
5
- export declare abstract class BaseTransport implements Transport {
6
- options: TransportOptions;
7
- /**
8
- * @deprecated
9
- */
10
- url: string;
11
- /** Helper to get Sentry API endpoints. */
12
- protected readonly _api: APIDetails;
13
- /** A simple buffer holding all requests. */
14
- protected readonly _buffer: PromiseBuffer<SentryResponse>;
15
- /** Locks transport after receiving rate limits in a response */
16
- protected _rateLimits: RateLimits;
17
- protected _outcomes: {
18
- [key: string]: number;
19
- };
20
- constructor(options: TransportOptions);
21
- /**
22
- * @inheritDoc
23
- */
24
- sendEvent(event: Event): PromiseLike<SentryResponse>;
25
- /**
26
- * @inheritDoc
27
- */
28
- sendSession(session: Session): PromiseLike<SentryResponse>;
29
- /**
30
- * @inheritDoc
31
- */
32
- close(timeout?: number): PromiseLike<boolean>;
33
- /**
34
- * @inheritDoc
35
- */
36
- recordLostEvent(reason: Outcome, category: SentryRequestType): void;
37
- /**
38
- * Send outcomes as an envelope
39
- */
40
- protected _flushOutcomes(): void;
41
- /**
42
- * Handle Sentry repsonse for promise-based transports.
43
- */
44
- protected _handleResponse({ requestType, response, headers, resolve, reject, }: {
45
- requestType: SentryRequestType;
46
- response: Response | XMLHttpRequest;
47
- headers: Record<string, string | null>;
48
- resolve: (value?: SentryResponse | PromiseLike<SentryResponse> | null | undefined) => void;
49
- reject: (reason?: unknown) => void;
50
- }): void;
51
- /**
52
- * Gets the time that given category is disabled until for rate limiting
53
- *
54
- * @deprecated Please use `disabledUntil` from @sentry/utils
55
- */
56
- protected _disabledUntil(requestType: SentryRequestType): Date;
57
- /**
58
- * Checks if a category is rate limited
59
- *
60
- * @deprecated Please use `isRateLimited` from @sentry/utils
61
- */
62
- protected _isRateLimited(requestType: SentryRequestType): boolean;
63
- protected abstract _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike<SentryResponse>;
64
- }
65
- //# sourceMappingURL=base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/transports/base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAMX,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,EACL,OAAO,EACP,QAAQ,IAAI,cAAc,EAC1B,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EASL,aAAa,EACb,UAAU,EAGX,MAAM,eAAe,CAAC;AAYvB,0CAA0C;AAC1C,8BAAsB,aAAc,YAAW,SAAS;IAiB5B,OAAO,EAAE,gBAAgB;IAhBnD;;OAEG;IACI,GAAG,EAAE,MAAM,CAAC;IAEnB,0CAA0C;IAC1C,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAEpC,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAyB;IAElF,gEAAgE;IAChE,SAAS,CAAC,WAAW,EAAE,UAAU,CAAM;IAEvC,SAAS,CAAC,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;gBAE1B,OAAO,EAAE,gBAAgB;IAcnD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,cAAc,CAAC;IAI3D;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC;IAIjE;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;IAIpD;;OAEG;IACI,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAc1E;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,IAAI;IAoChC;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,EACxB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,GACP,EAAE;QACD,WAAW,EAAE,iBAAiB,CAAC;QAC/B,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;QAC3F,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;KACpC,GAAG,IAAI;IAmBR;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI;IAK9D;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,iBAAiB,GAAG,OAAO;IAKjE,SAAS,CAAC,QAAQ,CAAC,YAAY,CAC7B,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,KAAK,GAAG,OAAO,GAC/B,WAAW,CAAC,cAAc,CAAC;CAC/B"}