@cloudcare/browser-core 3.1.2 → 3.1.3

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 (51) hide show
  1. package/cjs/browser/htmlDomUtils.js +4 -1
  2. package/cjs/browser/htmlDomUtils.js.map +1 -1
  3. package/cjs/configuration/configuration.js +2 -1
  4. package/cjs/configuration/configuration.js.map +1 -1
  5. package/cjs/dataMap.js +7 -3
  6. package/cjs/dataMap.js.map +1 -1
  7. package/cjs/helper/errorTools.js +2 -1
  8. package/cjs/helper/errorTools.js.map +1 -1
  9. package/cjs/helper/monitor.js +1 -0
  10. package/cjs/helper/monitor.js.map +1 -1
  11. package/cjs/helper/serialisation/rowData.js +7 -5
  12. package/cjs/helper/serialisation/rowData.js.map +1 -1
  13. package/cjs/helper/tools.js +1 -0
  14. package/cjs/helper/tools.js.map +1 -1
  15. package/cjs/transport/batch.js +23 -10
  16. package/cjs/transport/batch.js.map +1 -1
  17. package/cjs/transport/httpRequest.js +31 -12
  18. package/cjs/transport/httpRequest.js.map +1 -1
  19. package/cjs/transport/startBatchWithReplica.js +2 -2
  20. package/cjs/transport/startBatchWithReplica.js.map +1 -1
  21. package/esm/browser/htmlDomUtils.js +3 -1
  22. package/esm/browser/htmlDomUtils.js.map +1 -1
  23. package/esm/configuration/configuration.js +2 -1
  24. package/esm/configuration/configuration.js.map +1 -1
  25. package/esm/dataMap.js +7 -3
  26. package/esm/dataMap.js.map +1 -1
  27. package/esm/helper/errorTools.js +1 -0
  28. package/esm/helper/errorTools.js.map +1 -1
  29. package/esm/helper/monitor.js +1 -0
  30. package/esm/helper/monitor.js.map +1 -1
  31. package/esm/helper/serialisation/rowData.js +8 -6
  32. package/esm/helper/serialisation/rowData.js.map +1 -1
  33. package/esm/helper/tools.js +1 -0
  34. package/esm/helper/tools.js.map +1 -1
  35. package/esm/transport/batch.js +24 -11
  36. package/esm/transport/batch.js.map +1 -1
  37. package/esm/transport/httpRequest.js +31 -12
  38. package/esm/transport/httpRequest.js.map +1 -1
  39. package/esm/transport/startBatchWithReplica.js +2 -2
  40. package/esm/transport/startBatchWithReplica.js.map +1 -1
  41. package/package.json +2 -2
  42. package/src/browser/htmlDomUtils.js +3 -1
  43. package/src/configuration/configuration.js +2 -1
  44. package/src/dataMap.js +9 -3
  45. package/src/helper/errorTools.js +1 -0
  46. package/src/helper/monitor.js +1 -0
  47. package/src/helper/serialisation/rowData.js +9 -6
  48. package/src/helper/tools.js +1 -0
  49. package/src/transport/batch.js +28 -12
  50. package/src/transport/httpRequest.js +46 -11
  51. package/src/transport/startBatchWithReplica.js +3 -1
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.forEachChildNodes = forEachChildNodes;
7
7
  exports.getParentNode = getParentNode;
8
+ exports.hasChildNodes = hasChildNodes;
8
9
  exports.isCommentNode = isCommentNode;
9
10
  exports.isElementNode = isElementNode;
10
11
  exports.isNodeShadowHost = isNodeShadowHost;
@@ -26,7 +27,9 @@ function isNodeShadowRoot(node) {
26
27
  var shadowRoot = node;
27
28
  return !!shadowRoot.host && shadowRoot.nodeType === Node.DOCUMENT_FRAGMENT_NODE && isElementNode(shadowRoot.host);
28
29
  }
29
-
30
+ function hasChildNodes(node) {
31
+ return node.childNodes.length > 0 || isNodeShadowHost(node);
32
+ }
30
33
  // export function getChildNodes(node) {
31
34
  // return isNodeShadowHost(node) ? node.shadowRoot.childNodes : node.childNodes
32
35
  // }
@@ -1 +1 @@
1
- {"version":3,"file":"htmlDomUtils.js","names":["isTextNode","node","nodeType","Node","TEXT_NODE","isCommentNode","COMMENT_NODE","isElementNode","ELEMENT_NODE","isNodeShadowHost","Boolean","shadowRoot","isNodeShadowRoot","host","DOCUMENT_FRAGMENT_NODE","forEachChildNodes","callback","childNodes","forEach","getParentNode","parentNode"],"sources":["../../src/browser/htmlDomUtils.js"],"sourcesContent":["export function isTextNode(node) {\n return node.nodeType === Node.TEXT_NODE\n}\n\nexport function isCommentNode(node) {\n return node.nodeType === Node.COMMENT_NODE\n}\n\nexport function isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE\n}\n\nexport function isNodeShadowHost(node) {\n return isElementNode(node) && Boolean(node.shadowRoot)\n}\n\nexport function isNodeShadowRoot(node) {\n var shadowRoot = node\n return (\n !!shadowRoot.host &&\n shadowRoot.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n isElementNode(shadowRoot.host)\n )\n}\n\n// export function getChildNodes(node) {\n// return isNodeShadowHost(node) ? node.shadowRoot.childNodes : node.childNodes\n// }\nexport function forEachChildNodes(node, callback) {\n node.childNodes.forEach(callback)\n if (isNodeShadowHost(node)) {\n callback(node.shadowRoot)\n }\n}\n/**\n * Return `host` in case if the current node is a shadow root otherwise will return the `parentNode`\n */\nexport function getParentNode(node) {\n return isNodeShadowRoot(node) ? node.host : node.parentNode\n}\n"],"mappings":";;;;;;;;;;;;AAAO,SAASA,UAAUA,CAACC,IAAI,EAAE;EAC/B,OAAOA,IAAI,CAACC,QAAQ,KAAKC,IAAI,CAACC,SAAS;AACzC;AAEO,SAASC,aAAaA,CAACJ,IAAI,EAAE;EAClC,OAAOA,IAAI,CAACC,QAAQ,KAAKC,IAAI,CAACG,YAAY;AAC5C;AAEO,SAASC,aAAaA,CAACN,IAAI,EAAE;EAClC,OAAOA,IAAI,CAACC,QAAQ,KAAKC,IAAI,CAACK,YAAY;AAC5C;AAEO,SAASC,gBAAgBA,CAACR,IAAI,EAAE;EACrC,OAAOM,aAAa,CAACN,IAAI,CAAC,IAAIS,OAAO,CAACT,IAAI,CAACU,UAAU,CAAC;AACxD;AAEO,SAASC,gBAAgBA,CAACX,IAAI,EAAE;EACrC,IAAIU,UAAU,GAAGV,IAAI;EACrB,OACE,CAAC,CAACU,UAAU,CAACE,IAAI,IACjBF,UAAU,CAACT,QAAQ,KAAKC,IAAI,CAACW,sBAAsB,IACnDP,aAAa,CAACI,UAAU,CAACE,IAAI,CAAC;AAElC;;AAEA;AACA;AACA;AACO,SAASE,iBAAiBA,CAACd,IAAI,EAAEe,QAAQ,EAAE;EAChDf,IAAI,CAACgB,UAAU,CAACC,OAAO,CAACF,QAAQ,CAAC;EACjC,IAAIP,gBAAgB,CAACR,IAAI,CAAC,EAAE;IAC1Be,QAAQ,CAACf,IAAI,CAACU,UAAU,CAAC;EAC3B;AACF;AACA;AACA;AACA;AACO,SAASQ,aAAaA,CAAClB,IAAI,EAAE;EAClC,OAAOW,gBAAgB,CAACX,IAAI,CAAC,GAAGA,IAAI,CAACY,IAAI,GAAGZ,IAAI,CAACmB,UAAU;AAC7D"}
1
+ {"version":3,"file":"htmlDomUtils.js","names":["isTextNode","node","nodeType","Node","TEXT_NODE","isCommentNode","COMMENT_NODE","isElementNode","ELEMENT_NODE","isNodeShadowHost","Boolean","shadowRoot","isNodeShadowRoot","host","DOCUMENT_FRAGMENT_NODE","hasChildNodes","childNodes","length","forEachChildNodes","callback","forEach","getParentNode","parentNode"],"sources":["../../src/browser/htmlDomUtils.js"],"sourcesContent":["export function isTextNode(node) {\n return node.nodeType === Node.TEXT_NODE\n}\n\nexport function isCommentNode(node) {\n return node.nodeType === Node.COMMENT_NODE\n}\n\nexport function isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE\n}\n\nexport function isNodeShadowHost(node) {\n return isElementNode(node) && Boolean(node.shadowRoot)\n}\n\nexport function isNodeShadowRoot(node) {\n var shadowRoot = node\n return (\n !!shadowRoot.host &&\n shadowRoot.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n isElementNode(shadowRoot.host)\n )\n}\nexport function hasChildNodes(node) {\n return node.childNodes.length > 0 || isNodeShadowHost(node)\n}\n// export function getChildNodes(node) {\n// return isNodeShadowHost(node) ? node.shadowRoot.childNodes : node.childNodes\n// }\nexport function forEachChildNodes(node, callback) {\n node.childNodes.forEach(callback)\n if (isNodeShadowHost(node)) {\n callback(node.shadowRoot)\n }\n}\n/**\n * Return `host` in case if the current node is a shadow root otherwise will return the `parentNode`\n */\nexport function getParentNode(node) {\n return isNodeShadowRoot(node) ? node.host : node.parentNode\n}\n"],"mappings":";;;;;;;;;;;;;AAAO,SAASA,UAAUA,CAACC,IAAI,EAAE;EAC/B,OAAOA,IAAI,CAACC,QAAQ,KAAKC,IAAI,CAACC,SAAS;AACzC;AAEO,SAASC,aAAaA,CAACJ,IAAI,EAAE;EAClC,OAAOA,IAAI,CAACC,QAAQ,KAAKC,IAAI,CAACG,YAAY;AAC5C;AAEO,SAASC,aAAaA,CAACN,IAAI,EAAE;EAClC,OAAOA,IAAI,CAACC,QAAQ,KAAKC,IAAI,CAACK,YAAY;AAC5C;AAEO,SAASC,gBAAgBA,CAACR,IAAI,EAAE;EACrC,OAAOM,aAAa,CAACN,IAAI,CAAC,IAAIS,OAAO,CAACT,IAAI,CAACU,UAAU,CAAC;AACxD;AAEO,SAASC,gBAAgBA,CAACX,IAAI,EAAE;EACrC,IAAIU,UAAU,GAAGV,IAAI;EACrB,OACE,CAAC,CAACU,UAAU,CAACE,IAAI,IACjBF,UAAU,CAACT,QAAQ,KAAKC,IAAI,CAACW,sBAAsB,IACnDP,aAAa,CAACI,UAAU,CAACE,IAAI,CAAC;AAElC;AACO,SAASE,aAAaA,CAACd,IAAI,EAAE;EAClC,OAAOA,IAAI,CAACe,UAAU,CAACC,MAAM,GAAG,CAAC,IAAIR,gBAAgB,CAACR,IAAI,CAAC;AAC7D;AACA;AACA;AACA;AACO,SAASiB,iBAAiBA,CAACjB,IAAI,EAAEkB,QAAQ,EAAE;EAChDlB,IAAI,CAACe,UAAU,CAACI,OAAO,CAACD,QAAQ,CAAC;EACjC,IAAIV,gBAAgB,CAACR,IAAI,CAAC,EAAE;IAC1BkB,QAAQ,CAAClB,IAAI,CAACU,UAAU,CAAC;EAC3B;AACF;AACA;AACA;AACA;AACO,SAASU,aAAaA,CAACpB,IAAI,EAAE;EAClC,OAAOW,gBAAgB,CAACX,IAAI,CAAC,GAAGA,IAAI,CAACY,IAAI,GAAGZ,IAAI,CAACqB,UAAU;AAC7D"}
@@ -60,7 +60,8 @@ function validateAndBuildConfiguration(initConfiguration) {
60
60
  batchMessagesLimit: 50,
61
61
  messageBytesLimit: 256 * _byteUtils.ONE_KIBI_BYTE,
62
62
  resourceUrlLimit: 5 * _byteUtils.ONE_KIBI_BYTE,
63
- storeContextsToLocal: !!initConfiguration.storeContextsToLocal
63
+ storeContextsToLocal: !!initConfiguration.storeContextsToLocal,
64
+ sendContentTypeByJson: !!initConfiguration.sendContentTypeByJson
64
65
  }, (0, _transportConfiguration.computeTransportConfiguration)(initConfiguration));
65
66
  }
66
67
  function buildCookieOptions(initConfiguration) {
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","names":["_cookie","require","_catchUserErrors","_display","_tools","_byteUtils","_transportConfiguration","DefaultPrivacyLevel","ALLOW","MASK","MASK_USER_INPUT","exports","validateAndBuildConfiguration","initConfiguration","sampleRate","undefined","isPercentage","display","error","sessionSampleRate","telemetrySampleRate","assign","beforeSend","catchUserErrors","cookieOptions","buildCookieOptions","isNullUndefinedDefaultValue","service","version","env","telemetryEnabled","silentMultipleInit","batchBytesLimit","ONE_KIBI_BYTE","eventRateLimiterThreshold","maxTelemetryEventsPerPage","flushTimeout","ONE_SECOND","batchMessagesLimit","messageBytesLimit","resourceUrlLimit","storeContextsToLocal","computeTransportConfiguration","secure","mustUseSecureCookie","crossSite","useCrossSiteSessionCookie","trackSessionAcrossSubdomains","domain","getCurrentSite","useSecureSessionCookie"],"sources":["../../src/configuration/configuration.js"],"sourcesContent":["import { getCurrentSite } from '../browser/cookie'\nimport { catchUserErrors } from '../helper/catchUserErrors'\nimport { display } from '../helper/display'\nimport {\n assign,\n isPercentage,\n ONE_SECOND,\n isNullUndefinedDefaultValue\n} from '../helper/tools'\nimport { ONE_KIBI_BYTE } from '../helper/byteUtils'\nimport { computeTransportConfiguration } from './transportConfiguration'\n\nexport var DefaultPrivacyLevel = {\n ALLOW: 'allow',\n MASK: 'mask',\n MASK_USER_INPUT: 'mask-user-input'\n}\nexport function validateAndBuildConfiguration(initConfiguration) {\n if (\n initConfiguration.sampleRate !== undefined &&\n !isPercentage(initConfiguration.sampleRate)\n ) {\n display.error('Sample Rate should be a number between 0 and 100')\n return\n }\n if (\n initConfiguration.sessionSampleRate !== undefined &&\n !isPercentage(initConfiguration.sessionSampleRate)\n ) {\n display.error('Sample Rate should be a number between 0 and 100')\n return\n }\n if (\n initConfiguration.telemetrySampleRate !== undefined &&\n !isPercentage(initConfiguration.telemetrySampleRate)\n ) {\n display.error('Telemetry Sample Rate should be a number between 0 and 100')\n return\n }\n var sessionSampleRate =\n initConfiguration.sessionSampleRate || initConfiguration.sampleRate\n return assign(\n {\n beforeSend:\n initConfiguration.beforeSend &&\n catchUserErrors(\n initConfiguration.beforeSend,\n 'beforeSend threw an error:'\n ),\n cookieOptions: buildCookieOptions(initConfiguration),\n sessionSampleRate: isNullUndefinedDefaultValue(sessionSampleRate, 100),\n service: initConfiguration.service,\n version: initConfiguration.version,\n env: initConfiguration.env,\n telemetrySampleRate: isNullUndefinedDefaultValue(\n initConfiguration.telemetrySampleRate,\n 100\n ),\n telemetryEnabled: isNullUndefinedDefaultValue(\n initConfiguration.telemetryEnabled,\n false\n ),\n silentMultipleInit: !!initConfiguration.silentMultipleInit,\n\n /**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\n batchBytesLimit: 16 * ONE_KIBI_BYTE,\n\n eventRateLimiterThreshold: 3000,\n maxTelemetryEventsPerPage: 15,\n\n /**\n * flush automatically, aim to be lower than ALB connection timeout\n * to maximize connection reuse.\n */\n flushTimeout: 30 * ONE_SECOND,\n\n /**\n * Logs intake limit\n */\n batchMessagesLimit: 50,\n messageBytesLimit: 256 * ONE_KIBI_BYTE,\n resourceUrlLimit: 5 * ONE_KIBI_BYTE,\n storeContextsToLocal: !!initConfiguration.storeContextsToLocal\n },\n computeTransportConfiguration(initConfiguration)\n )\n}\n\nexport function buildCookieOptions(initConfiguration) {\n var cookieOptions = {}\n\n cookieOptions.secure = mustUseSecureCookie(initConfiguration)\n cookieOptions.crossSite = !!initConfiguration.useCrossSiteSessionCookie\n\n if (initConfiguration.trackSessionAcrossSubdomains) {\n cookieOptions.domain = getCurrentSite()\n }\n\n return cookieOptions\n}\n\nfunction mustUseSecureCookie(initConfiguration) {\n return (\n !!initConfiguration.useSecureSessionCookie ||\n !!initConfiguration.useCrossSiteSessionCookie\n )\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAMA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAL,OAAA;AAEO,IAAIM,mBAAmB,GAAG;EAC/BC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,eAAe,EAAE;AACnB,CAAC;AAAAC,OAAA,CAAAJ,mBAAA,GAAAA,mBAAA;AACM,SAASK,6BAA6BA,CAACC,iBAAiB,EAAE;EAC/D,IACEA,iBAAiB,CAACC,UAAU,KAAKC,SAAS,IAC1C,CAAC,IAAAC,mBAAY,EAACH,iBAAiB,CAACC,UAAU,CAAC,EAC3C;IACAG,gBAAO,CAACC,KAAK,CAAC,kDAAkD,CAAC;IACjE;EACF;EACA,IACEL,iBAAiB,CAACM,iBAAiB,KAAKJ,SAAS,IACjD,CAAC,IAAAC,mBAAY,EAACH,iBAAiB,CAACM,iBAAiB,CAAC,EAClD;IACAF,gBAAO,CAACC,KAAK,CAAC,kDAAkD,CAAC;IACjE;EACF;EACA,IACEL,iBAAiB,CAACO,mBAAmB,KAAKL,SAAS,IACnD,CAAC,IAAAC,mBAAY,EAACH,iBAAiB,CAACO,mBAAmB,CAAC,EACpD;IACAH,gBAAO,CAACC,KAAK,CAAC,4DAA4D,CAAC;IAC3E;EACF;EACA,IAAIC,iBAAiB,GACnBN,iBAA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C;EAC7DW,aAAa,CAACqB,SAAS,GAAG,CAAC,CAAChC,iBAAiB,CAACiC,yBAAyB;EAEvE,IAAIjC,iBAAiB,CAACkC,4BAA4B,EAAE;IAClDvB,aAAa,CAACwB,MAAM,GAAG,IAAAC,sBAAc,EAAC,CAAC;EACzC;EAEA,OAAOzB,aAAa;AACtB;AAEA,SAASoB,mBAAmBA,CAAC/B,iBAAiB,EAAE;EAC9C,OACE,CAAC,CAACA,iBAAiB,CAACqC,sBAAsB,IAC1C,CAAC,CAACrC,iBAAiB,CAACiC,yBAAyB;AAEjD"}
1
+ {"version":3,"file":"configuration.js","names":["_cookie","require","_catchUserErrors","_display","_tools","_byteUtils","_transportConfiguration","DefaultPrivacyLevel","ALLOW","MASK","MASK_USER_INPUT","exports","validateAndBuildConfiguration","initConfiguration","sampleRate","undefined","isPercentage","display","error","sessionSampleRate","telemetrySampleRate","assign","beforeSend","catchUserErrors","cookieOptions","buildCookieOptions","isNullUndefinedDefaultValue","service","version","env","telemetryEnabled","silentMultipleInit","batchBytesLimit","ONE_KIBI_BYTE","eventRateLimiterThreshold","maxTelemetryEventsPerPage","flushTimeout","ONE_SECOND","batchMessagesLimit","messageBytesLimit","resourceUrlLimit","storeContextsToLocal","sendContentTypeByJson","computeTransportConfiguration","secure","mustUseSecureCookie","crossSite","useCrossSiteSessionCookie","trackSessionAcrossSubdomains","domain","getCurrentSite","useSecureSessionCookie"],"sources":["../../src/configuration/configuration.js"],"sourcesContent":["import { getCurrentSite } from '../browser/cookie'\nimport { catchUserErrors } from '../helper/catchUserErrors'\nimport { display } from '../helper/display'\nimport {\n assign,\n isPercentage,\n ONE_SECOND,\n isNullUndefinedDefaultValue\n} from '../helper/tools'\nimport { ONE_KIBI_BYTE } from '../helper/byteUtils'\nimport { computeTransportConfiguration } from './transportConfiguration'\n\nexport var DefaultPrivacyLevel = {\n ALLOW: 'allow',\n MASK: 'mask',\n MASK_USER_INPUT: 'mask-user-input'\n}\nexport function validateAndBuildConfiguration(initConfiguration) {\n if (\n initConfiguration.sampleRate !== undefined &&\n !isPercentage(initConfiguration.sampleRate)\n ) {\n display.error('Sample Rate should be a number between 0 and 100')\n return\n }\n if (\n initConfiguration.sessionSampleRate !== undefined &&\n !isPercentage(initConfiguration.sessionSampleRate)\n ) {\n display.error('Sample Rate should be a number between 0 and 100')\n return\n }\n if (\n initConfiguration.telemetrySampleRate !== undefined &&\n !isPercentage(initConfiguration.telemetrySampleRate)\n ) {\n display.error('Telemetry Sample Rate should be a number between 0 and 100')\n return\n }\n var sessionSampleRate =\n initConfiguration.sessionSampleRate || initConfiguration.sampleRate\n return assign(\n {\n beforeSend:\n initConfiguration.beforeSend &&\n catchUserErrors(\n initConfiguration.beforeSend,\n 'beforeSend threw an error:'\n ),\n cookieOptions: buildCookieOptions(initConfiguration),\n sessionSampleRate: isNullUndefinedDefaultValue(sessionSampleRate, 100),\n service: initConfiguration.service,\n version: initConfiguration.version,\n env: initConfiguration.env,\n telemetrySampleRate: isNullUndefinedDefaultValue(\n initConfiguration.telemetrySampleRate,\n 100\n ),\n telemetryEnabled: isNullUndefinedDefaultValue(\n initConfiguration.telemetryEnabled,\n false\n ),\n silentMultipleInit: !!initConfiguration.silentMultipleInit,\n\n /**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\n batchBytesLimit: 16 * ONE_KIBI_BYTE,\n\n eventRateLimiterThreshold: 3000,\n maxTelemetryEventsPerPage: 15,\n\n /**\n * flush automatically, aim to be lower than ALB connection timeout\n * to maximize connection reuse.\n */\n flushTimeout: 30 * ONE_SECOND,\n\n /**\n * Logs intake limit\n */\n batchMessagesLimit: 50,\n messageBytesLimit: 256 * ONE_KIBI_BYTE,\n resourceUrlLimit: 5 * ONE_KIBI_BYTE,\n storeContextsToLocal: !!initConfiguration.storeContextsToLocal,\n sendContentTypeByJson: !!initConfiguration.sendContentTypeByJson\n },\n computeTransportConfiguration(initConfiguration)\n )\n}\n\nexport function buildCookieOptions(initConfiguration) {\n var cookieOptions = {}\n\n cookieOptions.secure = mustUseSecureCookie(initConfiguration)\n cookieOptions.crossSite = !!initConfiguration.useCrossSiteSessionCookie\n\n if (initConfiguration.trackSessionAcrossSubdomains) {\n cookieOptions.domain = getCurrentSite()\n }\n\n return cookieOptions\n}\n\nfunction mustUseSecureCookie(initConfiguration) {\n return (\n !!initConfiguration.useSecureSessionCookie ||\n !!initConfiguration.useCrossSiteSessionCookie\n )\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAMA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAL,OAAA;AAEO,IAAIM,mBAAmB,GAAG;EAC/BC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,eAAe,EAAE;AACnB,CAAC;AAAAC,OAAA,CAAAJ,mBAAA,GAAAA,mBAAA;AACM,SAASK,6BAA6BA,CAACC,iBAAiB,EAAE;EAC/D,IACEA,iBAAiB,CAACC,UAAU,KAAKC,SAAS,IAC1C,CAAC,IAAAC,mBAAY,EAACH,iBAAiB,CAACC,UAAU,CAAC,EAC3C;IACAG,gBAAO,CAACC,KAAK,CAAC,kDAAkD,CAAC;IACjE;EACF;EACA,IACEL,iBAAiB,CAACM,iBAAiB,KAAKJ,SAAS,IACjD,CAAC,IAAAC,mBAAY,EAACH,iBAAiB,CAACM,iBAAiB,CAAC,EAClD;IACAF,gBAAO,CAACC,KAAK,CAAC,kDAAkD,CAAC;IACjE;EACF;EACA,IACEL,iBAAiB,CAACO,mBAAmB,KAAKL,SAAS,IACnD,CAAC,IAAAC,mBAAY,EAACH,iBAAiB,CAACO,mBAAmB,CAAC,EACpD;IACAH,gBAAO,CAACC,KAAK,CAAC,4DAA4D,CAAC;IAC3E;EACF;EACA,IAAIC,iBAAiB,GACnBN,iBAAi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EtBA,aAAa,CAACoB,MAAM,GAAGC,mBAAmB,CAAChC,iBAAiB,CAAC;EAC7DW,aAAa,CAACsB,SAAS,GAAG,CAAC,CAACjC,iBAAiB,CAACkC,yBAAyB;EAEvE,IAAIlC,iBAAiB,CAACmC,4BAA4B,EAAE;IAClDxB,aAAa,CAACyB,MAAM,GAAG,IAAAC,sBAAc,EAAC,CAAC;EACzC;EAEA,OAAO1B,aAAa;AACtB;AAEA,SAASqB,mBAAmBA,CAAChC,iBAAiB,EAAE;EAC9C,OACE,CAAC,CAACA,iBAAiB,CAACsC,sBAAsB,IAC1C,CAAC,CAACtC,iBAAiB,CAACkC,yBAAyB;AAEjD"}
package/cjs/dataMap.js CHANGED
@@ -18,7 +18,6 @@ var commonTags = {
18
18
  session_id: 'session.id',
19
19
  session_type: 'session.type',
20
20
  session_sampling: 'session.is_sampling',
21
- session_has_replay: 'session.has_replay',
22
21
  is_signin: 'user.is_signin',
23
22
  os: 'device.os',
24
23
  os_version: 'device.os_version',
@@ -44,7 +43,10 @@ var commonFields = {
44
43
  action_id: 'action.id',
45
44
  action_ids: 'action.ids',
46
45
  view_in_foreground: 'view.in_foreground',
47
- display: 'display'
46
+ display: 'display',
47
+ session_has_replay: 'session.has_replay',
48
+ is_login: 'user.is_login',
49
+ page_states: '_gc.page_states'
48
50
  };
49
51
  // 需要用双引号将字符串类型的field value括起来, 这里有数组标示[string, path]
50
52
  exports.commonFields = commonFields;
@@ -68,6 +70,7 @@ var dataMap = {
68
70
  largest_contentful_paint: 'view.largest_contentful_paint',
69
71
  largest_contentful_paint_element_selector: 'view.largest_contentful_paint_element_selector',
70
72
  cumulative_layout_shift: 'view.cumulative_layout_shift',
73
+ cumulative_layout_shift_target_selector: 'view.cumulative_layout_shift_target_selector',
71
74
  first_input_delay: 'view.first_input_delay',
72
75
  loading_time: 'view.loading_time',
73
76
  dom_interactive: 'view.dom_interactive',
@@ -75,15 +78,16 @@ var dataMap = {
75
78
  dom_complete: 'view.dom_complete',
76
79
  load_event: 'view.load_event',
77
80
  first_input_time: 'view.first_input_time',
81
+ first_input_target_selector: 'view.first_input_target_selector',
78
82
  first_paint_time: 'view.fpt',
79
83
  interaction_to_next_paint: 'view.interaction_to_next_paint',
84
+ interaction_to_next_paint_target_selector: 'view.interaction_to_next_paint_target_selector',
80
85
  resource_load_time: 'view.resource_load_time',
81
86
  time_to_interactive: 'view.tti',
82
87
  dom: 'view.dom',
83
88
  dom_ready: 'view.dom_ready',
84
89
  time_spent: 'view.time_spent',
85
90
  first_byte: 'view.first_byte',
86
- page_states: '_gc.page_states',
87
91
  frustration_count: 'view.frustration.count',
88
92
  custom_timings: 'view.custom_timings'
89
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dataMap.js","names":["_enums","require","commonTags","sdk_name","sdk_version","app_id","env","service","version","userid","user_email","user_name","session_id","session_type","session_sampling","session_has_replay","is_signin","os","os_version","os_version_major","browser","browser_version","browser_version_major","screen_size","network_type","device","view_id","view_referrer","view_url","view_host","view_path","view_name","view_path_group","view_url_query","exports","commonFields","action_id","action_ids","view_in_foreground","display","dataMap","view","type","RumEventType","VIEW","tags","view_loading_type","view_apdex_level","view_privacy_replay_level","fields","is_active","session_replay_stats","session_is_active","view_error_count","view_resource_count","view_long_task_count","view_action_count","first_contentful_paint","largest_contentful_paint","largest_contentful_paint_element_selector","cumulative_layout_shift","first_input_delay","loading_time","dom_interactive","dom_content_loaded","dom_complete","load_event","first_input_time","first_paint_time","interaction_to_next_paint","resource_load_time","time_to_interactive","dom","dom_ready","time_spent","first_byte","page_states","frustration_count","custom_timings","resource","RESOURCE","trace_id","span_id","resource_url","resource_url_host","resource_url_path","resource_url_path_group","resource_url_query","resource_type","resource_status","resource_status_group","resource_method","duration","resource_size","resource_encode_size","resource_render_blocking_status","resource_dns","resource_tcp","resource_ssl","resource_ttfb","resource_trans","resource_redirect","resource_first_byte","resource_dns_time","resource_download_time","resource_first_byte_time","resource_connect_time","resource_ssl_time","resource_redirect_time","error","ERROR","error_id","error_source","error_type","error_handling","error_message","error_stack","error_causes","long_task","LONG_TASK","long_task_id","action","ACTION","action_type","action_name","action_error_count","action_resource_count","action_frustration_types","action_long_task_count","action_target","action_position","telemetry","status","message","error_kind","browser_log","LOGGER","error_resource_url","error_resource_url_host","error_resource_url_path","error_resource_url_path_group","error_resource_status","error_resource_status_group","error_resource_method"],"sources":["../src/dataMap.js"],"sourcesContent":["import { RumEventType } from './helper/enums'\nexport var commonTags = {\n sdk_name: '_gc.sdk_name',\n sdk_version: '_gc.sdk_version',\n app_id: 'application.id',\n env: 'env',\n service: 'service',\n version: 'version',\n userid: 'user.id',\n user_email: 'user.email',\n user_name: 'user.name',\n session_id: 'session.id',\n session_type: 'session.type',\n session_sampling: 'session.is_sampling',\n session_has_replay: 'session.has_replay',\n is_signin: 'user.is_signin',\n os: 'device.os',\n os_version: 'device.os_version',\n os_version_major: 'device.os_version_major',\n browser: 'device.browser',\n browser_version: 'device.browser_version',\n browser_version_major: 'device.browser_version_major',\n screen_size: 'device.screen_size',\n network_type: 'device.network_type',\n device: 'device.device',\n view_id: 'view.id',\n view_referrer: 'view.referrer',\n view_url: 'view.url',\n view_host: 'view.host',\n view_path: 'view.path',\n view_name: 'view.path', // 冗余一个字段\n view_path_group: 'view.path_group',\n view_url_query: 'view.url_query'\n}\nexport var commonFields = {\n action_id: 'action.id',\n action_ids: 'action.ids',\n view_in_foreground: 'view.in_foreground',\n display: 'display'\n}\n// 需要用双引号将字符串类型的field value括起来, 这里有数组标示[string, path]\nexport var dataMap = {\n view: {\n type: RumEventType.VIEW,\n tags: {\n view_loading_type: 'view.loading_type',\n view_apdex_level: 'view.apdex_level',\n view_privacy_replay_level: 'privacy.replay_level'\n },\n fields: {\n is_active: 'view.is_active',\n session_replay_stats: '_gc.replay_stats',\n session_is_active: 'session.is_active',\n view_error_count: 'view.error.count',\n view_resource_count: 'view.resource.count',\n view_long_task_count: 'view.long_task.count',\n view_action_count: 'view.action.count',\n first_contentful_paint: 'view.first_contentful_paint',\n largest_contentful_paint: 'view.largest_contentful_paint',\n largest_contentful_paint_element_selector:\n 'view.largest_contentful_paint_element_selector',\n cumulative_layout_shift: 'view.cumulative_layout_shift',\n first_input_delay: 'view.first_input_delay',\n loading_time: 'view.loading_time',\n dom_interactive: 'view.dom_interactive',\n dom_content_loaded: 'view.dom_content_loaded',\n dom_complete: 'view.dom_complete',\n load_event: 'view.load_event',\n first_input_time: 'view.first_input_time',\n first_paint_time: 'view.fpt',\n interaction_to_next_paint: 'view.interaction_to_next_paint',\n resource_load_time: 'view.resource_load_time',\n time_to_interactive: 'view.tti',\n dom: 'view.dom',\n dom_ready: 'view.dom_ready',\n time_spent: 'view.time_spent',\n first_byte: 'view.first_byte',\n page_states: '_gc.page_states',\n frustration_count: 'view.frustration.count',\n custom_timings: 'view.custom_timings'\n }\n },\n resource: {\n type: RumEventType.RESOURCE,\n tags: {\n trace_id: '_gc.trace_id',\n span_id: '_gc.span_id',\n resource_url: 'resource.url',\n resource_url_host: 'resource.url_host',\n resource_url_path: 'resource.url_path',\n resource_url_path_group: 'resource.url_path_group',\n resource_url_query: 'resource.url_query',\n resource_type: 'resource.type',\n resource_status: 'resource.status',\n resource_status_group: 'resource.status_group',\n resource_method: 'resource.method'\n },\n fields: {\n duration: 'resource.duration',\n resource_size: 'resource.size',\n resource_encode_size: 'resource.encode_size',\n resource_render_blocking_status: 'resource.render_blocking_status',\n resource_dns: 'resource.dns',\n resource_tcp: 'resource.tcp',\n resource_ssl: 'resource.ssl',\n resource_ttfb: 'resource.ttfb',\n resource_trans: 'resource.trans',\n resource_redirect: 'resource.redirect',\n resource_first_byte: 'resource.firstbyte',\n resource_dns_time: 'resource.dns_time',\n resource_download_time: 'resource.download_time',\n resource_first_byte_time: 'resource.first_byte_time',\n resource_connect_time: 'resource.connect_time',\n resource_ssl_time: 'resource.ssl_time',\n resource_redirect_time: 'resource.redirect_time'\n }\n },\n error: {\n type: RumEventType.ERROR,\n tags: {\n error_id: 'error.id',\n trace_id: '_gc.trace_id',\n span_id: '_gc.span_id',\n error_source: 'error.source',\n error_type: 'error.type',\n error_handling: 'error.handling'\n // resource_url: 'error.resource.url',\n // resource_url_host: 'error.resource.url_host',\n // resource_url_path: 'error.resource.url_path',\n // resource_url_path_group: 'error.resource.url_path_group',\n // resource_status: 'error.resource.status',\n // resource_status_group: 'error.resource.status_group',\n // resource_method: 'error.resource.method'\n },\n fields: {\n error_message: ['string', 'error.message'],\n error_stack: ['string', 'error.stack'],\n error_causes: ['string', 'error.causes']\n }\n },\n long_task: {\n type: RumEventType.LONG_TASK,\n tags: {\n long_task_id: 'long_task.id'\n },\n fields: {\n duration: 'long_task.duration'\n }\n },\n action: {\n type: RumEventType.ACTION,\n tags: {\n action_type: 'action.type'\n },\n fields: {\n action_name: 'action.target.name',\n duration: 'action.loading_time',\n action_error_count: 'action.error.count',\n action_resource_count: 'action.resource.count',\n action_frustration_types: 'action.frustration.type',\n action_long_task_count: 'action.long_task.count',\n action_target: '_gc.action.target',\n action_position: '_gc.action.position'\n }\n },\n telemetry: {\n type: 'telemetry',\n fields: {\n status: 'telemetry.status',\n message: ['string', 'telemetry.message'],\n type: 'telemetry.type',\n error_stack: ['string', 'telemetry.error.stack'],\n error_kind: ['string', 'telemetry.error.kind']\n }\n },\n browser_log: {\n type: RumEventType.LOGGER,\n tags: {\n error_source: 'error.source',\n error_type: 'error.type',\n error_resource_url: 'http.url',\n error_resource_url_host: 'http.url_host',\n error_resource_url_path: 'http.url_path',\n error_resource_url_path_group: 'http.url_path_group',\n error_resource_status: 'http.status_code',\n error_resource_status_group: 'http.status_group',\n error_resource_method: 'http.method',\n action_id: 'user_action.id',\n service: 'service',\n status: 'status'\n },\n fields: {\n message: ['string', 'message']\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACO,IAAIC,UAAU,GAAG;EACtBC,QAAQ,EAAE,cAAc;EACxBC,WAAW,EAAE,iBAAiB;EAC9BC,MAAM,EAAE,gBAAg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J8E,WAAW,EAAE;IACf,CAAC;IACD1E,MAAM,EAAE;MACN2E,WAAW,EAAE,oBAAoB;MACjChC,QAAQ,EAAE,qBAAqB;MAC/BiC,kBAAkB,EAAE,oBAAoB;MACxCC,qBAAqB,EAAE,uBAAuB;MAC9CC,wBAAwB,EAAE,yBAAyB;MACnDC,sBAAsB,EAAE,wBAAwB;MAChDC,aAAa,EAAE,mBAAmB;MAClCC,eAAe,EAAE;IACnB;EACF,CAAC;EACDC,SAAS,EAAE;IACTzF,IAAI,EAAE,WAAW;IACjBO,MAAM,EAAE;MACNmF,MAAM,EAAE,kBAAkB;MAC1BC,OAAO,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;MACxC3F,IAAI,EAAE,gBAAgB;MACtB0E,WAAW,EAAE,CAAC,QAAQ,EAAE,uBAAuB,CAAC;MAChDkB,UAAU,EAAE,CAAC,QAAQ,EAAE,sBAAsB;IAC/C;EACF,CAAC;EACDC,WAAW,EAAE;IACX7F,IAAI,EAAEC,mBAAY,CAAC6F,MAAM;IACzB3F,IAAI,EAAE;MACJmE,YAAY,EAAE,cAAc;MAC5BC,UAAU,EAAE,YAAY;MACxBwB,kBAAkB,EAAE,UAAU;MAC9BC,uBAAuB,EAAE,eAAe;MACxCC,uBAAuB,EAAE,eAAe;MACxCC,6BAA6B,EAAE,qBAAqB;MACpDC,qBAAqB,EAAE,kBAAkB;MACzCC,2BAA2B,EAAE,mBAAmB;MAChDC,qBAAqB,EAAE,aAAa;MACpC3G,SAAS,EAAE,gBAAgB;MAC3B7B,OAAO,EAAE,SAAS;MAClB6H,MAAM,EAAE;IACV,CAAC;IACDnF,MAAM,EAAE;MACNoF,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS;IAC/B;EACF;AACF,CAAC;AAAAnG,OAAA,CAAAM,OAAA,GAAAA,OAAA"}
1
+ {"version":3,"file":"dataMap.js","names":["_enums","require","commonTags","sdk_name","sdk_version","app_id","env","service","version","userid","user_email","user_name","session_id","session_type","session_sampling","is_signin","os","os_version","os_version_major","browser","browser_version","browser_version_major","screen_size","network_type","device","view_id","view_referrer","view_url","view_host","view_path","view_name","view_path_group","view_url_query","exports","commonFields","action_id","action_ids","view_in_foreground","display","session_has_replay","is_login","page_states","dataMap","view","type","RumEventType","VIEW","tags","view_loading_type","view_apdex_level","view_privacy_replay_level","fields","is_active","session_replay_stats","session_is_active","view_error_count","view_resource_count","view_long_task_count","view_action_count","first_contentful_paint","largest_contentful_paint","largest_contentful_paint_element_selector","cumulative_layout_shift","cumulative_layout_shift_target_selector","first_input_delay","loading_time","dom_interactive","dom_content_loaded","dom_complete","load_event","first_input_time","first_input_target_selector","first_paint_time","interaction_to_next_paint","interaction_to_next_paint_target_selector","resource_load_time","time_to_interactive","dom","dom_ready","time_spent","first_byte","frustration_count","custom_timings","resource","RESOURCE","trace_id","span_id","resource_url","resource_url_host","resource_url_path","resource_url_path_group","resource_url_query","resource_type","resource_status","resource_status_group","resource_method","duration","resource_size","resource_encode_size","resource_render_blocking_status","resource_dns","resource_tcp","resource_ssl","resource_ttfb","resource_trans","resource_redirect","resource_first_byte","resource_dns_time","resource_download_time","resource_first_byte_time","resource_connect_time","resource_ssl_time","resource_redirect_time","error","ERROR","error_id","error_source","error_type","error_handling","error_message","error_stack","error_causes","long_task","LONG_TASK","long_task_id","action","ACTION","action_type","action_name","action_error_count","action_resource_count","action_frustration_types","action_long_task_count","action_target","action_position","telemetry","status","message","error_kind","browser_log","LOGGER","error_resource_url","error_resource_url_host","error_resource_url_path","error_resource_url_path_group","error_resource_status","error_resource_status_group","error_resource_method"],"sources":["../src/dataMap.js"],"sourcesContent":["import { RumEventType } from './helper/enums'\nexport var commonTags = {\n sdk_name: '_gc.sdk_name',\n sdk_version: '_gc.sdk_version',\n app_id: 'application.id',\n env: 'env',\n service: 'service',\n version: 'version',\n userid: 'user.id',\n user_email: 'user.email',\n user_name: 'user.name',\n session_id: 'session.id',\n session_type: 'session.type',\n session_sampling: 'session.is_sampling',\n is_signin: 'user.is_signin',\n os: 'device.os',\n os_version: 'device.os_version',\n os_version_major: 'device.os_version_major',\n browser: 'device.browser',\n browser_version: 'device.browser_version',\n browser_version_major: 'device.browser_version_major',\n screen_size: 'device.screen_size',\n network_type: 'device.network_type',\n device: 'device.device',\n view_id: 'view.id',\n view_referrer: 'view.referrer',\n view_url: 'view.url',\n view_host: 'view.host',\n view_path: 'view.path',\n view_name: 'view.path', // 冗余一个字段\n view_path_group: 'view.path_group',\n view_url_query: 'view.url_query'\n}\nexport var commonFields = {\n action_id: 'action.id',\n action_ids: 'action.ids',\n view_in_foreground: 'view.in_foreground',\n display: 'display',\n session_has_replay: 'session.has_replay',\n is_login: 'user.is_login',\n page_states: '_gc.page_states'\n}\n// 需要用双引号将字符串类型的field value括起来, 这里有数组标示[string, path]\nexport var dataMap = {\n view: {\n type: RumEventType.VIEW,\n tags: {\n view_loading_type: 'view.loading_type',\n view_apdex_level: 'view.apdex_level',\n view_privacy_replay_level: 'privacy.replay_level'\n },\n fields: {\n is_active: 'view.is_active',\n session_replay_stats: '_gc.replay_stats',\n session_is_active: 'session.is_active',\n view_error_count: 'view.error.count',\n view_resource_count: 'view.resource.count',\n view_long_task_count: 'view.long_task.count',\n view_action_count: 'view.action.count',\n first_contentful_paint: 'view.first_contentful_paint',\n largest_contentful_paint: 'view.largest_contentful_paint',\n largest_contentful_paint_element_selector:\n 'view.largest_contentful_paint_element_selector',\n cumulative_layout_shift: 'view.cumulative_layout_shift',\n cumulative_layout_shift_target_selector:\n 'view.cumulative_layout_shift_target_selector',\n first_input_delay: 'view.first_input_delay',\n loading_time: 'view.loading_time',\n dom_interactive: 'view.dom_interactive',\n dom_content_loaded: 'view.dom_content_loaded',\n dom_complete: 'view.dom_complete',\n load_event: 'view.load_event',\n first_input_time: 'view.first_input_time',\n first_input_target_selector: 'view.first_input_target_selector',\n first_paint_time: 'view.fpt',\n interaction_to_next_paint: 'view.interaction_to_next_paint',\n interaction_to_next_paint_target_selector:\n 'view.interaction_to_next_paint_target_selector',\n resource_load_time: 'view.resource_load_time',\n time_to_interactive: 'view.tti',\n dom: 'view.dom',\n dom_ready: 'view.dom_ready',\n time_spent: 'view.time_spent',\n first_byte: 'view.first_byte',\n frustration_count: 'view.frustration.count',\n custom_timings: 'view.custom_timings'\n }\n },\n resource: {\n type: RumEventType.RESOURCE,\n tags: {\n trace_id: '_gc.trace_id',\n span_id: '_gc.span_id',\n resource_url: 'resource.url',\n resource_url_host: 'resource.url_host',\n resource_url_path: 'resource.url_path',\n resource_url_path_group: 'resource.url_path_group',\n resource_url_query: 'resource.url_query',\n resource_type: 'resource.type',\n resource_status: 'resource.status',\n resource_status_group: 'resource.status_group',\n resource_method: 'resource.method'\n },\n fields: {\n duration: 'resource.duration',\n resource_size: 'resource.size',\n resource_encode_size: 'resource.encode_size',\n resource_render_blocking_status: 'resource.render_blocking_status',\n resource_dns: 'resource.dns',\n resource_tcp: 'resource.tcp',\n resource_ssl: 'resource.ssl',\n resource_ttfb: 'resource.ttfb',\n resource_trans: 'resource.trans',\n resource_redirect: 'resource.redirect',\n resource_first_byte: 'resource.firstbyte',\n resource_dns_time: 'resource.dns_time',\n resource_download_time: 'resource.download_time',\n resource_first_byte_time: 'resource.first_byte_time',\n resource_connect_time: 'resource.connect_time',\n resource_ssl_time: 'resource.ssl_time',\n resource_redirect_time: 'resource.redirect_time'\n }\n },\n error: {\n type: RumEventType.ERROR,\n tags: {\n error_id: 'error.id',\n trace_id: '_gc.trace_id',\n span_id: '_gc.span_id',\n error_source: 'error.source',\n error_type: 'error.type',\n error_handling: 'error.handling'\n // resource_url: 'error.resource.url',\n // resource_url_host: 'error.resource.url_host',\n // resource_url_path: 'error.resource.url_path',\n // resource_url_path_group: 'error.resource.url_path_group',\n // resource_status: 'error.resource.status',\n // resource_status_group: 'error.resource.status_group',\n // resource_method: 'error.resource.method'\n },\n fields: {\n error_message: ['string', 'error.message'],\n error_stack: ['string', 'error.stack'],\n error_causes: ['string', 'error.causes']\n }\n },\n long_task: {\n type: RumEventType.LONG_TASK,\n tags: {\n long_task_id: 'long_task.id'\n },\n fields: {\n duration: 'long_task.duration'\n }\n },\n action: {\n type: RumEventType.ACTION,\n tags: {\n action_type: 'action.type'\n },\n fields: {\n action_name: 'action.target.name',\n duration: 'action.loading_time',\n action_error_count: 'action.error.count',\n action_resource_count: 'action.resource.count',\n action_frustration_types: 'action.frustration.type',\n action_long_task_count: 'action.long_task.count',\n action_target: '_gc.action.target',\n action_position: '_gc.action.position'\n }\n },\n telemetry: {\n type: 'telemetry',\n fields: {\n status: 'telemetry.status',\n message: ['string', 'telemetry.message'],\n type: 'telemetry.type',\n error_stack: ['string', 'telemetry.error.stack'],\n error_kind: ['string', 'telemetry.error.kind']\n }\n },\n browser_log: {\n type: RumEventType.LOGGER,\n tags: {\n error_source: 'error.source',\n error_type: 'error.type',\n error_resource_url: 'http.url',\n error_resource_url_host: 'http.url_host',\n error_resource_url_path: 'http.url_path',\n error_resource_url_path_group: 'http.url_path_group',\n error_resource_status: 'http.status_code',\n error_resource_status_group: 'http.status_group',\n error_resource_method: 'http.method',\n action_id: 'user_action.id',\n service: 'service',\n status: 'status'\n },\n fields: {\n message: ['string', 'message']\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACO,IAAIC,UAAU,GAAG;EACtBC,QAAQ,EAAE,cAAc;EACxBC,WAAW,EAAE,iBAAiB;EAC9BC,MAAM,EAAE,gBAAgB;EACxBC,GAAG,EAAE,KAAK;EACVC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,YAAY;EACxBC,SAAS,EAAE,WAAW;EACtBC,UAAU,EAAE,YAAY;EACxBC,YAAY,EAAE,cAAc;EAC5BC,gBAAgB,EAAE,qBAAqB;EACvCC,SAAS,EAAE,gBAAgB;EAC3BC,EAAE,EAAE,WAAW;EACfC,UAAU,EAAE,mBAAmB;EAC/BC,gBAAgB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E,wBAAwB;MAChDC,aAAa,EAAE,mBAAmB;MAClCC,eAAe,EAAE;IACnB;EACF,CAAC;EACDC,SAAS,EAAE;IACT3F,IAAI,EAAE,WAAW;IACjBO,MAAM,EAAE;MACNqF,MAAM,EAAE,kBAAkB;MAC1BC,OAAO,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;MACxC7F,IAAI,EAAE,gBAAgB;MACtB4E,WAAW,EAAE,CAAC,QAAQ,EAAE,uBAAuB,CAAC;MAChDkB,UAAU,EAAE,CAAC,QAAQ,EAAE,sBAAsB;IAC/C;EACF,CAAC;EACDC,WAAW,EAAE;IACX/F,IAAI,EAAEC,mBAAY,CAAC+F,MAAM;IACzB7F,IAAI,EAAE;MACJqE,YAAY,EAAE,cAAc;MAC5BC,UAAU,EAAE,YAAY;MACxBwB,kBAAkB,EAAE,UAAU;MAC9BC,uBAAuB,EAAE,eAAe;MACxCC,uBAAuB,EAAE,eAAe;MACxCC,6BAA6B,EAAE,qBAAqB;MACpDC,qBAAqB,EAAE,kBAAkB;MACzCC,2BAA2B,EAAE,mBAAmB;MAChDC,qBAAqB,EAAE,aAAa;MACpChH,SAAS,EAAE,gBAAgB;MAC3B5B,OAAO,EAAE,SAAS;MAClBiI,MAAM,EAAE;IACV,CAAC;IACDrF,MAAM,EAAE;MACNsF,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS;IAC/B;EACF;AACF,CAAC;AAAAxG,OAAA,CAAAS,OAAA,GAAAA,OAAA"}
@@ -15,6 +15,7 @@ var _tools = require("./tools");
15
15
  var _jsonStringify = require("../helper/serialisation/jsonStringify");
16
16
  var _tracekit = require("../tracekit");
17
17
  var _monitor = require("../helper/monitor");
18
+ var _sanitize = require("../helper/sanitize");
18
19
  var NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';
19
20
  exports.NO_ERROR_STACK_PRESENT_MESSAGE = NO_ERROR_STACK_PRESENT_MESSAGE;
20
21
  var ErrorSource = {
@@ -54,7 +55,7 @@ function computeRawError(data) {
54
55
  function computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError) {
55
56
  // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)
56
57
  // TODO rework tracekit integration to avoid scattering error building logic
57
- return stackTrace && stackTrace.message && stackTrace && stackTrace.name ? stackTrace.message : !isErrorInstance ? nonErrorPrefix + ' ' + (0, _jsonStringify.jsonStringify)(sanitize(originalError)) : 'Empty message';
58
+ return stackTrace && stackTrace.message && stackTrace && stackTrace.name ? stackTrace.message : !isErrorInstance ? nonErrorPrefix + ' ' + (0, _jsonStringify.jsonStringify)((0, _sanitize.sanitize)(originalError)) : 'Empty message';
58
59
  }
59
60
  function hasUsableStack(isErrorInstance, stackTrace) {
60
61
  if (stackTrace === undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"errorTools.js","names":["_tools","require","_jsonStringify","_tracekit","_monitor","NO_ERROR_STACK_PRESENT_MESSAGE","exports","ErrorSource","AGENT","CONSOLE","NETWORK","SOURCE","LOGGER","CUSTOM","computeRawError","data","stackTrace","originalError","handlingStack","startClocks","nonErrorPrefix","source","handling","isErrorInstance","Error","message","computeMessage","stack","hasUsableStack","toStackTraceString","causes","flattenErrorCauses","undefined","type","name","jsonStringify","sanitize","length","url","formatUnknownError","errorObject","createHandlingStack","internalFramesToSkip","error","formattedStack","e","noop","callMonitored","computeStackTrace","slice","result","formatErrorMessage","each","frame","func","args","join","line","column","getFileFromStackTraceString","execResult","exec","parentSource","currentError","cause","push"],"sources":["../../src/helper/errorTools.js"],"sourcesContent":["import { each, noop } from './tools'\nimport { jsonStringify } from '../helper/serialisation/jsonStringify'\nimport { computeStackTrace } from '../tracekit'\nimport { callMonitored } from '../helper/monitor'\nexport var NO_ERROR_STACK_PRESENT_MESSAGE =\n 'No stack, consider using an instance of Error'\nexport var ErrorSource = {\n AGENT: 'agent',\n CONSOLE: 'console',\n NETWORK: 'network',\n SOURCE: 'source',\n LOGGER: 'logger',\n CUSTOM: 'custom'\n}\n\nexport function computeRawError(data) {\n var stackTrace = data.stackTrace\n var originalError = data.originalError\n var handlingStack = data.handlingStack\n var startClocks = data.startClocks\n var nonErrorPrefix = data.nonErrorPrefix\n var source = data.source\n var handling = data.handling\n var isErrorInstance = originalError instanceof Error\n var message = computeMessage(\n stackTrace,\n isErrorInstance,\n nonErrorPrefix,\n originalError\n )\n var stack = hasUsableStack(isErrorInstance, stackTrace)\n ? toStackTraceString(stackTrace)\n : NO_ERROR_STACK_PRESENT_MESSAGE\n var causes = isErrorInstance\n ? flattenErrorCauses(originalError, source)\n : undefined\n var type = stackTrace && stackTrace.name\n\n return {\n startClocks: startClocks,\n source: source,\n handling: handling,\n originalError: originalError,\n message: message,\n stack: stack,\n handlingStack: handlingStack,\n type: type,\n causes: causes\n }\n}\nfunction computeMessage(\n stackTrace,\n isErrorInstance,\n nonErrorPrefix,\n originalError\n) {\n // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)\n // TODO rework tracekit integration to avoid scattering error building logic\n return stackTrace && stackTrace.message && stackTrace && stackTrace.name\n ? stackTrace.message\n : !isErrorInstance\n ? nonErrorPrefix + ' ' + jsonStringify(sanitize(originalError))\n : 'Empty message'\n}\nfunction hasUsableStack(isErrorInstance, stackTrace) {\n if (stackTrace === undefined) {\n return false\n }\n if (isErrorInstance) {\n return true\n }\n // handle cases where tracekit return stack = [] or stack = [{url: undefined, line: undefined, column: undefined}]\n // TODO rework tracekit integration to avoid generating those unusable stack\n return (\n stackTrace.stack.length > 0 &&\n (stackTrace.stack.length > 1 || stackTrace.stack[0].url !== undefined)\n )\n}\n\nexport function formatUnknownError(\n stackTrace,\n errorObject,\n nonErrorPrefix,\n handlingStack\n) {\n if (\n !stackTrace ||\n (stackTrace.message === undefined && !(errorObject instanceof Error))\n ) {\n return {\n message: nonErrorPrefix + '' + jsonStringify(errorObject),\n stack: 'No stack, consider using an instance of Error',\n handlingStack: handlingStack,\n type: stackTrace && stackTrace.name\n }\n }\n return {\n message: stackTrace.message || 'Empty message',\n stack: toStackTraceString(stackTrace),\n handlingStack: handlingStack,\n type: stackTrace.name\n }\n}\n/**\n Creates a stacktrace without SDK internal frames.\n \n Constraints:\n - Has to be called at the utmost position of the call stack.\n - No internal monitoring should encapsulate the function, that is why we need to use callMonitored inside of it.\n */\nexport function createHandlingStack() {\n /**\n * Skip the two internal frames:\n * - SDK API (console.error, ...)\n * - this function\n * in order to keep only the user calls\n */\n var internalFramesToSkip = 2\n var error = new Error()\n var formattedStack\n\n // IE needs to throw the error to fill in the stack trace\n if (!error.stack) {\n try {\n throw error\n } catch (e) {\n noop()\n }\n }\n callMonitored(function () {\n var stackTrace = computeStackTrace(error)\n stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip)\n formattedStack = toStackTraceString(stackTrace)\n })\n\n return formattedStack\n}\nexport function toStackTraceString(stack) {\n var result = formatErrorMessage(stack)\n each(stack.stack, function (frame) {\n var func = frame.func === '?' ? '<anonymous>' : frame.func\n var args =\n frame.args && frame.args.length > 0\n ? '(' + frame.args.join(', ') + ')'\n : ''\n var line = frame.line ? ':' + frame.line : ''\n var column = frame.line && frame.column ? ':' + frame.column : ''\n result += '\\n at ' + func + args + ' @ ' + frame.url + line + column\n })\n return result\n}\nexport function formatErrorMessage(stack) {\n return (stack.name || 'Error') + ': ' + stack.message\n}\nexport function getFileFromStackTraceString(stack) {\n var execResult = /@ (.+)/.exec(stack)\n return execResult && execResult[1]\n}\nexport function flattenErrorCauses(error, parentSource) {\n var currentError = error\n var causes = []\n while (\n currentError &&\n currentError.cause instanceof Error &&\n causes.length < 10\n ) {\n var stackTrace = computeStackTrace(currentError.cause)\n causes.push({\n message: currentError.cause.message,\n source: parentSource,\n type: stackTrace && stackTrace.name,\n stack: stackTrace && toStackTraceString(stackTrace)\n })\n currentError = currentError.cause\n }\n return causes.length ? causes : undefined\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAC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Y,CAACC,KAAK;EACnC;EACA,OAAOlC,MAAM,CAACO,MAAM,GAAGP,MAAM,GAAGE,SAAS;AAC3C"}
1
+ {"version":3,"file":"errorTools.js","names":["_tools","require","_jsonStringify","_tracekit","_monitor","_sanitize","NO_ERROR_STACK_PRESENT_MESSAGE","exports","ErrorSource","AGENT","CONSOLE","NETWORK","SOURCE","LOGGER","CUSTOM","computeRawError","data","stackTrace","originalError","handlingStack","startClocks","nonErrorPrefix","source","handling","isErrorInstance","Error","message","computeMessage","stack","hasUsableStack","toStackTraceString","causes","flattenErrorCauses","undefined","type","name","jsonStringify","sanitize","length","url","formatUnknownError","errorObject","createHandlingStack","internalFramesToSkip","error","formattedStack","e","noop","callMonitored","computeStackTrace","slice","result","formatErrorMessage","each","frame","func","args","join","line","column","getFileFromStackTraceString","execResult","exec","parentSource","currentError","cause","push"],"sources":["../../src/helper/errorTools.js"],"sourcesContent":["import { each, noop } from './tools'\nimport { jsonStringify } from '../helper/serialisation/jsonStringify'\nimport { computeStackTrace } from '../tracekit'\nimport { callMonitored } from '../helper/monitor'\nimport { sanitize } from '../helper/sanitize'\nexport var NO_ERROR_STACK_PRESENT_MESSAGE =\n 'No stack, consider using an instance of Error'\nexport var ErrorSource = {\n AGENT: 'agent',\n CONSOLE: 'console',\n NETWORK: 'network',\n SOURCE: 'source',\n LOGGER: 'logger',\n CUSTOM: 'custom'\n}\n\nexport function computeRawError(data) {\n var stackTrace = data.stackTrace\n var originalError = data.originalError\n var handlingStack = data.handlingStack\n var startClocks = data.startClocks\n var nonErrorPrefix = data.nonErrorPrefix\n var source = data.source\n var handling = data.handling\n var isErrorInstance = originalError instanceof Error\n var message = computeMessage(\n stackTrace,\n isErrorInstance,\n nonErrorPrefix,\n originalError\n )\n var stack = hasUsableStack(isErrorInstance, stackTrace)\n ? toStackTraceString(stackTrace)\n : NO_ERROR_STACK_PRESENT_MESSAGE\n var causes = isErrorInstance\n ? flattenErrorCauses(originalError, source)\n : undefined\n var type = stackTrace && stackTrace.name\n\n return {\n startClocks: startClocks,\n source: source,\n handling: handling,\n originalError: originalError,\n message: message,\n stack: stack,\n handlingStack: handlingStack,\n type: type,\n causes: causes\n }\n}\nfunction computeMessage(\n stackTrace,\n isErrorInstance,\n nonErrorPrefix,\n originalError\n) {\n // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)\n // TODO rework tracekit integration to avoid scattering error building logic\n return stackTrace && stackTrace.message && stackTrace && stackTrace.name\n ? stackTrace.message\n : !isErrorInstance\n ? nonErrorPrefix + ' ' + jsonStringify(sanitize(originalError))\n : 'Empty message'\n}\nfunction hasUsableStack(isErrorInstance, stackTrace) {\n if (stackTrace === undefined) {\n return false\n }\n if (isErrorInstance) {\n return true\n }\n // handle cases where tracekit return stack = [] or stack = [{url: undefined, line: undefined, column: undefined}]\n // TODO rework tracekit integration to avoid generating those unusable stack\n return (\n stackTrace.stack.length > 0 &&\n (stackTrace.stack.length > 1 || stackTrace.stack[0].url !== undefined)\n )\n}\n\nexport function formatUnknownError(\n stackTrace,\n errorObject,\n nonErrorPrefix,\n handlingStack\n) {\n if (\n !stackTrace ||\n (stackTrace.message === undefined && !(errorObject instanceof Error))\n ) {\n return {\n message: nonErrorPrefix + '' + jsonStringify(errorObject),\n stack: 'No stack, consider using an instance of Error',\n handlingStack: handlingStack,\n type: stackTrace && stackTrace.name\n }\n }\n return {\n message: stackTrace.message || 'Empty message',\n stack: toStackTraceString(stackTrace),\n handlingStack: handlingStack,\n type: stackTrace.name\n }\n}\n/**\n Creates a stacktrace without SDK internal frames.\n \n Constraints:\n - Has to be called at the utmost position of the call stack.\n - No internal monitoring should encapsulate the function, that is why we need to use callMonitored inside of it.\n */\nexport function createHandlingStack() {\n /**\n * Skip the two internal frames:\n * - SDK API (console.error, ...)\n * - this function\n * in order to keep only the user calls\n */\n var internalFramesToSkip = 2\n var error = new Error()\n var formattedStack\n\n // IE needs to throw the error to fill in the stack trace\n if (!error.stack) {\n try {\n throw error\n } catch (e) {\n noop()\n }\n }\n callMonitored(function () {\n var stackTrace = computeStackTrace(error)\n stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip)\n formattedStack = toStackTraceString(stackTrace)\n })\n\n return formattedStack\n}\nexport function toStackTraceString(stack) {\n var result = formatErrorMessage(stack)\n each(stack.stack, function (frame) {\n var func = frame.func === '?' ? '<anonymous>' : frame.func\n var args =\n frame.args && frame.args.length > 0\n ? '(' + frame.args.join(', ') + ')'\n : ''\n var line = frame.line ? ':' + frame.line : ''\n var column = frame.line && frame.column ? ':' + frame.column : ''\n result += '\\n at ' + func + args + ' @ ' + frame.url + line + column\n })\n return result\n}\nexport function formatErrorMessage(stack) {\n return (stack.name || 'Error') + ': ' + stack.message\n}\nexport function getFileFromStackTraceString(stack) {\n var execResult = /@ (.+)/.exec(stack)\n return execResult && execResult[1]\n}\nexport function flattenErrorCauses(error, parentSource) {\n var currentError = error\n var causes = []\n while (\n currentError &&\n currentError.cause instanceof Error &&\n causes.length < 10\n ) {\n var stackTrace = computeStackTrace(currentError.cause)\n causes.push({\n message: currentError.cause.message,\n source: parentSource,\n type: stackTrace && stackTrace.name,\n stack: stackTrace && toStackTraceString(stackTrace)\n })\n currentError = currentError.cause\n }\n return causes.length ? causes : undefined\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACO,IAAIK,8BAA8B,GACvC,+CAA+C;AAAAC,OAAA,CAAAD,8BAAA,GAAAA,8BAAA;AAC1C,IAAIE,WAAW,GAAG;EACvBC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE;AACV,CAAC;AAAAP,OAAA,CAAAC,W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AM;EACvE,CAAC,CAAC;EACF,OAAOR,MAAM;AACf;AACO,SAASC,kBAAkBA,CAACxB,KAAK,EAAE;EACxC,OAAO,CAACA,KAAK,CAACO,IAAI,IAAI,OAAO,IAAI,IAAI,GAAGP,KAAK,CAACF,OAAO;AACvD;AACO,SAASkC,2BAA2BA,CAAChC,KAAK,EAAE;EACjD,IAAIiC,UAAU,GAAG,QAAQ,CAACC,IAAI,CAAClC,KAAK,CAAC;EACrC,OAAOiC,UAAU,IAAIA,UAAU,CAAC,CAAC,CAAC;AACpC;AACO,SAAS7B,kBAAkBA,CAACY,KAAK,EAAEmB,YAAY,EAAE;EACtD,IAAIC,YAAY,GAAGpB,KAAK;EACxB,IAAIb,MAAM,GAAG,EAAE;EACf,OACEiC,YAAY,IACZA,YAAY,CAACC,KAAK,YAAYxC,KAAK,IACnCM,MAAM,CAACO,MAAM,GAAG,EAAE,EAClB;IACA,IAAIrB,UAAU,GAAG,IAAAgC,2BAAiB,EAACe,YAAY,CAACC,KAAK,CAAC;IACtDlC,MAAM,CAACmC,IAAI,CAAC;MACVxC,OAAO,EAAEsC,YAAY,CAACC,KAAK,CAACvC,OAAO;MACnCJ,MAAM,EAAEyC,YAAY;MACpB7B,IAAI,EAAEjB,UAAU,IAAIA,UAAU,CAACkB,IAAI;MACnCP,KAAK,EAAEX,UAAU,IAAIa,kBAAkB,CAACb,UAAU;IACpD,CAAC,CAAC;IACF+C,YAAY,GAAGA,YAAY,CAACC,KAAK;EACnC;EACA,OAAOlC,MAAM,CAACO,MAAM,GAAGP,MAAM,GAAGE,SAAS;AAC3C"}
@@ -43,6 +43,7 @@ function callMonitored(fn, context, args) {
43
43
  }
44
44
  function displayIfDebugEnabled(api) {
45
45
  var args = [].slice.call(arguments, 1);
46
+ // display.apply(null, [api, '[MONITOR]'].concat(args))
46
47
  if (debugMode) {
47
48
  _display.display.apply(null, [api, '[MONITOR]'].concat(args));
48
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"monitor.js","names":["_display","require","onMonitorErrorCollected","debugMode","startMonitorErrorCollection","newOnMonitorErrorCollected","setDebugMode","newDebugMode","resetMonitor","undefined","monitor","fn","callMonitored","arguments","context","args","apply","e","displayIfDebugEnabled","ConsoleApiName","error","api","slice","call","display","concat"],"sources":["../../src/helper/monitor.js"],"sourcesContent":["import { ConsoleApiName, display } from './display'\nvar onMonitorErrorCollected\nvar debugMode = false\n\nexport function startMonitorErrorCollection(newOnMonitorErrorCollected) {\n onMonitorErrorCollected = newOnMonitorErrorCollected\n}\n\nexport function setDebugMode(newDebugMode) {\n debugMode = newDebugMode\n}\n\nexport function resetMonitor() {\n onMonitorErrorCollected = undefined\n debugMode = false\n}\n\nexport function monitor(fn) {\n return function () {\n return callMonitored(fn, this, arguments)\n }\n}\n\nexport function callMonitored(fn, context, args) {\n try {\n return fn.apply(context, args)\n } catch (e) {\n displayIfDebugEnabled(ConsoleApiName.error, e)\n if (onMonitorErrorCollected) {\n try {\n onMonitorErrorCollected(e)\n } catch (e) {\n displayIfDebugEnabled(ConsoleApiName.error, e)\n }\n }\n }\n}\n\nexport function displayIfDebugEnabled(api) {\n var args = [].slice.call(arguments, 1)\n if (debugMode) {\n display.apply(null, [api, '[MONITOR]'].concat(args))\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAIC,uBAAuB;AAC3B,IAAIC,SAAS,GAAG,KAAK;AAEd,SAASC,2BAA2BA,CAACC,0BAA0B,EAAE;EACtEH,uBAAuB,GAAGG,0BAA0B;AACtD;AAEO,SAASC,YAAYA,CAACC,YAAY,EAAE;EACzCJ,SAAS,GAAGI,YAAY;AAC1B;AAEO,SAASC,YAAYA,CAAA,EAAG;EAC7BN,uBAAuB,GAAGO,SAAS;EACnCN,SAAS,GAAG,KAAK;AACnB;AAEO,SAASO,OAAOA,CAACC,EAAE,EAAE;EAC1B,OAAO,YAAY;IACjB,OAAOC,aAAa,CAACD,EAAE,EAAE,IAAI,EAAEE,SAAS,CAAC;EAC3C,CAAC;AACH;AAEO,SAASD,aAAaA,CAACD,EAAE,EAAEG,OAAO,EAAEC,IAAI,EAAE;EAC/C,IAAI;IACF,OAAOJ,EAAE,CAACK,KAAK,CAACF,OAAO,EAAEC,IAAI,CAAC;EAChC,CAAC,CAAC,OAAOE,CAAC,EAAE;IACVC,qBAAqB,CAACC,uBAAc,CAACC,KAAK,EAAEH,CAAC,CAAC;IAC9C,IAAIf,uBAAuB,EAAE;MAC3B,IAAI;QACFA,uBAAuB,CAACe,CAAC,CAAC;MAC5B,CAAC,CAAC,OAAOA,CAAC,EAAE;QACVC,qBAAqB,CAACC,uBAAc,CAACC,KAAK,EAAEH,CAAC,CAAC;MAChD;IACF;EACF;AACF;AAEO,SAASC,qBAAqBA,CAACG,GAAG,EAAE;EACzC,IAAIN,IAAI,GAAG,EAAE,CAACO,KAAK,CAACC,IAAI,CAACV,SAAS,EAAE,CAAC,CAAC;EACtC,IAAIV,SAAS,EAAE;IACbqB,gBAAO,CAACR,KAAK,CAAC,IAAI,EAAE,CAACK,GAAG,EAAE,WAAW,CAAC,CAACI,MAAM,CAACV,IAAI,CAAC,CAAC;EACtD;AACF"}
1
+ {"version":3,"file":"monitor.js","names":["_display","require","onMonitorErrorCollected","debugMode","startMonitorErrorCollection","newOnMonitorErrorCollected","setDebugMode","newDebugMode","resetMonitor","undefined","monitor","fn","callMonitored","arguments","context","args","apply","e","displayIfDebugEnabled","ConsoleApiName","error","api","slice","call","display","concat"],"sources":["../../src/helper/monitor.js"],"sourcesContent":["import { ConsoleApiName, display } from './display'\nvar onMonitorErrorCollected\nvar debugMode = false\n\nexport function startMonitorErrorCollection(newOnMonitorErrorCollected) {\n onMonitorErrorCollected = newOnMonitorErrorCollected\n}\n\nexport function setDebugMode(newDebugMode) {\n debugMode = newDebugMode\n}\n\nexport function resetMonitor() {\n onMonitorErrorCollected = undefined\n debugMode = false\n}\n\nexport function monitor(fn) {\n return function () {\n return callMonitored(fn, this, arguments)\n }\n}\n\nexport function callMonitored(fn, context, args) {\n try {\n return fn.apply(context, args)\n } catch (e) {\n displayIfDebugEnabled(ConsoleApiName.error, e)\n if (onMonitorErrorCollected) {\n try {\n onMonitorErrorCollected(e)\n } catch (e) {\n displayIfDebugEnabled(ConsoleApiName.error, e)\n }\n }\n }\n}\n\nexport function displayIfDebugEnabled(api) {\n var args = [].slice.call(arguments, 1)\n // display.apply(null, [api, '[MONITOR]'].concat(args))\n if (debugMode) {\n display.apply(null, [api, '[MONITOR]'].concat(args))\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAIC,uBAAuB;AAC3B,IAAIC,SAAS,GAAG,KAAK;AAEd,SAASC,2BAA2BA,CAACC,0BAA0B,EAAE;EACtEH,uBAAuB,GAAGG,0BAA0B;AACtD;AAEO,SAASC,YAAYA,CAACC,YAAY,EAAE;EACzCJ,SAAS,GAAGI,YAAY;AAC1B;AAEO,SAASC,YAAYA,CAAA,EAAG;EAC7BN,uBAAuB,GAAGO,SAAS;EACnCN,SAAS,GAAG,KAAK;AACnB;AAEO,SAASO,OAAOA,CAACC,EAAE,EAAE;EAC1B,OAAO,YAAY;IACjB,OAAOC,aAAa,CAACD,EAAE,EAAE,IAAI,EAAEE,SAAS,CAAC;EAC3C,CAAC;AACH;AAEO,SAASD,aAAaA,CAACD,EAAE,EAAEG,OAAO,EAAEC,IAAI,EAAE;EAC/C,IAAI;IACF,OAAOJ,EAAE,CAACK,KAAK,CAACF,OAAO,EAAEC,IAAI,CAAC;EAChC,CAAC,CAAC,OAAOE,CAAC,EAAE;IACVC,qBAAqB,CAACC,uBAAc,CAACC,KAAK,EAAEH,CAAC,CAAC;IAC9C,IAAIf,uBAAuB,EAAE;MAC3B,IAAI;QACFA,uBAAuB,CAACe,CAAC,CAAC;MAC5B,CAAC,CAAC,OAAOA,CAAC,EAAE;QACVC,qBAAqB,CAACC,uBAAc,CAACC,KAAK,EAAEH,CAAC,CAAC;MAChD;IACF;EACF;AACF;AAEO,SAASC,qBAAqBA,CAACG,GAAG,EAAE;EACzC,IAAIN,IAAI,GAAG,EAAE,CAACO,KAAK,CAACC,IAAI,CAACV,SAAS,EAAE,CAAC,CAAC;EACtC;EACA,IAAIV,SAAS,EAAE;IACbqB,gBAAO,CAACR,KAAK,CAAC,IAAI,EAAE,CAACK,GAAG,EAAE,WAAW,CAAC,CAACI,MAAM,CAACV,IAAI,CAAC,CAAC;EACtD;AACF"}
@@ -21,12 +21,14 @@ function escapeRowData(str) {
21
21
  return '\\' + word;
22
22
  });
23
23
  }
24
- function escapeJsonValue(value) {
25
- if ((0, _tools.isString)(value)) {
26
- return value;
27
- } else {
28
- return (0, _jsonStringify.jsonStringify)(value);
24
+ function escapeJsonValue(value, isTag) {
25
+ if (_typeof(value) === 'object' && value) {
26
+ value = (0, _jsonStringify.jsonStringify)(value);
27
+ } else if (isTag) {
28
+ // tag json 只能是字符串
29
+ value = '' + value;
29
30
  }
31
+ return value;
30
32
  }
31
33
  function escapeFieldValueStr(str) {
32
34
  return '"' + str.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
@@ -1 +1 @@
1
- {"version":3,"file":"rowData.js","names":["_jsonStringify","require","_tools","_typeof","obj","Symbol","iterator","constructor","prototype","escapeRowData","str","jsonStringify","isString","reg","String","replace","word","escapeJsonValue","value","escapeFieldValueStr","escapeRowField"],"sources":["../../../src/helper/serialisation/rowData.js"],"sourcesContent":["import { jsonStringify } from './jsonStringify'\nimport { isString } from '../tools'\nexport function escapeRowData(str) {\n if (typeof str === 'object' && str) {\n str = jsonStringify(str)\n } else if (!isString(str)) {\n return str\n }\n var reg = /[\\s=,\"]/g\n return String(str).replace(reg, function (word) {\n return '\\\\' + word\n })\n}\n\nexport function escapeJsonValue(value) {\n if (isString(value)) {\n return value\n } else {\n return jsonStringify(value)\n }\n}\n\nexport function escapeFieldValueStr(str) {\n return '\"' + str.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"') + '\"'\n}\nexport function escapeRowField(value) {\n if (typeof value === 'object' && value) {\n return escapeFieldValueStr(jsonStringify(value))\n } else if (isString(value)) {\n return escapeFieldValueStr(value)\n } else {\n return value\n }\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAmC,SAAAE,QAAAC,GAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,GAAA,kBAAAA,GAAA,gBAAAA,GAAA,WAAAA,GAAA,yBAAAC,MAAA,IAAAD,GAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,GAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,GAAA,KAAAD,OAAA,CAAAC,GAAA;AAC5B,SAASK,aAAaA,CAACC,GAAG,EAAE;EACjC,IAAIP,OAAA,CAAOO,GAAG,MAAK,QAAQ,IAAIA,GAAG,EAAE;IAClCA,GAAG,GAAG,IAAAC,4BAAa,EAACD,GAAG,CAAC;EAC1B,CAAC,MAAM,IAAI,CAAC,IAAAE,eAAQ,EAACF,GAAG,CAAC,EAAE;IACzB,OAAOA,GAAG;EACZ;EACA,IAAIG,GAAG,GAAG,UAAU;EACpB,OAAOC,MAAM,CAACJ,GAAG,CAAC,CAACK,OAAO,CAACF,GAAG,EAAE,UAAUG,IAAI,EAAE;IAC9C,OAAO,IAAI,GAAGA,IAAI;EACpB,CAAC,CAAC;AACJ;AAEO,SAASC,eAAeA,CAACC,KAAK,EAAE;EACrC,IAAI,IAAAN,eAAQ,EAACM,KAAK,CAAC,EAAE;IACnB,OAAOA,KAAK;EACd,CAAC,MAAM;IACL,OAAO,IAAAP,4BAAa,EAACO,KAAK,CAAC;EAC7B;AACF;AAEO,SAASC,mBAAmBA,CAACT,GAAG,EAAE;EACvC,OAAO,GAAG,GAAGA,GAAG,CAACK,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,GAAG;AACpE;AACO,SAASK,cAAcA,CAACF,KAAK,EAAE;EACpC,IAAIf,OAAA,CAAOe,KAAK,MAAK,QAAQ,IAAIA,KAAK,EAAE;IACtC,OAAOC,mBAAmB,CAAC,IAAAR,4BAAa,EAACO,KAAK,CAAC,CAAC;EAClD,CAAC,MAAM,IAAI,IAAAN,eAAQ,EAACM,KAAK,CAAC,EAAE;IAC1B,OAAOC,mBAAmB,CAACD,KAAK,CAAC;EACnC,CAAC,MAAM;IACL,OAAOA,KAAK;EACd;AACF"}
1
+ {"version":3,"file":"rowData.js","names":["_jsonStringify","require","_tools","_typeof","obj","Symbol","iterator","constructor","prototype","escapeRowData","str","jsonStringify","isString","reg","String","replace","word","escapeJsonValue","value","isTag","escapeFieldValueStr","escapeRowField"],"sources":["../../../src/helper/serialisation/rowData.js"],"sourcesContent":["import { jsonStringify } from './jsonStringify'\nimport { isString, isNumber } from '../tools'\nexport function escapeRowData(str) {\n if (typeof str === 'object' && str) {\n str = jsonStringify(str)\n } else if (!isString(str)) {\n return str\n }\n var reg = /[\\s=,\"]/g\n return String(str).replace(reg, function (word) {\n return '\\\\' + word\n })\n}\n\nexport function escapeJsonValue(value, isTag) {\n if (typeof value === 'object' && value) {\n value = jsonStringify(value)\n } else if (isTag) {\n // tag json 只能是字符串\n value = '' + value\n }\n\n return value\n}\n\nexport function escapeFieldValueStr(str) {\n return '\"' + str.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"') + '\"'\n}\nexport function escapeRowField(value) {\n if (typeof value === 'object' && value) {\n return escapeFieldValueStr(jsonStringify(value))\n } else if (isString(value)) {\n return escapeFieldValueStr(value)\n } else {\n return value\n }\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAA6C,SAAAE,QAAAC,GAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aA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C;EAClD,CAAC,MAAM,IAAI,IAAAN,eAAQ,EAACM,KAAK,CAAC,EAAE;IAC1B,OAAOE,mBAAmB,CAACF,KAAK,CAAC;EACnC,CAAC,MAAM;IACL,OAAOA,KAAK;EACd;AACF"}
@@ -330,6 +330,7 @@ var matchList = function matchList(list, value, useStartsWith) {
330
330
  } catch (e) {
331
331
  _display.display.error(e);
332
332
  }
333
+ return false;
333
334
  });
334
335
  };
335
336
  // https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/selector/escapeSelector.js