@kano/kbc-telemetry
Advanced tools
Comparing version 4.13.0-alpha.0 to 4.13.5-alpha.0
@@ -31,9 +31,11 @@ "use strict"; | ||
const newTime = Date.now(); | ||
const latestTime = this.latestTimestamp.getTime(); | ||
if (latestTime && newTime - latestTime > this.sessionTimeout) { | ||
clearInterval(this.refreshSession); | ||
this.refreshSession = null; | ||
return; | ||
if (this.latestTimestamp) { | ||
const latestTime = this.latestTimestamp.getTime(); | ||
if (latestTime && newTime - latestTime > this.sessionTimeout) { | ||
clearInterval(this.refreshSession); | ||
this.refreshSession = null; | ||
return; | ||
} | ||
this.config.tracking.trackEvent({ event: 'refresh_session' }); | ||
} | ||
this.config.tracking.trackEvent({ event: 'refresh_session' }); | ||
}, this.refreshInterval); | ||
@@ -40,0 +42,0 @@ } |
{ | ||
"name": "@kano/kbc-telemetry", | ||
"version": "4.13.0-alpha.0", | ||
"version": "4.13.5-alpha.0", | ||
"description": "Telemetry module for boilerplate apps, using react-tracking", | ||
@@ -17,8 +17,8 @@ "author": "Kano Computing", | ||
"scripts": { | ||
"tsc": "tsc", | ||
"test": "echo \"Error: run tests from root\" && exit 1", | ||
"build": "yarn run clean && yarn run compile", | ||
"watch": "nodemon --watch src/ -e ts,tsx --exec 'yarn run build && yalc push'", | ||
"clean": "rm -rf ./lib", | ||
"compile": "tsc -b tsconfig.build.json", | ||
"prepublishOnly": "yarn run build", | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
"prepublishOnly": "yarn run build" | ||
}, | ||
@@ -38,3 +38,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "37716869e57fe4138b4b6e151ab6dfde1ad75a03" | ||
"gitHead": "87ea6b7ddc3a0273d3d64ccb9174625615dd724c" | ||
} |
@@ -17,3 +17,3 @@ # kbc-telemetry | ||
Wrap your app in `<TelemetryProvider>` and pass config information. | ||
Wrap your app in `<TelemetryProvider>` (this should be the top level wrapper) and pass config information. | ||
@@ -20,0 +20,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
27536
314