@arms/rum-browser
Advanced tools
Comparing version 0.0.24-beta.1 to 0.0.24-beta.2
@@ -1,3 +0,3 @@ | ||
"use strict";exports.__esModule=!0,exports["default"]=void 0;var _rumCore=require("@arms/rum-core"),_base=require("../../utils/base"),_url=require("../../utils/url"),_global=require("../../utils/global"),PerfCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="perf-collector",this.ctx=void 0,this.sendEvent=void 0,this.sendPerf=function(){setTimeout(function(){var b=performance.getEntriesByType("navigation")[0];if(b){var c=b.loadEventEnd,d=b.domInteractive,e=b.domContentLoadedEventEnd,f=b.domComplete,g=performance.getEntriesByType("paint").find(function(a){var b=a.name;return"first-contentful-paint"===b})||{},h=g.startTime;a.sendEvent({event_type:_rumCore.RumEventType.VIEW,type:"perf",url:(0,_url.getCurrentURL)(),referrer:_global.document.referrer||"",loading_type:"initial_load",timing_data:JSON.stringify(b),// Measure | ||
"use strict";exports.__esModule=!0,exports["default"]=void 0;var _rumCore=require("@arms/rum-core"),_base=require("../../utils/base"),_url=require("../../utils/url"),_global=require("../../utils/global"),PerfCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="perf-collector",this.ctx=void 0,this.sendEvent=void 0,this.sendPerf=function(){setTimeout(function(){var b=performance.getEntriesByType("navigation")[0],c=b.loadEventEnd,d=b.domInteractive,e=b.domContentLoadedEventEnd,f=b.domComplete,g=performance.getEntriesByType("paint").find(function(a){var b=a.name;return"first-contentful-paint"===b})||{},h=g.startTime;a.sendEvent({event_type:_rumCore.RumEventType.VIEW,type:"perf",url:(0,_url.getCurrentURL)(),referrer:_global.document.referrer||"",loading_type:"initial_load",timing_data:JSON.stringify(b),// Measure | ||
// loading_time: formatNumber(loadEventEnd), // 同FMP,基于DOM突变稳定来计算 | ||
first_contentful_paint:(0,_base.formatNumber)(h),dom_interactive:(0,_base.formatNumber)(d),dom_content_loaded:(0,_base.formatNumber)(e),dom_complete:(0,_base.formatNumber)(f),load_event:(0,_base.formatNumber)(c)})}},0)}}var b=a.prototype;return b.setup=function setup(a,b){var c=a.getConfig(),d=c.collectors,e=void 0===d?{}:d;!1===e.perf||(this.ctx=a,this.sendEvent=b,_global.global.addEventListener("load",this.sendPerf))},b.destroy=function destroy(){_global.global.removeEventListener("load",this.sendPerf)},a}(); | ||
first_contentful_paint:(0,_base.formatNumber)(h),dom_interactive:(0,_base.formatNumber)(d),dom_content_loaded:(0,_base.formatNumber)(e),dom_complete:(0,_base.formatNumber)(f),load_event:(0,_base.formatNumber)(c)})},0)}}var b=a.prototype;return b.setup=function setup(a,b){var c=a.getConfig(),d=c.collectors,e=void 0===d?{}:d;!1===e.perf||(this.ctx=a,this.sendEvent=b,_global.global.addEventListener("load",this.sendPerf))},b.destroy=function destroy(){_global.global.removeEventListener("load",this.sendPerf)},a}(); |
@@ -1,1 +0,1 @@ | ||
"use strict";var _shell=_interopRequireWildcard(require("./shell"));exports.__esModule=!0,exports["default"]=void 0;exports.ArmsRum=_shell.ArmsRum;function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&Object.prototype.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e["default"]=b,d&&d.set(b,e),e}var _default=exports["default"]=_shell["default"]; | ||
"use strict";var _shell=_interopRequireWildcard(require("./shell"));exports.__esModule=!0,exports["default"]=void 0;exports.ArmsRum=_shell.ArmsRum;function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&{}.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e["default"]=b,d&&d.set(b,e),e}var _default=exports["default"]=_shell["default"]; |
@@ -1,5 +0,5 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=exports.ArmsRum=void 0;var _extends3=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_inheritsLoose2=_interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose")),_rumCore=require("@arms/rum-core"),_pv=_interopRequireDefault(require("./collector/view/pv")),_exception=_interopRequireDefault(require("./collector/exception")),_perf=_interopRequireDefault(require("./collector/view/perf")),_webvitals=_interopRequireDefault(require("./collector/view/webvitals")),_api=_interopRequireDefault(require("./collector/resource/api")),_staticResource=_interopRequireDefault(require("./collector/resource/static-resource")),_click=_interopRequireDefault(require("./collector/action/click")),_defaultProcessor=_interopRequireDefault(require("./processor/default-processor")),_sessionProcessor=_interopRequireDefault(require("./processor/session-processor")),_reporter=_interopRequireDefault(require("./reporter")),_global=require("./utils/global"),ArmsRum=exports.ArmsRum=/*#__PURE__*/function(a){function b(){return a.apply(this,arguments)||this}(0,_inheritsLoose2["default"])(b,a);var c=b.prototype;return c.init=/** | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=exports.ArmsRum=void 0;var _extends3=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_inheritsLoose2=_interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose")),_rumCore=require("@arms/rum-core"),_pv=_interopRequireDefault(require("./collector/view/pv")),_exception=_interopRequireDefault(require("./collector/exception")),_blank=_interopRequireDefault(require("./collector/exception/blank")),_perf=_interopRequireDefault(require("./collector/view/perf")),_webvitals=_interopRequireDefault(require("./collector/view/webvitals")),_api=_interopRequireDefault(require("./collector/resource/api")),_staticResource=_interopRequireDefault(require("./collector/resource/static-resource")),_click=_interopRequireDefault(require("./collector/action/click")),_defaultProcessor=_interopRequireDefault(require("./processor/default-processor")),_sessionProcessor=_interopRequireDefault(require("./processor/session-processor")),_reporter=_interopRequireDefault(require("./reporter")),_global=require("./utils/global"),ArmsRum=exports.ArmsRum=/*#__PURE__*/function(a){function b(){return a.apply(this,arguments)||this}(0,_inheritsLoose2["default"])(b,a);var c=b.prototype;return c.init=/** | ||
* 初始化 | ||
*/function init(a){this.client.useCollectors([new _pv["default"],new _perf["default"],new _webvitals["default"],new _exception["default"],new _api["default"],new _staticResource["default"],new _click["default"]]),this.client.useProcessors([new _defaultProcessor["default"],new _sessionProcessor["default"]]),this.client.useReporter(new _reporter["default"]),this.client.init(a)},c.getConfig=function getConfig(){return this.client.getContext().getConfig()},c.setConfig=function setConfig(){var a=this.client.getContext();if(2===arguments.length){var b,c=this.client.getContext(),d=c.getConfig();c.setConfig((0,_extends3["default"])({},d,(b={},b[0>=arguments.length?void 0:arguments[0]]=1>=arguments.length?void 0:arguments[1],b)))}else a.setConfig(0>=arguments.length?void 0:arguments[0])},b}(_rumCore.Shell),_default=exports["default"]=new ArmsRum(_global.global.__rum);/** | ||
*/function init(a){this.client.useCollectors([new _pv["default"],new _perf["default"],new _webvitals["default"],new _exception["default"],new _blank["default"],new _api["default"],new _staticResource["default"],new _click["default"]]),this.client.useProcessors([new _defaultProcessor["default"],new _sessionProcessor["default"]]),this.client.useReporter(new _reporter["default"]),this.client.init(a)},c.getConfig=function getConfig(){return this.client.getContext().getConfig()},c.setConfig=function setConfig(){var a=this.client.getContext();if(2===arguments.length){var b,c=this.client.getContext(),d=c.getConfig();c.setConfig((0,_extends3["default"])({},d,(b={},b[0>=arguments.length?void 0:arguments[0]]=1>=arguments.length?void 0:arguments[1],b)))}else a.setConfig(0>=arguments.length?void 0:arguments[0])},b}(_rumCore.Shell),_default=exports["default"]=new ArmsRum(_global.global.__rum);/** | ||
* browser sdk | ||
*/ |
{ | ||
"name": "@arms/rum-browser", | ||
"version": "0.0.24-beta.1", | ||
"version": "0.0.24-beta.2", | ||
"description": "arms rum javascript sdk for browser", | ||
@@ -5,0 +5,0 @@ "author": "guangli.fj <guangli.fj@alibaba-inc.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67527
51
709
17