Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openreplay/tracker

Package Overview
Dependencies
Maintainers
4
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openreplay/tracker - npm Package Compare versions

Comparing version 3.5.16-beta.3 to 3.5.16

3

cjs/app/index.js

@@ -35,3 +35,3 @@ "use strict";

this.activityState = ActivityState.NotActive;
this.version = '3.5.16-beta.3'; // TODO: version compatability check inside each plugin.
this.version = '3.5.16'; // TODO: version compatability check inside each plugin.
this.projectKey = projectKey;

@@ -147,3 +147,2 @@ this.options = Object.assign({

catch (e) {
console.error(e);
app._debug("safe_fn_call", e);

@@ -150,0 +149,0 @@ // time: timestamp(),

@@ -15,5 +15,5 @@ declare type NodeCallback = (node: Node, isStart: boolean) => void;

getID(node: Node): number | undefined;
getNode(id: number): Node | undefined;
getNode(id: number): void | Node;
clear(): void;
}
export {};

@@ -41,3 +41,3 @@ "use strict";

delete node[this.node_id];
this.nodes[id] = undefined;
delete this.nodes[id];
const listeners = this.elementListeners.get(id);

@@ -58,9 +58,4 @@ if (listeners !== undefined) {

const node = this.nodes[i];
if (node === undefined) {
delete this.nodes[i];
continue;
}
if (!document.contains(node)) {
if (node && !document.contains(node)) {
this.unregisterNode(node);
delete this.nodes[i];
}

@@ -67,0 +62,0 @@ }

@@ -16,2 +16,3 @@ import App from "../index.js";

private bindNode;
private unbindChildNode;
private bindTree;

@@ -18,0 +19,0 @@ private unbindNode;

@@ -161,3 +161,3 @@ "use strict";

}
bindNode(node, isRemove = false) {
bindNode(node) {
const [id, isNew] = this.app.nodes.registerNode(node);

@@ -168,6 +168,10 @@ if (isNew) {

else if (this.recents.get(id) !== RecentsType.New) { // can we do just `else` here?
this.recents.set(id, isRemove ? RecentsType.RemovedChild : RecentsType.Removed);
this.recents.set(id, RecentsType.Removed);
}
}
bindTree(node, isRemove = false) {
unbindChildNode(node) {
const [id] = this.app.nodes.registerNode(node);
this.recents.set(id, RecentsType.RemovedChild);
}
bindTree(node, isChildUnbinding = false) {
if (!isObservable(node)) {

@@ -179,3 +183,3 @@ return;

acceptNode: (node) => isIgnored(node)
|| (this.app.nodes.getID(node) !== undefined && !isRemove)
|| (this.app.nodes.getID(node) !== undefined && !isChildUnbinding)
? NodeFilter.FILTER_REJECT

@@ -187,3 +191,8 @@ : NodeFilter.FILTER_ACCEPT,

while (walker.nextNode()) {
this.bindNode(walker.currentNode, isRemove);
if (isChildUnbinding) {
this.unbindChildNode(walker.currentNode);
}
else {
this.bindNode(walker.currentNode);
}
}

@@ -196,3 +205,2 @@ }

}
return id;
}

@@ -199,0 +207,0 @@ // A top-consumption function on the infinite lists test. (~1% of performance resources)

@@ -130,3 +130,3 @@ "use strict";

req.send(JSON.stringify({
trackerVersion: '3.5.16-beta.3',
trackerVersion: '3.5.16',
projectKey: options.projectKey,

@@ -133,0 +133,0 @@ doNotTrack,

@@ -70,3 +70,3 @@ "use strict";

obscureInputEmails: true,
defaultInputMode: 0 /* InputMode.Plain */,
defaultInputMode: 0 /* Plain */,
obscureInputDates: false,

@@ -84,6 +84,6 @@ }, opts);

if (node.type === 'password' || (0, utils_js_1.hasOpenreplayAttribute)(node, 'hidden')) {
inputMode = 2 /* InputMode.Hidden */;
inputMode = 2 /* Hidden */;
}
else if ((0, utils_js_1.hasOpenreplayAttribute)(node, 'obscured') ||
(inputMode === 0 /* InputMode.Plain */ &&
(inputMode === 0 /* Plain */ &&
((options.obscureInputNumbers && node.type !== 'date' && /\d\d\d\d/.test(value)) ||

@@ -93,11 +93,11 @@ (options.obscureInputDates && node.type === 'date') ||

(node.type === 'email' || !!~value.indexOf('@')))))) {
inputMode = 1 /* InputMode.Obscured */;
inputMode = 1 /* Obscured */;
}
let mask = 0;
switch (inputMode) {
case 2 /* InputMode.Hidden */:
case 2 /* Hidden */:
mask = -1;
value = '';
break;
case 1 /* InputMode.Obscured */:
case 1 /* Obscured */:
mask = value.length;

@@ -120,7 +120,9 @@ value = '';

const node = app.nodes.getNode(id);
if (node && !isTextEditable(node)) {
if (!node)
return;
if (!isTextEditable(node)) {
inputValues.delete(id);
return;
}
if (node && value !== node.value) {
if (value !== node.value) {
inputValues.set(id, node.value);

@@ -136,7 +138,9 @@ if (!registeredTargets.has(id)) {

const node = app.nodes.getNode(id);
if (node && !isCheckable(node)) {
if (!node)
return;
if (!isCheckable(node)) {
checkableValues.delete(id);
return;
}
if (node && checked !== node.checked) {
if (checked !== node.checked) {
checkableValues.set(id, node.checked);

@@ -143,0 +147,0 @@ app.send(new messages_js_1.SetInputChecked(id, node.checked));

@@ -32,3 +32,3 @@ import { Timestamp, Metadata, UserID } from "../common/messages.js";

this.activityState = ActivityState.NotActive;
this.version = '3.5.16-beta.3'; // TODO: version compatability check inside each plugin.
this.version = '3.5.16'; // TODO: version compatability check inside each plugin.
this.projectKey = projectKey;

@@ -144,3 +144,2 @@ this.options = Object.assign({

catch (e) {
console.error(e);
app._debug("safe_fn_call", e);

@@ -147,0 +146,0 @@ // time: timestamp(),

@@ -15,5 +15,5 @@ declare type NodeCallback = (node: Node, isStart: boolean) => void;

getID(node: Node): number | undefined;
getNode(id: number): Node | undefined;
getNode(id: number): void | Node;
clear(): void;
}
export {};

@@ -39,3 +39,3 @@ export default class Nodes {

delete node[this.node_id];
this.nodes[id] = undefined;
delete this.nodes[id];
const listeners = this.elementListeners.get(id);

@@ -56,9 +56,4 @@ if (listeners !== undefined) {

const node = this.nodes[i];
if (node === undefined) {
delete this.nodes[i];
continue;
}
if (!document.contains(node)) {
if (node && !document.contains(node)) {
this.unregisterNode(node);
delete this.nodes[i];
}

@@ -65,0 +60,0 @@ }

@@ -16,2 +16,3 @@ import App from "../index.js";

private bindNode;
private unbindChildNode;
private bindTree;

@@ -18,0 +19,0 @@ private unbindNode;

@@ -159,3 +159,3 @@ import { RemoveNodeAttribute, SetNodeAttribute, SetNodeAttributeURLBased, SetCSSDataURLBased, SetNodeData, CreateTextNode, CreateElementNode, MoveNode, RemoveNode, } from "../../common/messages.js";

}
bindNode(node, isRemove = false) {
bindNode(node) {
const [id, isNew] = this.app.nodes.registerNode(node);

@@ -166,6 +166,10 @@ if (isNew) {

else if (this.recents.get(id) !== RecentsType.New) { // can we do just `else` here?
this.recents.set(id, isRemove ? RecentsType.RemovedChild : RecentsType.Removed);
this.recents.set(id, RecentsType.Removed);
}
}
bindTree(node, isRemove = false) {
unbindChildNode(node) {
const [id] = this.app.nodes.registerNode(node);
this.recents.set(id, RecentsType.RemovedChild);
}
bindTree(node, isChildUnbinding = false) {
if (!isObservable(node)) {

@@ -177,3 +181,3 @@ return;

acceptNode: (node) => isIgnored(node)
|| (this.app.nodes.getID(node) !== undefined && !isRemove)
|| (this.app.nodes.getID(node) !== undefined && !isChildUnbinding)
? NodeFilter.FILTER_REJECT

@@ -185,3 +189,8 @@ : NodeFilter.FILTER_ACCEPT,

while (walker.nextNode()) {
this.bindNode(walker.currentNode, isRemove);
if (isChildUnbinding) {
this.unbindChildNode(walker.currentNode);
}
else {
this.bindNode(walker.currentNode);
}
}

@@ -194,3 +203,2 @@ }

}
return id;
}

@@ -197,0 +205,0 @@ // A top-consumption function on the infinite lists test. (~1% of performance resources)

@@ -126,3 +126,3 @@ import App, { DEFAULT_INGEST_POINT } from "./app/index.js";

req.send(JSON.stringify({
trackerVersion: '3.5.16-beta.3',
trackerVersion: '3.5.16',
projectKey: options.projectKey,

@@ -129,0 +129,0 @@ doNotTrack,

@@ -66,3 +66,3 @@ import { normSpaces, IN_BROWSER, getLabelAttribute, hasOpenreplayAttribute, } from "../utils.js";

obscureInputEmails: true,
defaultInputMode: 0 /* InputMode.Plain */,
defaultInputMode: 0 /* Plain */,
obscureInputDates: false,

@@ -80,6 +80,6 @@ }, opts);

if (node.type === 'password' || hasOpenreplayAttribute(node, 'hidden')) {
inputMode = 2 /* InputMode.Hidden */;
inputMode = 2 /* Hidden */;
}
else if (hasOpenreplayAttribute(node, 'obscured') ||
(inputMode === 0 /* InputMode.Plain */ &&
(inputMode === 0 /* Plain */ &&
((options.obscureInputNumbers && node.type !== 'date' && /\d\d\d\d/.test(value)) ||

@@ -89,11 +89,11 @@ (options.obscureInputDates && node.type === 'date') ||

(node.type === 'email' || !!~value.indexOf('@')))))) {
inputMode = 1 /* InputMode.Obscured */;
inputMode = 1 /* Obscured */;
}
let mask = 0;
switch (inputMode) {
case 2 /* InputMode.Hidden */:
case 2 /* Hidden */:
mask = -1;
value = '';
break;
case 1 /* InputMode.Obscured */:
case 1 /* Obscured */:
mask = value.length;

@@ -116,7 +116,9 @@ value = '';

const node = app.nodes.getNode(id);
if (node && !isTextEditable(node)) {
if (!node)
return;
if (!isTextEditable(node)) {
inputValues.delete(id);
return;
}
if (node && value !== node.value) {
if (value !== node.value) {
inputValues.set(id, node.value);

@@ -132,7 +134,9 @@ if (!registeredTargets.has(id)) {

const node = app.nodes.getNode(id);
if (node && !isCheckable(node)) {
if (!node)
return;
if (!isCheckable(node)) {
checkableValues.delete(id);
return;
}
if (node && checked !== node.checked) {
if (checked !== node.checked) {
checkableValues.set(id, node.checked);

@@ -139,0 +143,0 @@ app.send(new SetInputChecked(id, node.checked));

{
"name": "@openreplay/tracker",
"description": "The OpenReplay tracker main package",
"version": "3.5.16-beta.3",
"version": "3.5.16",
"keywords": [

@@ -6,0 +6,0 @@ "logging",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc