@openreplay/tracker
Advanced tools
Comparing version 14.0.14 to 15.0.0
@@ -39,4 +39,6 @@ export declare const enum Type { | ||
PerformanceTrack = 49, | ||
StringDict = 50, | ||
SetNodeAttributeDict = 51, | ||
StringDictDeprecated = 50, | ||
SetNodeAttributeDictDeprecated = 51, | ||
StringDict = 43, | ||
SetNodeAttributeDict = 52, | ||
ResourceTimingDeprecated = 53, | ||
@@ -78,3 +80,4 @@ ConnectionInformation = 54, | ||
SetPageLocation = 122, | ||
GraphQL = 123 | ||
GraphQL = 123, | ||
WebVitals = 124 | ||
} | ||
@@ -297,5 +300,16 @@ export type Timestamp = [ | ||
]; | ||
export type StringDictDeprecated = [ | ||
Type.StringDictDeprecated, | ||
number, | ||
string | ||
]; | ||
export type SetNodeAttributeDictDeprecated = [ | ||
Type.SetNodeAttributeDictDeprecated, | ||
number, | ||
number, | ||
number | ||
]; | ||
export type StringDict = [ | ||
Type.StringDict, | ||
number, | ||
string, | ||
string | ||
@@ -306,4 +320,4 @@ ]; | ||
number, | ||
number, | ||
number | ||
string, | ||
string | ||
]; | ||
@@ -551,3 +565,8 @@ export type ResourceTimingDeprecated = [ | ||
]; | ||
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL; | ||
export type WebVitals = [ | ||
Type.WebVitals, | ||
string, | ||
string | ||
]; | ||
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals; | ||
export default Message; |
@@ -85,3 +85,3 @@ 'use strict'; | ||
req.send(JSON.stringify({ | ||
trackerVersion: '14.0.14', | ||
trackerVersion: '15.0.0', | ||
projectKey: this.options.projectKey, | ||
@@ -116,3 +116,2 @@ doNotTrack, | ||
if (!utils_js_1.IN_BROWSER || !processOptions(options)) { | ||
console.error('OpenReplay: tracker called in a non-browser environment or with invalid options'); | ||
return; | ||
@@ -119,0 +118,0 @@ } |
@@ -40,4 +40,6 @@ import * as Messages from '../../common/messages.gen.js'; | ||
export declare function PerformanceTrack(frames: number, ticks: number, totalJSHeapSize: number, usedJSHeapSize: number): Messages.PerformanceTrack; | ||
export declare function StringDict(key: number, value: string): Messages.StringDict; | ||
export declare function SetNodeAttributeDict(id: number, nameKey: number, valueKey: number): Messages.SetNodeAttributeDict; | ||
export declare function StringDictDeprecated(key: number, value: string): Messages.StringDictDeprecated; | ||
export declare function SetNodeAttributeDictDeprecated(id: number, nameKey: number, valueKey: number): Messages.SetNodeAttributeDictDeprecated; | ||
export declare function StringDict(key: string, value: string): Messages.StringDict; | ||
export declare function SetNodeAttributeDict(id: number, name: string, value: string): Messages.SetNodeAttributeDict; | ||
export declare function ResourceTimingDeprecated(timestamp: number, duration: number, ttfb: number, headerSize: number, encodedBodySize: number, decodedBodySize: number, url: string, initiator: string): Messages.ResourceTimingDeprecated; | ||
@@ -80,1 +82,2 @@ export declare function ConnectionInformation(downlink: number, type: string): Messages.ConnectionInformation; | ||
export declare function GraphQL(operationKind: string, operationName: string, variables: string, response: string, duration: number): Messages.GraphQL; | ||
export declare function WebVitals(name: string, value: string): Messages.WebVitals; |
@@ -19,3 +19,3 @@ import { MaintainerOptions } from './maintainer.js'; | ||
syntheticMode(frameOrder: number): void; | ||
attachNodeCallback(nodeCallback: NodeCallback): number; | ||
attachNodeCallback: (nodeCallback: NodeCallback) => number; | ||
scanTree: (cb: (node: Node | void) => void) => void; | ||
@@ -22,0 +22,0 @@ attachNodeListener: (node: Node, type: string, listener: EventListener, useCapture?: boolean) => void; |
@@ -8,4 +8,24 @@ import type App from './index.js'; | ||
export interface Options { | ||
/** | ||
* Sanitize emails in text DOM nodes | ||
* | ||
* (for inputs, look for obscureInputEmails) | ||
* */ | ||
obscureTextEmails: boolean; | ||
/** | ||
* Sanitize emails in text DOM nodes | ||
* | ||
* (for inputs, look for obscureInputNumbers) | ||
* */ | ||
obscureTextNumbers: boolean; | ||
/** | ||
* Sanitize the DOM node based on the returned level | ||
* (Plain = 0, Obscured = 1, Hidden = 2) | ||
* | ||
* higher security levels will override other settings or data-params. | ||
* | ||
* @param node - the DOM node to sanitize | ||
* @returns the level of sanitization to apply | ||
* | ||
* */ | ||
domSanitizer?: (node: Element) => SanitizeLevel; | ||
@@ -12,0 +32,0 @@ } |
@@ -45,4 +45,4 @@ import type App from './index.js'; | ||
setUserInfo(userInfo: UserInfo): void; | ||
private getPageNumber; | ||
incPageNo(): number; | ||
getPageNumber: () => number | undefined; | ||
incPageNo: () => number; | ||
getSessionToken(): string | undefined; | ||
@@ -49,0 +49,0 @@ setSessionToken(token: string): void; |
import App from '../app/index.js'; | ||
export declare class StringDictionary { | ||
private readonly getPageNo; | ||
private idx; | ||
/** backwards dictionary of | ||
* [repeated str:key] | ||
* */ | ||
private backDict; | ||
getKey(str: string): [number, boolean]; | ||
constructor(getPageNo: () => number | undefined); | ||
getKey: (str: string) => [string, boolean]; | ||
} | ||
@@ -15,5 +20,5 @@ export default class AttributeSender { | ||
}); | ||
sendSetAttribute(id: number, name: string, value: string): void; | ||
sendSetAttribute: (id: number, name: string, value: string) => void; | ||
private applyDict; | ||
clear(): void; | ||
} |
@@ -11,8 +11,25 @@ import type App from '../app/index.js'; | ||
export interface Options { | ||
/** | ||
* Sanitize numbers from DOM input nodes. | ||
* | ||
* (for plain text nodes, look for obscureTextNumbers) | ||
* */ | ||
obscureInputNumbers: boolean; | ||
/** | ||
* Sanitize emails from DOM input nodes. | ||
* | ||
* (for plain text nodes, look for obscureTextEmails) | ||
* */ | ||
obscureInputEmails: boolean; | ||
/** | ||
* Sanitize dates from DOM input nodes. | ||
* */ | ||
obscureInputDates: boolean; | ||
/** | ||
* Default input mode for all input nodes. Higher security level | ||
* will override other settings. | ||
* */ | ||
defaultInputMode: InputModeT; | ||
obscureInputDates: boolean; | ||
} | ||
export default function (app: App, opts: Partial<Options>): void; | ||
export {}; |
@@ -39,4 +39,6 @@ export declare const enum Type { | ||
PerformanceTrack = 49, | ||
StringDict = 50, | ||
SetNodeAttributeDict = 51, | ||
StringDictDeprecated = 50, | ||
SetNodeAttributeDictDeprecated = 51, | ||
StringDict = 43, | ||
SetNodeAttributeDict = 52, | ||
ResourceTimingDeprecated = 53, | ||
@@ -78,3 +80,4 @@ ConnectionInformation = 54, | ||
SetPageLocation = 122, | ||
GraphQL = 123 | ||
GraphQL = 123, | ||
WebVitals = 124 | ||
} | ||
@@ -297,5 +300,16 @@ export type Timestamp = [ | ||
]; | ||
export type StringDictDeprecated = [ | ||
Type.StringDictDeprecated, | ||
number, | ||
string | ||
]; | ||
export type SetNodeAttributeDictDeprecated = [ | ||
Type.SetNodeAttributeDictDeprecated, | ||
number, | ||
number, | ||
number | ||
]; | ||
export type StringDict = [ | ||
Type.StringDict, | ||
number, | ||
string, | ||
string | ||
@@ -306,4 +320,4 @@ ]; | ||
number, | ||
number, | ||
number | ||
string, | ||
string | ||
]; | ||
@@ -551,3 +565,8 @@ export type ResourceTimingDeprecated = [ | ||
]; | ||
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL; | ||
export type WebVitals = [ | ||
Type.WebVitals, | ||
string, | ||
string | ||
]; | ||
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals; | ||
export default Message; |
@@ -40,4 +40,6 @@ import * as Messages from '../../common/messages.gen.js'; | ||
export declare function PerformanceTrack(frames: number, ticks: number, totalJSHeapSize: number, usedJSHeapSize: number): Messages.PerformanceTrack; | ||
export declare function StringDict(key: number, value: string): Messages.StringDict; | ||
export declare function SetNodeAttributeDict(id: number, nameKey: number, valueKey: number): Messages.SetNodeAttributeDict; | ||
export declare function StringDictDeprecated(key: number, value: string): Messages.StringDictDeprecated; | ||
export declare function SetNodeAttributeDictDeprecated(id: number, nameKey: number, valueKey: number): Messages.SetNodeAttributeDictDeprecated; | ||
export declare function StringDict(key: string, value: string): Messages.StringDict; | ||
export declare function SetNodeAttributeDict(id: number, name: string, value: string): Messages.SetNodeAttributeDict; | ||
export declare function ResourceTimingDeprecated(timestamp: number, duration: number, ttfb: number, headerSize: number, encodedBodySize: number, decodedBodySize: number, url: string, initiator: string): Messages.ResourceTimingDeprecated; | ||
@@ -80,1 +82,2 @@ export declare function ConnectionInformation(downlink: number, type: string): Messages.ConnectionInformation; | ||
export declare function GraphQL(operationKind: string, operationName: string, variables: string, response: string, duration: number): Messages.GraphQL; | ||
export declare function WebVitals(name: string, value: string): Messages.WebVitals; |
@@ -19,3 +19,3 @@ import { MaintainerOptions } from './maintainer.js'; | ||
syntheticMode(frameOrder: number): void; | ||
attachNodeCallback(nodeCallback: NodeCallback): number; | ||
attachNodeCallback: (nodeCallback: NodeCallback) => number; | ||
scanTree: (cb: (node: Node | void) => void) => void; | ||
@@ -22,0 +22,0 @@ attachNodeListener: (node: Node, type: string, listener: EventListener, useCapture?: boolean) => void; |
@@ -8,4 +8,24 @@ import type App from './index.js'; | ||
export interface Options { | ||
/** | ||
* Sanitize emails in text DOM nodes | ||
* | ||
* (for inputs, look for obscureInputEmails) | ||
* */ | ||
obscureTextEmails: boolean; | ||
/** | ||
* Sanitize emails in text DOM nodes | ||
* | ||
* (for inputs, look for obscureInputNumbers) | ||
* */ | ||
obscureTextNumbers: boolean; | ||
/** | ||
* Sanitize the DOM node based on the returned level | ||
* (Plain = 0, Obscured = 1, Hidden = 2) | ||
* | ||
* higher security levels will override other settings or data-params. | ||
* | ||
* @param node - the DOM node to sanitize | ||
* @returns the level of sanitization to apply | ||
* | ||
* */ | ||
domSanitizer?: (node: Element) => SanitizeLevel; | ||
@@ -12,0 +32,0 @@ } |
@@ -45,4 +45,4 @@ import type App from './index.js'; | ||
setUserInfo(userInfo: UserInfo): void; | ||
private getPageNumber; | ||
incPageNo(): number; | ||
getPageNumber: () => number | undefined; | ||
incPageNo: () => number; | ||
getSessionToken(): string | undefined; | ||
@@ -49,0 +49,0 @@ setSessionToken(token: string): void; |
import App from '../app/index.js'; | ||
export declare class StringDictionary { | ||
private readonly getPageNo; | ||
private idx; | ||
/** backwards dictionary of | ||
* [repeated str:key] | ||
* */ | ||
private backDict; | ||
getKey(str: string): [number, boolean]; | ||
constructor(getPageNo: () => number | undefined); | ||
getKey: (str: string) => [string, boolean]; | ||
} | ||
@@ -15,5 +20,5 @@ export default class AttributeSender { | ||
}); | ||
sendSetAttribute(id: number, name: string, value: string): void; | ||
sendSetAttribute: (id: number, name: string, value: string) => void; | ||
private applyDict; | ||
clear(): void; | ||
} |
@@ -11,8 +11,25 @@ import type App from '../app/index.js'; | ||
export interface Options { | ||
/** | ||
* Sanitize numbers from DOM input nodes. | ||
* | ||
* (for plain text nodes, look for obscureTextNumbers) | ||
* */ | ||
obscureInputNumbers: boolean; | ||
/** | ||
* Sanitize emails from DOM input nodes. | ||
* | ||
* (for plain text nodes, look for obscureTextEmails) | ||
* */ | ||
obscureInputEmails: boolean; | ||
/** | ||
* Sanitize dates from DOM input nodes. | ||
* */ | ||
obscureInputDates: boolean; | ||
/** | ||
* Default input mode for all input nodes. Higher security level | ||
* will override other settings. | ||
* */ | ||
defaultInputMode: InputModeT; | ||
obscureInputDates: boolean; | ||
} | ||
export default function (app: App, opts: Partial<Options>): void; | ||
export {}; |
{ | ||
"name": "@openreplay/tracker", | ||
"description": "The OpenReplay tracker main package", | ||
"version": "14.0.14", | ||
"version": "15.0.0", | ||
"keywords": [ | ||
@@ -37,2 +37,3 @@ "logging", | ||
"clean": "rm -Rf build && rm -Rf lib && rm -Rf cjs", | ||
"build:common": "tsc -b src/common", | ||
"build": "yarn run clean && rollup --config rollup.config.js", | ||
@@ -46,22 +47,22 @@ "lint-front": "lint-staged", | ||
"devDependencies": { | ||
"@babel/core": "^7.10.2", | ||
"@jest/globals": "^29.3.1", | ||
"@babel/core": "^7.26.0", | ||
"@jest/globals": "^29.7.0", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@rollup/plugin-node-resolve": "^15.3.0", | ||
"@rollup/plugin-replace": "^6.0.1", | ||
"@rollup/plugin-terser": "0.4.4", | ||
"@rollup/plugin-typescript": "^12.1.1", | ||
"@typescript-eslint/eslint-plugin": "^8.10.0", | ||
"@typescript-eslint/parser": "^8.10.0", | ||
"eslint": "^8.57.1", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"jest": "^29.3.1", | ||
"jest-environment-jsdom": "^29.3.1", | ||
"prettier": "^3.0.3", | ||
"@typescript-eslint/eslint-plugin": "^8.14.0", | ||
"@typescript-eslint/parser": "^8.14.0", | ||
"eslint": "^9.15.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"prettier": "^3.3.3", | ||
"replace-in-files": "^2.0.3", | ||
"rollup": "^4.1.4", | ||
"rollup": "^4.27.2", | ||
"semver": "^6.3.0", | ||
"ts-jest": "^29.0.3", | ||
"tslib": "^2.8.0", | ||
"ts-jest": "^29.2.5", | ||
"tslib": "^2.8.1", | ||
"typescript": "^5.6.3" | ||
@@ -74,3 +75,4 @@ }, | ||
"error-stack-parser-es": "^0.1.5", | ||
"fflate": "^0.8.2" | ||
"fflate": "^0.8.2", | ||
"web-vitals": "^4.2.3" | ||
}, | ||
@@ -77,0 +79,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1299649
14349
6
+ Addedweb-vitals@^4.2.3
+ Addedweb-vitals@4.2.4(transitive)