@openreplay/tracker
Advanced tools
Comparing version 14.0.7-beta.0 to 14.0.7
@@ -0,1 +1,6 @@ | ||
# 14.0.7 | ||
- check for stopping status during restarts | ||
- restart if token expired during canvas fetch | ||
# 14.0.6 | ||
@@ -2,0 +7,0 @@ |
@@ -84,3 +84,3 @@ "use strict"; | ||
if (!canvas || !(0, guards_js_1.hasTag)(canvas, 'canvas') || canvas !== node) { | ||
this.app.debug.log('Canvas element not in sync'); | ||
this.app.debug.log('Canvas element not in sync', canvas, node); | ||
clearInterval(int); | ||
@@ -129,2 +129,9 @@ return; | ||
}); | ||
const initRestart = () => { | ||
this.app.debug.log('Restarting tracker; token expired'); | ||
this.app.stop(false); | ||
setTimeout(() => { | ||
void this.app.start({}, true); | ||
}, 250); | ||
}; | ||
fetch(this.app.options.ingestPoint + '/v1/web/images', { | ||
@@ -137,3 +144,6 @@ method: 'POST', | ||
}) | ||
.then(() => { | ||
.then((r) => { | ||
if (r.status === 401) { | ||
return initRestart(); | ||
} | ||
return true; | ||
@@ -140,0 +150,0 @@ }) |
@@ -34,2 +34,3 @@ import type App from './index.js'; | ||
userInfo: UserInfo; | ||
private token; | ||
constructor(app: App, options: Options); | ||
@@ -36,0 +37,0 @@ attachUpdateCallback(cb: OnUpdateCallback): void; |
@@ -75,5 +75,7 @@ "use strict"; | ||
getSessionToken() { | ||
return this.app.sessionStorage.getItem(this.options.session_token_key) || undefined; | ||
const token = this.token || this.app.sessionStorage.getItem(this.options.session_token_key); | ||
return token || undefined; | ||
} | ||
setSessionToken(token) { | ||
this.token = token; | ||
this.app.sessionStorage.setItem(this.options.session_token_key, token); | ||
@@ -80,0 +82,0 @@ } |
@@ -101,3 +101,3 @@ "use strict"; | ||
req.send(JSON.stringify({ | ||
trackerVersion: '14.0.7-beta.0', | ||
trackerVersion: '14.0.7', | ||
projectKey: this.options.projectKey, | ||
@@ -104,0 +104,0 @@ doNotTrack, |
@@ -82,3 +82,3 @@ import { hasTag } from './guards.js'; | ||
if (!canvas || !hasTag(canvas, 'canvas') || canvas !== node) { | ||
this.app.debug.log('Canvas element not in sync'); | ||
this.app.debug.log('Canvas element not in sync', canvas, node); | ||
clearInterval(int); | ||
@@ -127,2 +127,9 @@ return; | ||
}); | ||
const initRestart = () => { | ||
this.app.debug.log('Restarting tracker; token expired'); | ||
this.app.stop(false); | ||
setTimeout(() => { | ||
void this.app.start({}, true); | ||
}, 250); | ||
}; | ||
fetch(this.app.options.ingestPoint + '/v1/web/images', { | ||
@@ -135,3 +142,6 @@ method: 'POST', | ||
}) | ||
.then(() => { | ||
.then((r) => { | ||
if (r.status === 401) { | ||
return initRestart(); | ||
} | ||
return true; | ||
@@ -138,0 +148,0 @@ }) |
@@ -68,3 +68,3 @@ import { gzip } from 'fflate'; | ||
this.activityState = ActivityState.NotActive; | ||
this.version = '14.0.7-beta.0'; // TODO: version compatability check inside each plugin. | ||
this.version = '14.0.7'; // TODO: version compatability check inside each plugin. | ||
this.socketMode = false; | ||
@@ -71,0 +71,0 @@ this.compressionThreshold = 24 * 1000; |
@@ -34,2 +34,3 @@ import type App from './index.js'; | ||
userInfo: UserInfo; | ||
private token; | ||
constructor(app: App, options: Options); | ||
@@ -36,0 +37,0 @@ attachUpdateCallback(cb: OnUpdateCallback): void; |
@@ -73,5 +73,7 @@ import { generateRandomId } from '../utils.js'; | ||
getSessionToken() { | ||
return this.app.sessionStorage.getItem(this.options.session_token_key) || undefined; | ||
const token = this.token || this.app.sessionStorage.getItem(this.options.session_token_key); | ||
return token || undefined; | ||
} | ||
setSessionToken(token) { | ||
this.token = token; | ||
this.app.sessionStorage.setItem(this.options.session_token_key, token); | ||
@@ -78,0 +80,0 @@ } |
@@ -70,3 +70,3 @@ import App, { DEFAULT_INGEST_POINT } from './app/index.js'; | ||
req.send(JSON.stringify({ | ||
trackerVersion: '14.0.7-beta.0', | ||
trackerVersion: '14.0.7', | ||
projectKey: this.options.projectKey, | ||
@@ -73,0 +73,0 @@ doNotTrack, |
{ | ||
"name": "@openreplay/tracker", | ||
"description": "The OpenReplay tracker main package", | ||
"version": "14.0.7-beta.0", | ||
"version": "14.0.7", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "logging", |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4025510
24451
1