@arms/rum-miniapp
Advanced tools
Comparing version 0.0.30-beta.1 to 0.0.30
@@ -6,2 +6,2 @@ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_rumCore=require("@arms/rum-core"),_hackApp=require("../../utils/hackApp"),_platform=require("../../utils/platform"),ExceptionCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="exception-collector",this.ctx=void 0,this.sendEvent=void 0,this.origin={consoleError:console.error},this.events={onError:null,onUnhandledRejection:null,onPageNotFound:null,onLazyLoadError:null},this.errorHandle=function(b,c){void 0===c&&(c="");var d,e,f,g,h,i;if(b instanceof Object)d=b.name,e=b.message,f=b.filename||b.fileName,g=b.stack,h=b.lineno||b.lineNumber,i=b.colno||b.columnNumber;else if("string"==typeof b){g=b;var j=a.getErrorByStack(b);j&&(d=j.name,e=j.message)}if(d&&e&&!a.errorFilter(b)){var k=a.ctx.session.getBaseEvent();a.sendEvent((0,_extends2["default"])({},k,{event_type:_rumCore.RumEventType.EXCEPTION,source:c,type:"error",name:d,message:e,file:f,stack:g,line:h,column:i}))}}}var b=a.prototype;return b.setup=function setup(a,b){this.ctx=a,this.sendEvent=b,this.hackOrigin()},b.hackOrigin=function hackOrigin(){var a=this,b=this,c=this.ctx.getConfig(),d=c.collectors,e=void 0===d?{}:d;!1!==e.jsError&&Object.keys(this.events).forEach(function(c){a.events[c]=function(a){a.reason&&a.reason instanceof Error&&(a=a.reason),b.errorHandle(a,c)},(0,_hackApp.addAppListener)(c,a.events[c])}),!e.consoleError||("swan"===_platform.appName&&Object.defineProperty(console,"error",{writable:!0}),(0,_rumCore.interceptFunction)(console,"error",function(a){b.errorHandle(a,"console.error")}))},b.getErrorByStack=/** | ||
* @returns | ||
*/function getErrorByStack(a){void 0===a&&(a="");var b=a.split("\n");if(!(2>b.length))for(var c=1;c<b.length;c++)if(b[c].trim().startsWith("at ")){var d=b[c-1],e=d.indexOf(": ");return{name:d.substring(0,e),message:d.substring(e+2)}}},b.errorFilter=function errorFilter(a){var b=this.ctx.getConfig().filters||{},c=b.exception;return!!c&&((0,_rumCore.isArray)(c)||(c=[c]),(0,_rumCore.matchList)(c,a.message,!0))},b.destroy=function destroy(){var a=this,b=this.origin;b.consoleError&&(console.error=b.consoleError),Object.keys(this.events).forEach(function(b){(0,_rumCore.isFunction)(a.events[b])&&(0,_hackApp.removeAppListener)(b,a.events[b])})},a}(); | ||
*/function getErrorByStack(a){void 0===a&&(a="");var b=a.split("\n");if(!(2>b.length))for(var c=1;c<b.length;c++)if(b[c].trim().startsWith("at ")){var d=b[c-1],e=d.indexOf(": ");return{name:d.substring(0,e),message:d.substring(e+2)}}},b.errorFilter=function errorFilter(a){var b=this.ctx.getConfig().filters||{},c=b.exception;return!!c&&((0,_rumCore.isArray)(c)||(c=[c]),(0,_rumCore.matchList)(c,a.name,!0)||(0,_rumCore.matchList)(c,a.message,!0)||(0,_rumCore.matchList)(c,a.stack,!0))},b.destroy=function destroy(){var a=this,b=this.origin;b.consoleError&&(console.error=b.consoleError),Object.keys(this.events).forEach(function(b){(0,_rumCore.isFunction)(a.events[b])&&(0,_hackApp.removeAppListener)(b,a.events[b])})},a}(); |
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_base=require("../utils/base"),_view=require("../utils/view"),DefaultProcessor=exports["default"]=/*#__PURE__*/function(){function a(){this.name="default-processor"}var b=a.prototype;return b.process=function process(a){var b=a.getRumEvent(),c=(0,_view.getCurView)(a),d=(0,_extends2["default"])({timestamp:(0,_base.getCurrentTime)(),event_id:a.session.getEventId(),view:c},b);return d},a}(); | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_base=require("../utils/base"),_view=require("../utils/view"),DefaultProcessor=exports["default"]=/*#__PURE__*/function(){function a(){this.name="default-processor"}var b=a.prototype;return b.process=function process(a){var b=a.getRumEvent(),c=(0,_view.getCurView)(a),d=(0,_extends2["default"])({timestamp:(0,_base.getCurrentTime)(),session_id:a.session.getSessionId(),event_id:a.session.getEventId(),view:c},b);return d},a}(); |
@@ -1,2 +0,2 @@ | ||
"use strict";exports.__esModule=!0,exports["default"]=exports.appName=exports.VERSION=exports.HEADER_KEY=void 0,exports.getPerformance=getPerformance,exports.getStorageSync=getStorageSync,exports.sdk=void 0,exports.setStorageSync=setStorageSync;var VERSION=exports.VERSION='npm-0.0.30-beta.1',OBJ="object",qqName="qq",bytedanceName="bytedance",wechatName="wechat",dingtalkName="dingtalk",alipayName="alipay",swanName="swan",jdName="jd";/** | ||
"use strict";exports.__esModule=!0,exports["default"]=exports.appName=exports.VERSION=exports.HEADER_KEY=void 0,exports.getPerformance=getPerformance,exports.getStorageSync=getStorageSync,exports.sdk=void 0,exports.setStorageSync=setStorageSync;var VERSION=exports.VERSION='npm-0.0.30',OBJ="object",qqName="qq",bytedanceName="bytedance",wechatName="wechat",dingtalkName="dingtalk",alipayName="alipay",swanName="swan",jdName="jd";/** | ||
* 获取跨平台的 SDK | ||
@@ -3,0 +3,0 @@ */function getSDK(){var a,b="unknown";if(typeof swan===OBJ)a=swan,b=swanName;else if(typeof qq===OBJ)// qq的全局也有wx命名空间,和qq等效,这会导致判断AppName失效 |
{ | ||
"name": "@arms/rum-miniapp", | ||
"version": "0.0.30-beta.1", | ||
"version": "0.0.30", | ||
"description": "arms rum javascript sdk for miniapp", | ||
@@ -22,6 +22,7 @@ "author": "guangli.fj <guangli.fj@alibaba-inc.com>", | ||
"build": "build-scripts build --skip-demo", | ||
"prepublishOnly": "npm run build", | ||
"test": "node ./__tests__/@arms/miniapp.test.js" | ||
}, | ||
"dependencies": { | ||
"@arms/rum-core": "0.0.29" | ||
"@arms/rum-core": "0.0.30" | ||
}, | ||
@@ -28,0 +29,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
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
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
130813
+ Added@arms/rum-core@0.0.30(transitive)
- Removed@arms/rum-core@0.0.29(transitive)
- Removedjs-base64@3.7.7(transitive)
Updated@arms/rum-core@0.0.30