@cloudcare/browser-core 1.2.3 → 1.2.4

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.
@@ -49,7 +49,8 @@ function validateAndBuildConfiguration(initConfiguration) {
49
49
  * Logs intake limit
50
50
  */
51
51
  batchMessagesLimit: 50,
52
- messageBytesLimit: 256 * _tools.ONE_KIBI_BYTE
52
+ messageBytesLimit: 256 * _tools.ONE_KIBI_BYTE,
53
+ resourceUrlLimit: 5 * _tools.ONE_KIBI_BYTE
53
54
  }, (0, _transportConfiguration.computeTransportConfiguration)(initConfiguration));
54
55
  }
55
56
 
@@ -35,7 +35,8 @@ export function validateAndBuildConfiguration(initConfiguration) {
35
35
  * Logs intake limit
36
36
  */
37
37
  batchMessagesLimit: 50,
38
- messageBytesLimit: 256 * ONE_KIBI_BYTE
38
+ messageBytesLimit: 256 * ONE_KIBI_BYTE,
39
+ resourceUrlLimit: 5 * ONE_KIBI_BYTE
39
40
  }, computeTransportConfiguration(initConfiguration));
40
41
  }
41
42
  export function buildCookieOptions(initConfiguration) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcare/browser-core",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "scripts": {
@@ -20,5 +20,5 @@
20
20
  "author": "dataflux",
21
21
  "license": "MIT",
22
22
  "description": "DataFlux RUM Web 端数据指标监控",
23
- "gitHead": "dc666f91dcd821cc1286ed76b5162d7ce71c7fda"
23
+ "gitHead": "cbce52b999d27d4fe7b9ac34931f4d1445aecb4f"
24
24
  }
@@ -1,19 +1,35 @@
1
1
  import { getCurrentSite } from '../browser/cookie'
2
2
  import { catchUserErrors } from '../helper/catchUserErrors'
3
3
  import { display } from '../helper/display'
4
- import { assign, isPercentage, ONE_KIBI_BYTE, ONE_SECOND, isNullUndefinedDefaultValue } from '../helper/tools'
4
+ import {
5
+ assign,
6
+ isPercentage,
7
+ ONE_KIBI_BYTE,
8
+ ONE_SECOND,
9
+ isNullUndefinedDefaultValue
10
+ } from '../helper/tools'
5
11
  import { computeTransportConfiguration } from './transportConfiguration'
6
- export function validateAndBuildConfiguration(initConfiguration){
7
- if (initConfiguration.sampleRate !== undefined && !isPercentage(initConfiguration.sampleRate)) {
12
+ export function validateAndBuildConfiguration(initConfiguration) {
13
+ if (
14
+ initConfiguration.sampleRate !== undefined &&
15
+ !isPercentage(initConfiguration.sampleRate)
16
+ ) {
8
17
  display.error('Sample Rate should be a number between 0 and 100')
9
18
  return
10
19
  }
11
20
  return assign(
12
21
  {
13
22
  beforeSend:
14
- initConfiguration.beforeSend && catchUserErrors(initConfiguration.beforeSend, 'beforeSend threw an error:'),
23
+ initConfiguration.beforeSend &&
24
+ catchUserErrors(
25
+ initConfiguration.beforeSend,
26
+ 'beforeSend threw an error:'
27
+ ),
15
28
  cookieOptions: buildCookieOptions(initConfiguration),
16
- sampleRate: isNullUndefinedDefaultValue(initConfiguration.sampleRate, 100),
29
+ sampleRate: isNullUndefinedDefaultValue(
30
+ initConfiguration.sampleRate,
31
+ 100
32
+ ),
17
33
  service: initConfiguration.service,
18
34
  version: initConfiguration.version,
19
35
  env: initConfiguration.env,
@@ -38,6 +54,7 @@ export function validateAndBuildConfiguration(initConfiguration){
38
54
  */
39
55
  batchMessagesLimit: 50,
40
56
  messageBytesLimit: 256 * ONE_KIBI_BYTE,
57
+ resourceUrlLimit: 5 * ONE_KIBI_BYTE
41
58
  },
42
59
  computeTransportConfiguration(initConfiguration)
43
60
  )
@@ -57,5 +74,8 @@ export function buildCookieOptions(initConfiguration) {
57
74
  }
58
75
 
59
76
  function mustUseSecureCookie(initConfiguration) {
60
- return !!initConfiguration.useSecureSessionCookie || !!initConfiguration.useCrossSiteSessionCookie
77
+ return (
78
+ !!initConfiguration.useSecureSessionCookie ||
79
+ !!initConfiguration.useCrossSiteSessionCookie
80
+ )
61
81
  }