@grafana/faro-core 1.0.0-beta3 → 1.0.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 (367) hide show
  1. package/README.md +14 -12
  2. package/dist/bundle/faro-core.iife.js +1 -0
  3. package/dist/cjs/api/events/initialize.js +1 -1
  4. package/dist/cjs/api/events/initialize.js.map +1 -1
  5. package/dist/cjs/api/exceptions/initialize.js +1 -1
  6. package/dist/cjs/api/exceptions/initialize.js.map +1 -1
  7. package/dist/cjs/api/initialize.js +3 -3
  8. package/dist/cjs/api/initialize.js.map +1 -1
  9. package/dist/cjs/api/logs/initialize.js +1 -1
  10. package/dist/cjs/api/logs/initialize.js.map +1 -1
  11. package/dist/cjs/api/measurements/initialize.js +1 -1
  12. package/dist/cjs/api/measurements/initialize.js.map +1 -1
  13. package/dist/cjs/api/meta/initialize.js +14 -1
  14. package/dist/cjs/api/meta/initialize.js.map +1 -1
  15. package/dist/cjs/api/meta/types.js.map +1 -1
  16. package/dist/cjs/api/traces/initialize.js +1 -1
  17. package/dist/cjs/api/traces/initialize.js.map +1 -1
  18. package/dist/cjs/config/types.js.map +1 -1
  19. package/dist/cjs/{utils/extensions.js → extensions/baseExtension.js} +15 -17
  20. package/dist/cjs/extensions/baseExtension.js.map +1 -0
  21. package/dist/cjs/extensions/index.js +6 -0
  22. package/dist/cjs/extensions/index.js.map +1 -0
  23. package/dist/cjs/extensions/types.js +3 -0
  24. package/dist/cjs/extensions/types.js.map +1 -0
  25. package/dist/cjs/index.js +12 -11
  26. package/dist/cjs/index.js.map +1 -1
  27. package/dist/cjs/initialize.js +11 -21
  28. package/dist/cjs/initialize.js.map +1 -1
  29. package/dist/cjs/instrumentations/base.js +6 -3
  30. package/dist/cjs/instrumentations/base.js.map +1 -1
  31. package/dist/cjs/instrumentations/index.js +3 -1
  32. package/dist/cjs/instrumentations/index.js.map +1 -1
  33. package/dist/cjs/instrumentations/initialize.js +8 -2
  34. package/dist/cjs/instrumentations/initialize.js.map +1 -1
  35. package/dist/cjs/instrumentations/registerInitial.js +9 -0
  36. package/dist/cjs/instrumentations/registerInitial.js.map +1 -0
  37. package/dist/cjs/instrumentations/types.js.map +1 -1
  38. package/dist/cjs/internalLogger/const.js.map +1 -1
  39. package/dist/cjs/internalLogger/createInternalLogger.js.map +1 -1
  40. package/dist/cjs/internalLogger/index.js +2 -1
  41. package/dist/cjs/internalLogger/index.js.map +1 -1
  42. package/dist/cjs/internalLogger/initialize.js.map +1 -1
  43. package/dist/cjs/metas/index.js +3 -1
  44. package/dist/cjs/metas/index.js.map +1 -1
  45. package/dist/cjs/metas/initialize.js +4 -30
  46. package/dist/cjs/metas/initialize.js.map +1 -1
  47. package/dist/cjs/metas/registerInitial.js +42 -0
  48. package/dist/cjs/metas/registerInitial.js.map +1 -0
  49. package/dist/cjs/metas/types.js.map +1 -1
  50. package/dist/cjs/sdk/faroGlobalObject.js.map +1 -1
  51. package/dist/cjs/sdk/index.js +3 -3
  52. package/dist/cjs/sdk/index.js.map +1 -1
  53. package/dist/cjs/sdk/internalFaroGlobalObject.js.map +1 -1
  54. package/dist/cjs/sdk/{register.js → registerFaro.js} +13 -3
  55. package/dist/cjs/sdk/registerFaro.js.map +1 -0
  56. package/dist/cjs/semantic.js +1 -0
  57. package/dist/cjs/semantic.js.map +1 -1
  58. package/dist/cjs/testUtils/mockConfig.js.map +1 -1
  59. package/dist/cjs/transports/base.js +2 -2
  60. package/dist/cjs/transports/base.js.map +1 -1
  61. package/dist/cjs/transports/index.js +3 -1
  62. package/dist/cjs/transports/index.js.map +1 -1
  63. package/dist/cjs/transports/initialize.js +5 -4
  64. package/dist/cjs/transports/initialize.js.map +1 -1
  65. package/dist/cjs/transports/registerInitial.js +11 -0
  66. package/dist/cjs/transports/registerInitial.js.map +1 -0
  67. package/dist/cjs/transports/types.js.map +1 -1
  68. package/dist/cjs/unpatchedConsole/initialize.js.map +1 -1
  69. package/dist/cjs/utils/deepEqual.js +58 -5
  70. package/dist/cjs/utils/deepEqual.js.map +1 -1
  71. package/dist/cjs/utils/index.js +1 -3
  72. package/dist/cjs/utils/index.js.map +1 -1
  73. package/dist/cjs/utils/shortId.js.map +1 -1
  74. package/dist/cjs/version.js +2 -2
  75. package/dist/cjs/version.js.map +1 -1
  76. package/dist/esm/api/events/initialize.js +1 -1
  77. package/dist/esm/api/events/initialize.js.map +1 -1
  78. package/dist/esm/api/exceptions/initialize.js +1 -1
  79. package/dist/esm/api/exceptions/initialize.js.map +1 -1
  80. package/dist/esm/api/initialize.js +3 -3
  81. package/dist/esm/api/initialize.js.map +1 -1
  82. package/dist/esm/api/logs/initialize.js +1 -1
  83. package/dist/esm/api/logs/initialize.js.map +1 -1
  84. package/dist/esm/api/measurements/initialize.js +1 -1
  85. package/dist/esm/api/measurements/initialize.js.map +1 -1
  86. package/dist/esm/api/meta/initialize.js +14 -1
  87. package/dist/esm/api/meta/initialize.js.map +1 -1
  88. package/dist/esm/api/meta/types.js.map +1 -1
  89. package/dist/esm/api/traces/initialize.js +1 -1
  90. package/dist/esm/api/traces/initialize.js.map +1 -1
  91. package/dist/esm/config/types.js.map +1 -1
  92. package/dist/esm/extensions/baseExtension.js +23 -0
  93. package/dist/esm/extensions/baseExtension.js.map +1 -0
  94. package/dist/esm/extensions/index.js +2 -0
  95. package/dist/esm/extensions/index.js.map +1 -0
  96. package/dist/esm/extensions/types.js +2 -0
  97. package/dist/esm/extensions/types.js.map +1 -0
  98. package/dist/esm/index.js +4 -3
  99. package/dist/esm/index.js.map +1 -1
  100. package/dist/esm/initialize.js +14 -23
  101. package/dist/esm/initialize.js.map +1 -1
  102. package/dist/esm/instrumentations/base.js +6 -1
  103. package/dist/esm/instrumentations/base.js.map +1 -1
  104. package/dist/esm/instrumentations/index.js +1 -0
  105. package/dist/esm/instrumentations/index.js.map +1 -1
  106. package/dist/esm/instrumentations/initialize.js +8 -2
  107. package/dist/esm/instrumentations/initialize.js.map +1 -1
  108. package/dist/esm/instrumentations/registerInitial.js +4 -0
  109. package/dist/esm/instrumentations/registerInitial.js.map +1 -0
  110. package/dist/esm/instrumentations/types.js.map +1 -1
  111. package/dist/esm/internalLogger/const.js.map +1 -1
  112. package/dist/esm/internalLogger/createInternalLogger.js.map +1 -1
  113. package/dist/esm/internalLogger/index.js +1 -1
  114. package/dist/esm/internalLogger/index.js.map +1 -1
  115. package/dist/esm/internalLogger/initialize.js.map +1 -1
  116. package/dist/esm/metas/index.js +1 -0
  117. package/dist/esm/metas/index.js.map +1 -1
  118. package/dist/esm/metas/initialize.js +4 -18
  119. package/dist/esm/metas/initialize.js.map +1 -1
  120. package/dist/esm/metas/registerInitial.js +25 -0
  121. package/dist/esm/metas/registerInitial.js.map +1 -0
  122. package/dist/esm/metas/types.js.map +1 -1
  123. package/dist/esm/sdk/faroGlobalObject.js.map +1 -1
  124. package/dist/esm/sdk/index.js +1 -1
  125. package/dist/esm/sdk/index.js.map +1 -1
  126. package/dist/esm/sdk/internalFaroGlobalObject.js.map +1 -1
  127. package/dist/esm/sdk/registerFaro.js +21 -0
  128. package/dist/esm/sdk/registerFaro.js.map +1 -0
  129. package/dist/esm/semantic.js +1 -0
  130. package/dist/esm/semantic.js.map +1 -1
  131. package/dist/esm/testUtils/mockConfig.js.map +1 -1
  132. package/dist/esm/transports/base.js +1 -1
  133. package/dist/esm/transports/base.js.map +1 -1
  134. package/dist/esm/transports/index.js +1 -0
  135. package/dist/esm/transports/index.js.map +1 -1
  136. package/dist/esm/transports/initialize.js +5 -4
  137. package/dist/esm/transports/initialize.js.map +1 -1
  138. package/dist/esm/transports/registerInitial.js +6 -0
  139. package/dist/esm/transports/registerInitial.js.map +1 -0
  140. package/dist/esm/transports/types.js.map +1 -1
  141. package/dist/esm/unpatchedConsole/initialize.js.map +1 -1
  142. package/dist/esm/utils/deepEqual.js +55 -2
  143. package/dist/esm/utils/deepEqual.js.map +1 -1
  144. package/dist/esm/utils/index.js +0 -1
  145. package/dist/esm/utils/index.js.map +1 -1
  146. package/dist/esm/utils/shortId.js.map +1 -1
  147. package/dist/esm/version.js +2 -2
  148. package/dist/esm/version.js.map +1 -1
  149. package/dist/{cjs → types}/api/events/index.d.ts +0 -0
  150. package/dist/{cjs → types}/api/events/initialize.d.ts +2 -1
  151. package/dist/{cjs → types}/api/events/types.d.ts +0 -0
  152. package/dist/{cjs → types}/api/exceptions/const.d.ts +0 -0
  153. package/dist/{cjs → types}/api/exceptions/index.d.ts +0 -0
  154. package/dist/{cjs → types}/api/exceptions/initialize.d.ts +2 -1
  155. package/dist/{cjs → types}/api/exceptions/types.d.ts +0 -0
  156. package/dist/{cjs → types}/api/index.d.ts +0 -0
  157. package/dist/types/api/initialize.d.ts +7 -0
  158. package/dist/{cjs → types}/api/logs/index.d.ts +0 -0
  159. package/dist/{esm → types}/api/logs/initialize.d.ts +2 -1
  160. package/dist/{cjs → types}/api/logs/types.d.ts +0 -0
  161. package/dist/{cjs → types}/api/measurements/index.d.ts +0 -0
  162. package/dist/{esm → types}/api/measurements/initialize.d.ts +2 -1
  163. package/dist/{cjs → types}/api/measurements/types.d.ts +0 -0
  164. package/dist/{cjs → types}/api/meta/index.d.ts +0 -0
  165. package/dist/types/api/meta/initialize.d.ts +7 -0
  166. package/dist/types/api/meta/types.d.ts +10 -0
  167. package/dist/{cjs → types}/api/traces/index.d.ts +0 -0
  168. package/dist/types/api/traces/initialize.d.ts +7 -0
  169. package/dist/{cjs → types}/api/traces/types.d.ts +0 -0
  170. package/dist/{cjs → types}/api/types.d.ts +0 -0
  171. package/dist/{cjs → types}/config/const.d.ts +0 -0
  172. package/dist/{cjs → types}/config/index.d.ts +0 -0
  173. package/dist/{esm → types}/config/types.d.ts +2 -1
  174. package/dist/types/extensions/baseExtension.d.ts +15 -0
  175. package/dist/types/extensions/index.d.ts +2 -0
  176. package/dist/types/extensions/types.d.ts +16 -0
  177. package/dist/{cjs → types}/globalObject/globalObject.d.ts +0 -0
  178. package/dist/{cjs → types}/globalObject/index.d.ts +0 -0
  179. package/dist/{cjs → types}/index.d.ts +7 -5
  180. package/dist/{cjs → types}/initialize.d.ts +0 -0
  181. package/dist/{cjs → types}/instrumentations/base.d.ts +5 -1
  182. package/dist/{cjs → types}/instrumentations/index.d.ts +1 -0
  183. package/dist/types/instrumentations/initialize.d.ts +8 -0
  184. package/dist/types/instrumentations/registerInitial.d.ts +2 -0
  185. package/dist/{cjs → types}/instrumentations/types.d.ts +5 -1
  186. package/dist/{cjs → types}/internalLogger/const.d.ts +0 -0
  187. package/dist/{cjs → types}/internalLogger/createInternalLogger.d.ts +0 -0
  188. package/dist/{cjs → types}/internalLogger/index.d.ts +1 -1
  189. package/dist/{cjs → types}/internalLogger/initialize.d.ts +0 -0
  190. package/dist/{cjs → types}/internalLogger/types.d.ts +0 -0
  191. package/dist/{cjs → types}/metas/index.d.ts +2 -1
  192. package/dist/types/metas/initialize.d.ts +5 -0
  193. package/dist/types/metas/registerInitial.d.ts +2 -0
  194. package/dist/{cjs → types}/metas/types.d.ts +4 -1
  195. package/dist/{cjs → types}/sdk/const.d.ts +0 -0
  196. package/dist/{cjs → types}/sdk/faroGlobalObject.d.ts +0 -0
  197. package/dist/{cjs → types}/sdk/index.d.ts +1 -1
  198. package/dist/{cjs → types}/sdk/internalFaroGlobalObject.d.ts +0 -0
  199. package/dist/{esm/sdk/types.d.ts → types/sdk/registerFaro.d.ts} +3 -11
  200. package/dist/{cjs → types}/sdk/types.d.ts +0 -0
  201. package/dist/{cjs → types}/semantic.d.ts +1 -0
  202. package/dist/{cjs → types}/testUtils/index.d.ts +0 -0
  203. package/dist/{cjs → types}/testUtils/mockConfig.d.ts +0 -0
  204. package/dist/{cjs → types}/testUtils/mockInternalLogger.d.ts +0 -0
  205. package/dist/{cjs → types}/testUtils/mockStacktraceParser.d.ts +0 -0
  206. package/dist/{cjs → types}/testUtils/mockTransport.d.ts +1 -1
  207. package/dist/{cjs → types}/testUtils/testPromise.d.ts +0 -0
  208. package/dist/{cjs → types}/transports/base.d.ts +1 -1
  209. package/dist/{cjs → types}/transports/const.d.ts +0 -0
  210. package/dist/{cjs → types}/transports/index.d.ts +1 -0
  211. package/dist/{cjs → types}/transports/initialize.d.ts +3 -1
  212. package/dist/types/transports/registerInitial.d.ts +2 -0
  213. package/dist/{esm → types}/transports/types.d.ts +1 -1
  214. package/dist/{cjs → types}/transports/utils.d.ts +0 -0
  215. package/dist/{cjs → types}/unpatchedConsole/const.d.ts +0 -0
  216. package/dist/{cjs → types}/unpatchedConsole/index.d.ts +0 -0
  217. package/dist/{cjs → types}/unpatchedConsole/initialize.d.ts +0 -0
  218. package/dist/{cjs → types}/unpatchedConsole/types.d.ts +0 -0
  219. package/dist/{cjs → types}/utils/baseObject.d.ts +0 -0
  220. package/dist/types/utils/deepEqual.d.ts +1 -0
  221. package/dist/{cjs → types}/utils/getCurrentTimestamp.d.ts +0 -0
  222. package/dist/{cjs → types}/utils/index.d.ts +0 -2
  223. package/dist/{cjs → types}/utils/is.d.ts +0 -0
  224. package/dist/{cjs → types}/utils/logLevels.d.ts +0 -0
  225. package/dist/{cjs → types}/utils/noop.d.ts +0 -0
  226. package/dist/{cjs → types}/utils/promiseBuffer.d.ts +0 -0
  227. package/dist/{cjs → types}/utils/shortId.d.ts +0 -0
  228. package/dist/types/version.d.ts +1 -0
  229. package/package.json +21 -15
  230. package/dist/cjs/api/events/initialize.test.d.ts +0 -1
  231. package/dist/cjs/api/events/initialize.test.js +0 -92
  232. package/dist/cjs/api/events/initialize.test.js.map +0 -1
  233. package/dist/cjs/api/exceptions/initialize.test.d.ts +0 -1
  234. package/dist/cjs/api/exceptions/initialize.test.js +0 -138
  235. package/dist/cjs/api/exceptions/initialize.test.js.map +0 -1
  236. package/dist/cjs/api/initialize.d.ts +0 -6
  237. package/dist/cjs/api/logs/initialize.d.ts +0 -7
  238. package/dist/cjs/api/logs/initialize.test.d.ts +0 -1
  239. package/dist/cjs/api/logs/initialize.test.js +0 -88
  240. package/dist/cjs/api/logs/initialize.test.js.map +0 -1
  241. package/dist/cjs/api/measurements/initialize.d.ts +0 -7
  242. package/dist/cjs/api/measurements/initialize.test.d.ts +0 -1
  243. package/dist/cjs/api/measurements/initialize.test.js +0 -123
  244. package/dist/cjs/api/measurements/initialize.test.js.map +0 -1
  245. package/dist/cjs/api/meta/initialize.d.ts +0 -6
  246. package/dist/cjs/api/meta/types.d.ts +0 -8
  247. package/dist/cjs/api/traces/initialize.d.ts +0 -6
  248. package/dist/cjs/config/types.d.ts +0 -26
  249. package/dist/cjs/faro.test.d.ts +0 -1
  250. package/dist/cjs/faro.test.js +0 -42
  251. package/dist/cjs/faro.test.js.map +0 -1
  252. package/dist/cjs/instrumentations/initialize.d.ts +0 -4
  253. package/dist/cjs/metas/initialize.d.ts +0 -4
  254. package/dist/cjs/metas/initialize.test.d.ts +0 -1
  255. package/dist/cjs/metas/initialize.test.js +0 -21
  256. package/dist/cjs/metas/initialize.test.js.map +0 -1
  257. package/dist/cjs/sdk/register.d.ts +0 -4
  258. package/dist/cjs/sdk/register.js.map +0 -1
  259. package/dist/cjs/transports/transports.test.d.ts +0 -1
  260. package/dist/cjs/transports/transports.test.js +0 -141
  261. package/dist/cjs/transports/transports.test.js.map +0 -1
  262. package/dist/cjs/transports/types.d.ts +0 -37
  263. package/dist/cjs/utils/deepEqual.d.ts +0 -2
  264. package/dist/cjs/utils/extensions.d.ts +0 -19
  265. package/dist/cjs/utils/extensions.js.map +0 -1
  266. package/dist/cjs/utils/promiseBuffer.test.d.ts +0 -1
  267. package/dist/cjs/utils/promiseBuffer.test.js +0 -146
  268. package/dist/cjs/utils/promiseBuffer.test.js.map +0 -1
  269. package/dist/cjs/version.d.ts +0 -1
  270. package/dist/esm/api/events/index.d.ts +0 -2
  271. package/dist/esm/api/events/initialize.d.ts +0 -7
  272. package/dist/esm/api/events/initialize.test.d.ts +0 -1
  273. package/dist/esm/api/events/initialize.test.js +0 -87
  274. package/dist/esm/api/events/initialize.test.js.map +0 -1
  275. package/dist/esm/api/events/types.d.ts +0 -15
  276. package/dist/esm/api/exceptions/const.d.ts +0 -1
  277. package/dist/esm/api/exceptions/index.d.ts +0 -3
  278. package/dist/esm/api/exceptions/initialize.d.ts +0 -7
  279. package/dist/esm/api/exceptions/initialize.test.d.ts +0 -1
  280. package/dist/esm/api/exceptions/initialize.test.js +0 -133
  281. package/dist/esm/api/exceptions/initialize.test.js.map +0 -1
  282. package/dist/esm/api/exceptions/types.d.ts +0 -32
  283. package/dist/esm/api/index.d.ts +0 -9
  284. package/dist/esm/api/initialize.d.ts +0 -6
  285. package/dist/esm/api/logs/index.d.ts +0 -2
  286. package/dist/esm/api/logs/initialize.test.d.ts +0 -1
  287. package/dist/esm/api/logs/initialize.test.js +0 -83
  288. package/dist/esm/api/logs/initialize.test.js.map +0 -1
  289. package/dist/esm/api/logs/types.d.ts +0 -18
  290. package/dist/esm/api/measurements/index.d.ts +0 -2
  291. package/dist/esm/api/measurements/initialize.test.d.ts +0 -1
  292. package/dist/esm/api/measurements/initialize.test.js +0 -107
  293. package/dist/esm/api/measurements/initialize.test.js.map +0 -1
  294. package/dist/esm/api/measurements/types.d.ts +0 -16
  295. package/dist/esm/api/meta/index.d.ts +0 -2
  296. package/dist/esm/api/meta/initialize.d.ts +0 -6
  297. package/dist/esm/api/meta/types.d.ts +0 -8
  298. package/dist/esm/api/traces/index.d.ts +0 -2
  299. package/dist/esm/api/traces/initialize.d.ts +0 -6
  300. package/dist/esm/api/traces/types.d.ts +0 -20
  301. package/dist/esm/api/types.d.ts +0 -8
  302. package/dist/esm/config/const.d.ts +0 -1
  303. package/dist/esm/config/index.d.ts +0 -2
  304. package/dist/esm/faro.test.d.ts +0 -1
  305. package/dist/esm/faro.test.js +0 -40
  306. package/dist/esm/faro.test.js.map +0 -1
  307. package/dist/esm/globalObject/globalObject.d.ts +0 -7
  308. package/dist/esm/globalObject/index.d.ts +0 -2
  309. package/dist/esm/index.d.ts +0 -22
  310. package/dist/esm/initialize.d.ts +0 -3
  311. package/dist/esm/instrumentations/base.d.ts +0 -5
  312. package/dist/esm/instrumentations/index.d.ts +0 -3
  313. package/dist/esm/instrumentations/initialize.d.ts +0 -4
  314. package/dist/esm/instrumentations/types.d.ts +0 -10
  315. package/dist/esm/internalLogger/const.d.ts +0 -11
  316. package/dist/esm/internalLogger/createInternalLogger.d.ts +0 -4
  317. package/dist/esm/internalLogger/index.d.ts +0 -4
  318. package/dist/esm/internalLogger/initialize.d.ts +0 -5
  319. package/dist/esm/internalLogger/types.d.ts +0 -7
  320. package/dist/esm/metas/index.d.ts +0 -2
  321. package/dist/esm/metas/initialize.d.ts +0 -4
  322. package/dist/esm/metas/initialize.test.d.ts +0 -1
  323. package/dist/esm/metas/initialize.test.js +0 -19
  324. package/dist/esm/metas/initialize.test.js.map +0 -1
  325. package/dist/esm/metas/types.d.ts +0 -56
  326. package/dist/esm/sdk/const.d.ts +0 -1
  327. package/dist/esm/sdk/faroGlobalObject.d.ts +0 -2
  328. package/dist/esm/sdk/index.d.ts +0 -4
  329. package/dist/esm/sdk/internalFaroGlobalObject.d.ts +0 -4
  330. package/dist/esm/sdk/register.d.ts +0 -4
  331. package/dist/esm/sdk/register.js +0 -11
  332. package/dist/esm/sdk/register.js.map +0 -1
  333. package/dist/esm/semantic.d.ts +0 -7
  334. package/dist/esm/testUtils/index.d.ts +0 -6
  335. package/dist/esm/testUtils/mockConfig.d.ts +0 -2
  336. package/dist/esm/testUtils/mockInternalLogger.d.ts +0 -2
  337. package/dist/esm/testUtils/mockStacktraceParser.d.ts +0 -2
  338. package/dist/esm/testUtils/mockTransport.d.ts +0 -12
  339. package/dist/esm/testUtils/testPromise.d.ts +0 -7
  340. package/dist/esm/transports/base.d.ts +0 -6
  341. package/dist/esm/transports/const.d.ts +0 -8
  342. package/dist/esm/transports/index.d.ts +0 -5
  343. package/dist/esm/transports/initialize.d.ts +0 -6
  344. package/dist/esm/transports/transports.test.d.ts +0 -1
  345. package/dist/esm/transports/transports.test.js +0 -110
  346. package/dist/esm/transports/transports.test.js.map +0 -1
  347. package/dist/esm/transports/utils.d.ts +0 -2
  348. package/dist/esm/unpatchedConsole/const.d.ts +0 -2
  349. package/dist/esm/unpatchedConsole/index.d.ts +0 -3
  350. package/dist/esm/unpatchedConsole/initialize.d.ts +0 -4
  351. package/dist/esm/unpatchedConsole/types.d.ts +0 -1
  352. package/dist/esm/utils/baseObject.d.ts +0 -6
  353. package/dist/esm/utils/deepEqual.d.ts +0 -2
  354. package/dist/esm/utils/extensions.d.ts +0 -19
  355. package/dist/esm/utils/extensions.js +0 -23
  356. package/dist/esm/utils/extensions.js.map +0 -1
  357. package/dist/esm/utils/getCurrentTimestamp.d.ts +0 -1
  358. package/dist/esm/utils/index.d.ts +0 -12
  359. package/dist/esm/utils/is.d.ts +0 -31
  360. package/dist/esm/utils/logLevels.d.ts +0 -10
  361. package/dist/esm/utils/noop.d.ts +0 -1
  362. package/dist/esm/utils/promiseBuffer.d.ts +0 -14
  363. package/dist/esm/utils/promiseBuffer.test.d.ts +0 -1
  364. package/dist/esm/utils/promiseBuffer.test.js +0 -87
  365. package/dist/esm/utils/promiseBuffer.test.js.map +0 -1
  366. package/dist/esm/utils/shortId.d.ts +0 -1
  367. package/dist/esm/version.d.ts +0 -1
@@ -1,3 +1,56 @@
1
- import deepEqual from 'fast-deep-equal';
2
- export { deepEqual };
1
+ import { isArray, isObject, isTypeof } from './is';
2
+ // This function was inspired by fast-deep-equal
3
+ // fast-deep-equal has issues with Rollup and also it checks for some edge cases that we don't need
4
+ export function deepEqual(a, b) {
5
+ if (a === b) {
6
+ return true;
7
+ }
8
+ // Using isTypeOf instead of isNumber as isNumber also checks against NaN
9
+ if (isTypeof(a, 'number') && isNaN(a)) {
10
+ return isTypeof(b, 'number') && isNaN(b);
11
+ }
12
+ const aIsArray = isArray(a);
13
+ const bIsArray = isArray(b);
14
+ if (aIsArray !== bIsArray) {
15
+ return false;
16
+ }
17
+ if (aIsArray && bIsArray) {
18
+ const length = a.length;
19
+ if (length !== b.length) {
20
+ return false;
21
+ }
22
+ for (let idx = length; idx-- !== 0;) {
23
+ if (!deepEqual(a[idx], b[idx])) {
24
+ return false;
25
+ }
26
+ }
27
+ return true;
28
+ }
29
+ const aIsObject = isObject(a);
30
+ const bIsObject = isObject(b);
31
+ if (aIsObject !== bIsObject) {
32
+ return false;
33
+ }
34
+ if (a && b && aIsObject && bIsObject) {
35
+ const aKeys = Object.keys(a);
36
+ const bKeys = Object.keys(b);
37
+ const aLength = aKeys.length;
38
+ const bLength = bKeys.length;
39
+ if (aLength !== bLength) {
40
+ return false;
41
+ }
42
+ for (let aKey of aKeys) {
43
+ if (!bKeys.includes(aKey)) {
44
+ return false;
45
+ }
46
+ }
47
+ for (let aKey of aKeys) {
48
+ if (!deepEqual(a[aKey], b[aKey])) {
49
+ return false;
50
+ }
51
+ }
52
+ return true;
53
+ }
54
+ return false;
55
+ }
3
56
  //# sourceMappingURL=deepEqual.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deepEqual.js","sourceRoot":"","sources":["../../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["import deepEqual from 'fast-deep-equal';\n\nexport { deepEqual };\n"]}
1
+ {"version":3,"file":"deepEqual.js","sourceRoot":"","sources":["../../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEnD,gDAAgD;AAChD,mGAAmG;AAEnG,MAAM,UAAU,SAAS,CAAC,CAAM,EAAE,CAAM;IACtC,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,yEAAyE;IACzE,IAAI,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAW,CAAC,EAAE;QAC/C,OAAO,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAW,CAAC,CAAC;KACpD;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE5B,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,QAAQ,IAAI,QAAQ,EAAE;QACxB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QAExB,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QAED,KAAK,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,GAAI;YACpC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC9B,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE9B,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IAED,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,IAAI,SAAS,EAAE;QACpC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAA0B,CAAC;QACtD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC;QAE7B,IAAI,OAAO,KAAK,OAAO,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QAED,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;YACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACzB,OAAO,KAAK,CAAC;aACd;SACF;QAED,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;YACtB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;gBAChC,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { isArray, isObject, isTypeof } from './is';\n\n// This function was inspired by fast-deep-equal\n// fast-deep-equal has issues with Rollup and also it checks for some edge cases that we don't need\n\nexport function deepEqual(a: any, b: any): boolean {\n if (a === b) {\n return true;\n }\n\n // Using isTypeOf instead of isNumber as isNumber also checks against NaN\n if (isTypeof(a, 'number') && isNaN(a as number)) {\n return isTypeof(b, 'number') && isNaN(b as number);\n }\n\n const aIsArray = isArray(a);\n const bIsArray = isArray(b);\n\n if (aIsArray !== bIsArray) {\n return false;\n }\n\n if (aIsArray && bIsArray) {\n const length = a.length;\n\n if (length !== b.length) {\n return false;\n }\n\n for (let idx = length; idx-- !== 0; ) {\n if (!deepEqual(a[idx], b[idx])) {\n return false;\n }\n }\n\n return true;\n }\n\n const aIsObject = isObject(a);\n const bIsObject = isObject(b);\n\n if (aIsObject !== bIsObject) {\n return false;\n }\n\n if (a && b && aIsObject && bIsObject) {\n const aKeys = Object.keys(a) as Array<keyof typeof a>;\n const bKeys = Object.keys(b);\n const aLength = aKeys.length;\n const bLength = bKeys.length;\n\n if (aLength !== bLength) {\n return false;\n }\n\n for (let aKey of aKeys) {\n if (!bKeys.includes(aKey)) {\n return false;\n }\n }\n\n for (let aKey of aKeys) {\n if (!deepEqual(a[aKey], b[aKey])) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n}\n"]}
@@ -1,4 +1,3 @@
1
- export { BaseExtension } from './extensions';
2
1
  export { deepEqual } from './deepEqual';
3
2
  export { getCurrentTimestamp } from './getCurrentTimestamp';
4
3
  export { isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, } from './is';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,cAAc,EACd,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,YAAY,EACZ,KAAK,EACL,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,GACZ,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { BaseExtension } from './extensions';\nexport type { Extension } from './extensions';\n\nexport type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue } from './baseObject';\n\nexport { deepEqual } from './deepEqual';\n\nexport { getCurrentTimestamp } from './getCurrentTimestamp';\n\nexport {\n isArray,\n isBoolean,\n isDomError,\n isDomException,\n isElement,\n isElementDefined,\n isError,\n isErrorDefined,\n isErrorEvent,\n isEvent,\n isEventDefined,\n isFunction,\n isInstanceOf,\n isInt,\n isMap,\n isMapDefined,\n isNull,\n isNumber,\n isObject,\n isPrimitive,\n isRegExp,\n isString,\n isSymbol,\n isSyntheticEvent,\n isThenable,\n isToString,\n isTypeof,\n isUndefined,\n} from './is';\nexport type { IsFnHelper } from './is';\n\nexport { allLogLevels, defaultLogLevel, LogLevel } from './logLevels';\n\nexport { noop } from './noop';\n\nexport { createPromiseBuffer } from './promiseBuffer';\nexport type { BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer } from './promiseBuffer';\n\nexport { genShortID } from './shortId';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,cAAc,EACd,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,YAAY,EACZ,KAAK,EACL,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,GACZ,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue } from './baseObject';\n\nexport { deepEqual } from './deepEqual';\n\nexport { getCurrentTimestamp } from './getCurrentTimestamp';\n\nexport {\n isArray,\n isBoolean,\n isDomError,\n isDomException,\n isElement,\n isElementDefined,\n isError,\n isErrorDefined,\n isErrorEvent,\n isEvent,\n isEventDefined,\n isFunction,\n isInstanceOf,\n isInt,\n isMap,\n isMapDefined,\n isNull,\n isNumber,\n isObject,\n isPrimitive,\n isRegExp,\n isString,\n isSymbol,\n isSyntheticEvent,\n isThenable,\n isToString,\n isTypeof,\n isUndefined,\n} from './is';\nexport type { IsFnHelper } from './is';\n\nexport { allLogLevels, defaultLogLevel, LogLevel } from './logLevels';\n\nexport { noop } from './noop';\n\nexport { createPromiseBuffer } from './promiseBuffer';\nexport type { BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer } from './promiseBuffer';\n\nexport { genShortID } from './shortId';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"shortId.js","sourceRoot":"","sources":["../../../src/utils/shortId.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AAE/E,MAAM,UAAU,UAAU,CAAC,MAAM,GAAG,EAAE;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC7B,GAAG,CAAC,GAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAE,CAAC;SACzE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC","sourcesContent":["const alphabet = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789';\n\nexport function genShortID(length = 10): string {\n return Array.from(Array(length))\n .map((): string => alphabet[Math.floor(Math.random() * alphabet.length)]!)\n .join('');\n}\n"]}
1
+ {"version":3,"file":"shortId.js","sourceRoot":"","sources":["../../../src/utils/shortId.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AAE/E,MAAM,UAAU,UAAU,CAAC,MAAM,GAAG,EAAE;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC7B,GAAG,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAE,CAAC;SACjE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC","sourcesContent":["const alphabet = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789';\n\nexport function genShortID(length = 10): string {\n return Array.from(Array(length))\n .map(() => alphabet[Math.floor(Math.random() * alphabet.length)]!)\n .join('');\n}\n"]}
@@ -1,3 +1,3 @@
1
- // auto-generated by bin/gen-version.js
2
- export const VERSION = '1.0.0-beta3';
1
+ // auto-generated by bin/genVersion.ts
2
+ export const VERSION = '1.0.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC","sourcesContent":["// auto-generated by bin/gen-version.js\nexport const VERSION = '1.0.0-beta3';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.0.0';\n"]}
File without changes
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
4
  import { Transports } from '../../transports';
5
+ import type { UnpatchedConsole } from '../../unpatchedConsole';
5
6
  import type { TracesAPI } from '../traces';
6
7
  import type { EventsAPI } from './types';
7
- export declare function initializeEventsAPI(internalLogger: InternalLogger, config: Config, transports: Transports, metas: Metas, tracesApi: TracesAPI): EventsAPI;
8
+ export declare function initializeEventsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): EventsAPI;
File without changes
File without changes
File without changes
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
4
  import type { Transports } from '../../transports';
5
+ import type { UnpatchedConsole } from '../../unpatchedConsole';
5
6
  import type { TracesAPI } from '../traces';
6
7
  import type { ExceptionsAPI } from './types';
7
- export declare function initializeExceptionsAPI(internalLogger: InternalLogger, config: Config, transports: Transports, metas: Metas, tracesApi: TracesAPI): ExceptionsAPI;
8
+ export declare function initializeExceptionsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): ExceptionsAPI;
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import type { Config } from '../config';
2
+ import type { InternalLogger } from '../internalLogger';
3
+ import type { Metas } from '../metas';
4
+ import type { Transports } from '../transports';
5
+ import type { UnpatchedConsole } from '../unpatchedConsole';
6
+ import type { API } from './types';
7
+ export declare function initializeAPI(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports): API;
File without changes
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
4
  import type { Transports } from '../../transports';
5
+ import type { UnpatchedConsole } from '../../unpatchedConsole';
5
6
  import type { TracesAPI } from '../traces';
6
7
  import type { LogsAPI } from './types';
7
- export declare function initializeLogsAPI(internalLogger: InternalLogger, config: Config, transports: Transports, metas: Metas, tracesApi: TracesAPI): LogsAPI;
8
+ export declare function initializeLogsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): LogsAPI;
File without changes
File without changes
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
4
  import type { Transports } from '../../transports';
5
+ import type { UnpatchedConsole } from '../../unpatchedConsole';
5
6
  import type { TracesAPI } from '../traces';
6
7
  import type { MeasurementsAPI } from './types';
7
- export declare function initializeMeasurementsAPI(internalLogger: InternalLogger, config: Config, transports: Transports, metas: Metas, tracesApi: TracesAPI): MeasurementsAPI;
8
+ export declare function initializeMeasurementsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): MeasurementsAPI;
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import type { Config } from '../../config';
2
+ import type { InternalLogger } from '../../internalLogger';
3
+ import type { Metas } from '../../metas';
4
+ import type { Transports } from '../../transports';
5
+ import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { MetaAPI } from './types';
7
+ export declare function initializeMetaAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, _transports: Transports): MetaAPI;
@@ -0,0 +1,10 @@
1
+ import type { MetaSession, MetaUser, MetaView } from '../../metas';
2
+ export interface MetaAPI {
3
+ setUser: (user?: MetaUser | undefined) => void;
4
+ resetUser: () => void;
5
+ setSession: (session?: MetaSession | undefined) => void;
6
+ resetSession: () => void;
7
+ getSession: () => MetaSession | undefined;
8
+ setView: (view?: MetaView | undefined) => void;
9
+ getView: () => MetaView | undefined;
10
+ }
File without changes
@@ -0,0 +1,7 @@
1
+ import type { Config } from '../../config';
2
+ import type { InternalLogger } from '../../internalLogger';
3
+ import type { Metas } from '../../metas';
4
+ import { Transports } from '../../transports';
5
+ import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { TracesAPI } from './types';
7
+ export declare function initializeTracesAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, transports: Transports): TracesAPI;
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  import type { APIEvent, StacktraceParser } from '../api';
2
2
  import type { Instrumentation } from '../instrumentations';
3
3
  import type { InternalLoggerLevel } from '../internalLogger';
4
- import type { MetaApp, MetaItem, MetaSession, MetaUser } from '../metas';
4
+ import type { MetaApp, MetaItem, MetaSession, MetaUser, MetaView } from '../metas';
5
5
  import type { BeforeSendHook, Transport } from '../transports';
6
6
  import type { UnpatchedConsole } from '../unpatchedConsole';
7
7
  export interface Config<P = APIEvent> {
@@ -21,6 +21,7 @@ export interface Config<P = APIEvent> {
21
21
  ignoreErrors?: Patterns;
22
22
  session?: MetaSession;
23
23
  user?: MetaUser;
24
+ view?: MetaView;
24
25
  eventDomain?: string;
25
26
  }
26
27
  export type Patterns = Array<string | RegExp>;
@@ -0,0 +1,15 @@
1
+ import type { Config } from '../config';
2
+ import type { Metas } from '../metas';
3
+ import type { Extension } from './types';
4
+ export declare abstract class BaseExtension implements Extension {
5
+ abstract readonly name: string;
6
+ abstract readonly version: string;
7
+ unpatchedConsole: Console;
8
+ internalLogger: import("../internalLogger").InternalLogger;
9
+ config: Config<import("..").APIEvent>;
10
+ metas: Metas;
11
+ logDebug(...args: unknown[]): void;
12
+ logInfo(...args: unknown[]): void;
13
+ logWarn(...args: unknown[]): void;
14
+ logError(...args: unknown[]): void;
15
+ }
@@ -0,0 +1,2 @@
1
+ export { BaseExtension } from './baseExtension';
2
+ export type { Extension } from './types';
@@ -0,0 +1,16 @@
1
+ import type { Config } from '../config';
2
+ import type { InternalLogger } from '../internalLogger';
3
+ import type { Metas } from '../metas';
4
+ import type { UnpatchedConsole } from '../unpatchedConsole';
5
+ export interface Extension {
6
+ readonly name: string;
7
+ readonly version: string;
8
+ internalLogger: InternalLogger;
9
+ unpatchedConsole: UnpatchedConsole;
10
+ config: Config;
11
+ metas: Metas;
12
+ logDebug(...args: unknown[]): void;
13
+ logInfo(...args: unknown[]): void;
14
+ logWarn(...args: unknown[]): void;
15
+ logError(...args: unknown[]): void;
16
+ }
File without changes
@@ -1,7 +1,7 @@
1
- export { faro, getInternalFaroFromGlobalObject, internalGlobalObjectKey, isInternalFaroOnGlobalObject, setInternalFaroOnGlobalObject, } from './sdk';
2
- export type { Faro } from './sdk';
3
1
  export { defaultExceptionType } from './api';
4
2
  export type { API, APIEvent, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, MetaAPI, OTELApi, PushErrorOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, } from './api';
3
+ export { BaseExtension } from './extensions';
4
+ export type { Extension } from './extensions';
5
5
  export { globalObject } from './globalObject';
6
6
  export type { GlobalObject } from './globalObject';
7
7
  export { initializeFaro } from './initialize';
@@ -11,12 +11,14 @@ export { BaseInstrumentation } from './instrumentations';
11
11
  export type { Instrumentation, Instrumentations } from './instrumentations';
12
12
  export { createInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './internalLogger';
13
13
  export type { InternalLogger } from './internalLogger';
14
- export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, } from './metas';
14
+ export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, } from './metas';
15
+ export { faro, getInternalFaroFromGlobalObject, internalGlobalObjectKey, isInternalFaroOnGlobalObject, setInternalFaroOnGlobalObject, } from './sdk';
16
+ export type { Faro } from './sdk';
17
+ export { Conventions } from './semantic';
15
18
  export { BaseTransport, getTransportBody, TransportItemType, transportItemTypeToBodyKey } from './transports';
16
19
  export type { BeforeSendHook, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, } from './transports';
17
20
  export { defaultUnpatchedConsole } from './unpatchedConsole';
18
21
  export type { UnpatchedConsole } from './unpatchedConsole';
19
- export { allLogLevels, BaseExtension, createPromiseBuffer, deepEqual, defaultLogLevel, genShortID, getCurrentTimestamp, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, LogLevel, noop, } from './utils';
22
+ export { allLogLevels, createPromiseBuffer, deepEqual, defaultLogLevel, genShortID, getCurrentTimestamp, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, LogLevel, noop, } from './utils';
20
23
  export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer, } from './utils';
21
24
  export { VERSION } from './version';
22
- export { Conventions } from './semantic';
File without changes
@@ -1,5 +1,9 @@
1
- import { BaseExtension } from '../utils';
1
+ import type { API } from '../api';
2
+ import { BaseExtension } from '../extensions';
3
+ import type { Transports } from '../transports';
2
4
  import type { Instrumentation } from './types';
3
5
  export declare abstract class BaseInstrumentation extends BaseExtension implements Instrumentation {
6
+ api: API;
7
+ transports: Transports;
4
8
  abstract initialize(): void;
5
9
  }
@@ -1,3 +1,4 @@
1
1
  export { BaseInstrumentation } from './base';
2
2
  export { initializeInstrumentations } from './initialize';
3
+ export { registerInitialInstrumentations } from './registerInitial';
3
4
  export type { Instrumentation, Instrumentations } from './types';
@@ -0,0 +1,8 @@
1
+ import type { API } from '../api';
2
+ import type { Config } from '../config';
3
+ import type { InternalLogger } from '../internalLogger';
4
+ import type { Metas } from '../metas';
5
+ import type { Transports } from '../transports';
6
+ import type { UnpatchedConsole } from '../unpatchedConsole';
7
+ import type { Instrumentations } from './types';
8
+ export declare function initializeInstrumentations(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, api: API): Instrumentations;
@@ -0,0 +1,2 @@
1
+ import type { Faro } from '../sdk';
2
+ export declare function registerInitialInstrumentations(faro: Faro): void;
@@ -1,5 +1,9 @@
1
- import type { Extension } from '../utils';
1
+ import type { API } from '../api';
2
+ import type { Extension } from '../extensions';
3
+ import type { Transports } from '../transports';
2
4
  export interface Instrumentation extends Extension {
5
+ api: API;
6
+ transports: Transports;
3
7
  initialize: VoidFunction;
4
8
  destroy?: VoidFunction;
5
9
  }
File without changes
@@ -1,4 +1,4 @@
1
- export { defaultInternalLoggerLevel, InternalLoggerLevel } from './const';
1
+ export { defaultInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './const';
2
2
  export { createInternalLogger } from './createInternalLogger';
3
3
  export { initializeInternalLogger, internalLogger } from './initialize';
4
4
  export type { InternalLogger } from './types';
File without changes
@@ -1,2 +1,3 @@
1
1
  export { initializeMetas } from './initialize';
2
- export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, } from './types';
2
+ export { registerInitialMetas } from './registerInitial';
3
+ export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, } from './types';
@@ -0,0 +1,5 @@
1
+ import type { Config } from '../config';
2
+ import type { InternalLogger } from '../internalLogger';
3
+ import type { UnpatchedConsole } from '../unpatchedConsole';
4
+ import type { Metas } from './types';
5
+ export declare function initializeMetas(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config): Metas;
@@ -0,0 +1,2 @@
1
+ import type { Faro } from '../sdk';
2
+ export declare function registerInitialMetas(faro: Faro): void;
@@ -32,7 +32,6 @@ export interface MetaUser {
32
32
  }
33
33
  export interface MetaSession {
34
34
  id?: string;
35
- started?: string;
36
35
  attributes?: MetaAttributes;
37
36
  }
38
37
  export interface MetaPage {
@@ -46,6 +45,9 @@ export interface MetaBrowser {
46
45
  os?: string;
47
46
  mobile?: boolean;
48
47
  }
48
+ export interface MetaView {
49
+ name: string;
50
+ }
49
51
  export interface Meta {
50
52
  sdk?: MetaSDK;
51
53
  app?: MetaApp;
@@ -53,4 +55,5 @@ export interface Meta {
53
55
  session?: MetaSession;
54
56
  page?: MetaPage;
55
57
  browser?: MetaBrowser;
58
+ view?: MetaView;
56
59
  }
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  export { internalGlobalObjectKey } from './const';
2
- export { faro, registerFaro } from './register';
2
+ export { faro, registerFaro } from './registerFaro';
3
3
  export { getInternalFromGlobalObject as getInternalFaroFromGlobalObject, isInternalFaroOnGlobalObject as isInternalFaroOnGlobalObject, setInternalFaroOnGlobalObject as setInternalFaroOnGlobalObject, } from './internalFaroGlobalObject';
4
4
  export type { Faro } from './types';
@@ -5,14 +5,6 @@ import type { InternalLogger } from '../internalLogger';
5
5
  import type { Metas } from '../metas';
6
6
  import type { Transports } from '../transports';
7
7
  import type { UnpatchedConsole } from '../unpatchedConsole';
8
- export interface Faro {
9
- api: API;
10
- config: Config;
11
- instrumentations: Instrumentations;
12
- internalLogger: InternalLogger;
13
- metas: Metas;
14
- pause: Transports['pause'];
15
- transports: Transports;
16
- unpatchedConsole: UnpatchedConsole;
17
- unpause: Transports['unpause'];
18
- }
8
+ import type { Faro } from './types';
9
+ export declare let faro: Faro;
10
+ export declare function registerFaro(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, api: API, instrumentations: Instrumentations): Faro;
File without changes
@@ -3,5 +3,6 @@ export declare const Conventions: {
3
3
  readonly CLICK: "click";
4
4
  readonly NAVIGATION: "navigation";
5
5
  readonly SESSION_START: "session_start";
6
+ readonly VIEW_CHANGED: "view_changed";
6
7
  };
7
8
  };
File without changes
File without changes
@@ -4,7 +4,7 @@ import type { Transport, TransportItem } from '../transports';
4
4
  export declare class MockTransport extends BaseTransport implements Transport {
5
5
  private ignoreURLs;
6
6
  readonly name = "@grafana/transport-mock";
7
- readonly version = "1.0.0-beta3";
7
+ readonly version = "1.0.0";
8
8
  items: TransportItem[];
9
9
  constructor(ignoreURLs?: Patterns);
10
10
  send(item: TransportItem): void | Promise<void>;
File without changes
@@ -1,4 +1,4 @@
1
- import { BaseExtension } from '../utils';
1
+ import { BaseExtension } from '../extensions';
2
2
  import type { Transport, TransportItem } from './types';
3
3
  export declare abstract class BaseTransport extends BaseExtension implements Transport {
4
4
  abstract send(item: TransportItem): void | Promise<void>;
File without changes
@@ -1,5 +1,6 @@
1
1
  export { initializeTransports } from './initialize';
2
2
  export { BaseTransport } from './base';
3
3
  export { TransportItemType, transportItemTypeToBodyKey } from './const';
4
+ export { registerInitialTransports } from './registerInitial';
4
5
  export type { BeforeSendHook, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, } from './types';
5
6
  export { getTransportBody } from './utils';
@@ -1,6 +1,8 @@
1
1
  import type { Config, Patterns } from '../config';
2
2
  import type { InternalLogger } from '../internalLogger';
3
+ import type { Metas } from '../metas';
4
+ import type { UnpatchedConsole } from '../unpatchedConsole';
3
5
  import type { BeforeSendHook, Transports } from './types';
4
6
  export declare function shouldIgnoreEvent(patterns: Patterns, msg: string): boolean;
5
7
  export declare function createBeforeSendHookFromIgnorePatterns(patterns: Patterns): BeforeSendHook;
6
- export declare function initializeTransports(internalLogger: InternalLogger, config: Config): Transports;
8
+ export declare function initializeTransports(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas): Transports;
@@ -0,0 +1,2 @@
1
+ import type { Faro } from '../sdk';
2
+ export declare function registerInitialTransports(faro: Faro): void;
@@ -1,7 +1,7 @@
1
1
  import type { APIEvent, EventEvent, ExceptionEvent, LogEvent, MeasurementEvent, TraceEvent } from '../api';
2
2
  import type { Patterns } from '../config';
3
+ import type { Extension } from '../extensions';
3
4
  import type { Meta } from '../metas';
4
- import type { Extension } from '../utils';
5
5
  import type { TransportItemType } from './const';
6
6
  export type TransportItemPayload<P = APIEvent> = P;
7
7
  export type BeforeSendHook<P = APIEvent> = (item: TransportItem<P>) => TransportItem<P> | null;
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export declare function deepEqual(a: any, b: any): boolean;
@@ -1,5 +1,3 @@
1
- export { BaseExtension } from './extensions';
2
- export type { Extension } from './extensions';
3
1
  export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue } from './baseObject';
4
2
  export { deepEqual } from './deepEqual';
5
3
  export { getCurrentTimestamp } from './getCurrentTimestamp';
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export declare const VERSION = "1.0.0";