react-tracker
Advanced tools
| !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ReactTracker=e():t.ReactTracker=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="build/",e(e.s=4)}([function(t,e,n){"use strict";t.exports=n(6)},function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},t.exports=o},function(t,e,n){t.exports=n(9)()},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return o});var r=function(t){return"TrackEventProvider("+(t.displayName||t.name||"Component")+")"},o=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(function(t){return"function"==typeof t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),o=n(12),i=n(13);n.d(e,"Tracker",function(){return i.a}),n.d(e,"TrackerProvider",function(){return r.a}),n.d(e,"withTracking",function(){return o.a})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=n(0),c=(n.n(u),n(2)),a=n.n(c),f=function(){function t(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t,n){r(this,e);var i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.tracker=t.tracker,i}return i(e,t),f(e,[{key:"getChildContext",value:function(){return{trackEvent:this.tracker.trackEvent}}}]),f(e,[{key:"render",value:function(){return u.Children.only(this.props.children)}}]),e}(u.Component);e.a=l,l.propTypes={children:a.a.element.isRequired},l.childContextTypes={trackEvent:a.a.func.isRequired}},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;e>r;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw e=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),e.name="Invariant Violation",e.framesToPop=1,e}function o(t,e,n){this.props=t,this.context=e,this.refs=g,this.updater=n||P}function i(t,e,n){this.props=t,this.context=e,this.refs=g,this.updater=n||P}function u(){}function c(t,e,n){this.props=t,this.context=e,this.refs=g,this.updater=n||P}function a(t,e,n){var r,o={},i=null,u=null;if(null!=e)for(r in void 0!==e.ref&&(u=e.ref),void 0!==e.key&&(i=""+e.key),e)A.call(e,r)&&!$.hasOwnProperty(r)&&(o[r]=e[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(c>1){for(var a=Array(c),f=0;c>f;f++)a[f]=arguments[f+2];o.children=a}if(t&&t.defaultProps)for(r in c=t.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:j,type:t,key:i,ref:u,props:o,_owner:C.current}}function f(t){return"object"==typeof t&&null!==t&&t.$$typeof===j}function l(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function s(t,e,n,r){if(N.length){var o=N.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function p(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>N.length&&N.push(t)}function y(t,e,n,o){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var u=!1;if(null===t)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case j:case w:case _:case E:u=!0}}if(u)return n(o,t,""===e?"."+h(t,0):e),1;if(u=0,e=""===e?".":e+":",Array.isArray(t))for(var c=0;t.length>c;c++){i=t[c];var a=e+h(i,c);u+=y(i,a,n,o)}else if(null===t||void 0===t?a=null:(a=S&&t[S]||t["@@iterator"],a="function"==typeof a?a:null),"function"==typeof a)for(t=a.call(t),c=0;!(i=t.next()).done;)i=i.value,a=e+h(i,c++),u+=y(i,a,n,o);else"object"===i&&(n=""+t,r("31","[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return u}function h(t,e){return"object"==typeof t&&null!==t&&null!=t.key?l(t.key):e.toString(36)}function d(t,e){t.func.call(t.context,e,t.count++)}function v(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?b(t,r,n,k.thatReturnsArgument):null!=t&&(f(t)&&(e=o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(q,"$&/")+"/")+n,t={$$typeof:j,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}),r.push(t))}function b(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(q,"$&/")+"/"),e=s(e,i,r,o),null==t||y(t,"",v,e),p(e)}var m=n(7),g=n(8),k=n(1),O="function"==typeof Symbol&&Symbol.for,j=O?Symbol.for("react.element"):60103,w=O?Symbol.for("react.call"):60104,_=O?Symbol.for("react.return"):60105,E=O?Symbol.for("react.portal"):60106,x=O?Symbol.for("react.fragment"):60107,S="function"==typeof Symbol&&Symbol.iterator,P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&r("85"),this.updater.enqueueSetState(this,t,e,"setState")},o.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},u.prototype=o.prototype;var T=i.prototype=new u;T.constructor=i,m(T,o.prototype),T.isPureReactComponent=!0;var R=c.prototype=new u;R.constructor=c,m(R,o.prototype),R.unstable_isAsyncReactComponent=!0,R.render=function(){return this.props.children};var C={current:null},A=Object.prototype.hasOwnProperty,$={key:!0,ref:!0,__self:!0,__source:!0},q=/\/+/g,N=[],I={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return b(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;e=s(null,null,e,n),null==t||y(t,"",d,e),p(e)},count:function(t){return null==t?0:y(t,"",k.thatReturnsNull,null)},toArray:function(t){var e=[];return b(t,e,null,k.thatReturnsArgument),e},only:function(t){return f(t)||r("143"),t}},Component:o,PureComponent:i,unstable_AsyncComponent:c,Fragment:x,createElement:a,cloneElement:function(t,e,n){var r=m({},t.props),o=t.key,i=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(i=e.ref,u=C.current),void 0!==e.key&&(o=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(a in e)A.call(e,a)&&!$.hasOwnProperty(a)&&(r[a]=void 0===e[a]&&void 0!==c?c[a]:e[a])}var a=arguments.length-2;if(1===a)r.children=n;else if(a>1){c=Array(a);for(var f=0;a>f;f++)c[f]=arguments[f+2];r.children=c}return{$$typeof:j,type:t.type,key:o,ref:i,props:r,_owner:u}},createFactory:function(t){var e=a.bind(null,t);return e.type=t,e},isValidElement:f,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:C,assign:m}},U=Object.freeze({default:I}),F=U&&I||U;t.exports=F.default?F.default:F},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,c,a=r(t),f=1;arguments.length>f;f++){n=Object(arguments[f]);for(var l in n)i.call(n,l)&&(a[l]=n[l]);if(o){c=o(n);for(var s=0;c.length>s;s++)u.call(n,c[s])&&(a[c[s]]=n[c[s]])}}return a}},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";var r=n(1),o=n(10),i=n(11);t.exports=function(){function t(t,e,n,r,u,c){c!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";function r(t,e,n,r,i,u,c,a){if(o(e),!t){var f;if(void 0===e)f=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,u,c,a],s=0;f=Error(e.replace(/%s/g,function(){return l[s++]})),f.name="Invariant Violation"}throw f.framesToPop=1,f}}var o=function(t){};t.exports=r},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(2),u=n.n(i),c=n(3),a=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a=function(t){return function(e){var n=Object(c.b)(e),r=function(r,i){var u=i.trackEvent,c={};if(!u)throw Error('Could not find tracker in the context of "'+n+'"');if("function"==typeof t){if(!(c=t(u))||"object"!==(void 0===c?"undefined":f(c)))throw Error('mapTrackingToProps should return an object, instead it returns "'+(void 0===c?"undefined":f(c))+'"')}else c={trackEvent:u};var l=a({},r,c);return o.a.createElement(e,l)};return r.displayName=n,r.contextTypes={trackEvent:u.a.func.isRequired},r}}},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);t.length>e;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(3),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.a=function(){function t(e){o(this,t),this.trackingHistory=[],this.listeners=Object(i.a)(e),this.trackEvent=this.trackEvent.bind(this)}return c(t,[{key:"on",value:function(t,e){if("function"!=typeof e)throw Error("Expected onClick listener to be a function, instead got type "+(void 0===e?"undefined":u(e)));if("string"!=typeof t||1>t.length)throw Error("No event type is specified. (*) to listen on all events");e.eventType=t,this.listeners=[].concat(r(this.listeners),[e])}},{key:"trackEvent",value:function(t){var e=t||{},n=e.type;if(!n)return null;for(var o=0;this.listeners.length>o;o++){var i=this.listeners[o];if("function"==typeof i&&(i.eventType===n||"*"===i.eventType||void 0===i.eventType)){var u=i.call(null,t,this.trackingHistory);u&&(this.trackingHistory=[].concat(r(this.trackingHistory),[u]))}}}},{key:"getHistory",value:function(){return this.trackingHistory}}]),t}()}])}); |
@@ -15,3 +15,3 @@ { | ||
| "react-toastify": "^3.3.1", | ||
| "react-tracker": "0.0.6", | ||
| "react-tracker": "0.0.7", | ||
| "redux": "^3.6.0" | ||
@@ -18,0 +18,0 @@ }, |
+2
-2
| { | ||
| "name": "react-tracker", | ||
| "version": "0.0.7", | ||
| "version": "0.0.8", | ||
| "description": "Track user interaction with React based apps", | ||
@@ -8,3 +8,3 @@ "main": "build/index.js", | ||
| "build": "webpack", | ||
| "prepublish": "npm build", | ||
| "prepublish": "npm run build", | ||
| "test": "jest --coverage", | ||
@@ -11,0 +11,0 @@ "test:cov": "nyc npm test", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
5677816
0.22%69
1.47%6
-14.29%4
33.33%