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

@amplitude/session-replay-browser

Package Overview
Dependencies
Maintainers
21
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/session-replay-browser - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

1

lib/cjs/config.js

@@ -30,2 +30,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

_this.sessionId = options.sessionId;
_this.serverZone = options.serverZone || constants_1.DEFAULT_SERVER_ZONE;
if (options.sessionId && options.deviceId) {

@@ -32,0 +33,0 @@ _this.sessionReplayId = (0, helpers_1.generateSessionReplayId)(options.sessionId, options.deviceId);

import { IDBStoreSession } from './typings/session-replay';
import { ServerZone } from '@amplitude/analytics-types';
export declare const DEFAULT_EVENT_PROPERTY_PREFIX = "[Amplitude]";

@@ -7,2 +8,3 @@ export declare const DEFAULT_SESSION_REPLAY_PROPERTY: string;

export declare const DEFAULT_SAMPLE_RATE = 0;
export declare const DEFAULT_SERVER_ZONE = ServerZone.US;
export declare const BLOCK_CLASS = "amp-block";

@@ -13,2 +15,3 @@ export declare const MASK_TEXT_CLASS = "amp-mask";

export declare const SESSION_REPLAY_EU_URL = "https://api-sr.eu.amplitude.com/sessions/v2/track";
export declare const SESSION_REPLAY_STAGING_URL = "https://api-sr.stag2.amplitude.com//sessions/v2/track";
export declare const STORAGE_PREFIX: string;

@@ -15,0 +18,0 @@ export declare const MAX_EVENT_LIST_SIZE_IN_BYTES: number;

5

lib/cjs/constants.js
Object.defineProperty(exports, "__esModule", { value: true });
exports.MAX_IDB_STORAGE_LENGTH = exports.defaultSessionStore = exports.MAX_INTERVAL = exports.MIN_INTERVAL = exports.MAX_EVENT_LIST_SIZE_IN_BYTES = exports.STORAGE_PREFIX = exports.SESSION_REPLAY_EU_URL = exports.SESSION_REPLAY_SERVER_URL = exports.UNMASK_TEXT_CLASS = exports.MASK_TEXT_CLASS = exports.BLOCK_CLASS = exports.DEFAULT_SAMPLE_RATE = exports.DEFAULT_SESSION_END_EVENT = exports.DEFAULT_SESSION_START_EVENT = exports.DEFAULT_SESSION_REPLAY_PROPERTY = exports.DEFAULT_EVENT_PROPERTY_PREFIX = void 0;
exports.MAX_IDB_STORAGE_LENGTH = exports.defaultSessionStore = exports.MAX_INTERVAL = exports.MIN_INTERVAL = exports.MAX_EVENT_LIST_SIZE_IN_BYTES = exports.STORAGE_PREFIX = exports.SESSION_REPLAY_STAGING_URL = exports.SESSION_REPLAY_EU_URL = exports.SESSION_REPLAY_SERVER_URL = exports.UNMASK_TEXT_CLASS = exports.MASK_TEXT_CLASS = exports.BLOCK_CLASS = exports.DEFAULT_SERVER_ZONE = exports.DEFAULT_SAMPLE_RATE = exports.DEFAULT_SESSION_END_EVENT = exports.DEFAULT_SESSION_START_EVENT = exports.DEFAULT_SESSION_REPLAY_PROPERTY = exports.DEFAULT_EVENT_PROPERTY_PREFIX = void 0;
var analytics_core_1 = require("@amplitude/analytics-core");
var analytics_types_1 = require("@amplitude/analytics-types");
exports.DEFAULT_EVENT_PROPERTY_PREFIX = '[Amplitude]';

@@ -9,2 +10,3 @@ exports.DEFAULT_SESSION_REPLAY_PROPERTY = "".concat(exports.DEFAULT_EVENT_PROPERTY_PREFIX, " Session Replay ID");

exports.DEFAULT_SAMPLE_RATE = 0;
exports.DEFAULT_SERVER_ZONE = analytics_types_1.ServerZone.US;
exports.BLOCK_CLASS = 'amp-block';

@@ -15,2 +17,3 @@ exports.MASK_TEXT_CLASS = 'amp-mask';

exports.SESSION_REPLAY_EU_URL = 'https://api-sr.eu.amplitude.com/sessions/v2/track';
exports.SESSION_REPLAY_STAGING_URL = 'https://api-sr.stag2.amplitude.com//sessions/v2/track';
exports.STORAGE_PREFIX = "".concat(analytics_core_1.AMPLITUDE_PREFIX, "_replay_unsent");

@@ -17,0 +20,0 @@ exports.MAX_EVENT_LIST_SIZE_IN_BYTES = 1 * 1000000; // 1 MB

@@ -50,3 +50,3 @@ import { Logger as ILogger } from '@amplitude/analytics-types';

getSampleRate(): number;
getServerUrl(): "https://api-sr.amplitude.com/sessions/v2/track" | "https://api-sr.eu.amplitude.com/sessions/v2/track";
getServerUrl(): "https://api-sr.amplitude.com/sessions/v2/track" | "https://api-sr.eu.amplitude.com/sessions/v2/track" | "https://api-sr.stag2.amplitude.com//sessions/v2/track";
getDeviceId(): string | undefined;

@@ -53,0 +53,0 @@ send(context: SessionReplayContext, useRetry?: boolean): Promise<void>;

@@ -370,4 +370,7 @@ Object.defineProperty(exports, "__esModule", { value: true });

SessionReplay.prototype.getServerUrl = function () {
var _a;
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.serverZone) === analytics_types_1.ServerZone.EU) {
var _a, _b;
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.serverZone) === analytics_types_1.ServerZone.STAGING) {
return constants_1.SESSION_REPLAY_STAGING_URL;
}
if (((_b = this.config) === null || _b === void 0 ? void 0 : _b.serverZone) === analytics_types_1.ServerZone.EU) {
return constants_1.SESSION_REPLAY_EU_URL;

@@ -374,0 +377,0 @@ }

@@ -5,3 +5,3 @@ import { __assign, __extends } from "tslib";

import { LogLevel } from '@amplitude/analytics-types';
import { DEFAULT_SAMPLE_RATE } from './constants';
import { DEFAULT_SAMPLE_RATE, DEFAULT_SERVER_ZONE } from './constants';
import { generateSessionReplayId } from './helpers';

@@ -28,2 +28,3 @@ export var getDefaultConfig = function () { return ({

_this.sessionId = options.sessionId;
_this.serverZone = options.serverZone || DEFAULT_SERVER_ZONE;
if (options.sessionId && options.deviceId) {

@@ -30,0 +31,0 @@ _this.sessionReplayId = generateSessionReplayId(options.sessionId, options.deviceId);

import { IDBStoreSession } from './typings/session-replay';
import { ServerZone } from '@amplitude/analytics-types';
export declare const DEFAULT_EVENT_PROPERTY_PREFIX = "[Amplitude]";

@@ -7,2 +8,3 @@ export declare const DEFAULT_SESSION_REPLAY_PROPERTY: string;

export declare const DEFAULT_SAMPLE_RATE = 0;
export declare const DEFAULT_SERVER_ZONE = ServerZone.US;
export declare const BLOCK_CLASS = "amp-block";

@@ -13,2 +15,3 @@ export declare const MASK_TEXT_CLASS = "amp-mask";

export declare const SESSION_REPLAY_EU_URL = "https://api-sr.eu.amplitude.com/sessions/v2/track";
export declare const SESSION_REPLAY_STAGING_URL = "https://api-sr.stag2.amplitude.com//sessions/v2/track";
export declare const STORAGE_PREFIX: string;

@@ -15,0 +18,0 @@ export declare const MAX_EVENT_LIST_SIZE_IN_BYTES: number;

import { AMPLITUDE_PREFIX } from '@amplitude/analytics-core';
import { ServerZone } from '@amplitude/analytics-types';
export var DEFAULT_EVENT_PROPERTY_PREFIX = '[Amplitude]';

@@ -7,2 +8,3 @@ export var DEFAULT_SESSION_REPLAY_PROPERTY = "".concat(DEFAULT_EVENT_PROPERTY_PREFIX, " Session Replay ID");

export var DEFAULT_SAMPLE_RATE = 0;
export var DEFAULT_SERVER_ZONE = ServerZone.US;
export var BLOCK_CLASS = 'amp-block';

@@ -13,2 +15,3 @@ export var MASK_TEXT_CLASS = 'amp-mask';

export var SESSION_REPLAY_EU_URL = 'https://api-sr.eu.amplitude.com/sessions/v2/track';
export var SESSION_REPLAY_STAGING_URL = 'https://api-sr.stag2.amplitude.com//sessions/v2/track';
export var STORAGE_PREFIX = "".concat(AMPLITUDE_PREFIX, "_replay_unsent");

@@ -15,0 +18,0 @@ export var MAX_EVENT_LIST_SIZE_IN_BYTES = 1 * 1000000; // 1 MB

@@ -50,3 +50,3 @@ import { Logger as ILogger } from '@amplitude/analytics-types';

getSampleRate(): number;
getServerUrl(): "https://api-sr.amplitude.com/sessions/v2/track" | "https://api-sr.eu.amplitude.com/sessions/v2/track";
getServerUrl(): "https://api-sr.amplitude.com/sessions/v2/track" | "https://api-sr.eu.amplitude.com/sessions/v2/track" | "https://api-sr.stag2.amplitude.com//sessions/v2/track";
getDeviceId(): string | undefined;

@@ -53,0 +53,0 @@ send(context: SessionReplayContext, useRetry?: boolean): Promise<void>;

@@ -8,3 +8,3 @@ import { __assign, __awaiter, __generator, __read } from "tslib";

import { SessionReplayConfig } from './config';
import { BLOCK_CLASS, DEFAULT_SAMPLE_RATE, DEFAULT_SESSION_REPLAY_PROPERTY, MASK_TEXT_CLASS, MAX_EVENT_LIST_SIZE_IN_BYTES, MAX_IDB_STORAGE_LENGTH, MAX_INTERVAL, MIN_INTERVAL, SESSION_REPLAY_EU_URL as SESSION_REPLAY_EU_SERVER_URL, SESSION_REPLAY_SERVER_URL, STORAGE_PREFIX, defaultSessionStore, } from './constants';
import { BLOCK_CLASS, DEFAULT_SAMPLE_RATE, DEFAULT_SESSION_REPLAY_PROPERTY, MASK_TEXT_CLASS, MAX_EVENT_LIST_SIZE_IN_BYTES, MAX_IDB_STORAGE_LENGTH, MAX_INTERVAL, MIN_INTERVAL, SESSION_REPLAY_EU_URL as SESSION_REPLAY_EU_SERVER_URL, SESSION_REPLAY_STAGING_URL as SESSION_REPLAY_STAGING_SERVER_URL, SESSION_REPLAY_SERVER_URL, STORAGE_PREFIX, defaultSessionStore, } from './constants';
import { isSessionInSample, maskInputFn, getCurrentUrl, generateSessionReplayId } from './helpers';

@@ -369,4 +369,7 @@ import { MAX_RETRIES_EXCEEDED_MESSAGE, MISSING_API_KEY_MESSAGE, MISSING_DEVICE_ID_MESSAGE, STORAGE_FAILURE, UNEXPECTED_ERROR_MESSAGE, UNEXPECTED_NETWORK_ERROR_MESSAGE, getSuccessMessage, } from './messages';

SessionReplay.prototype.getServerUrl = function () {
var _a;
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.serverZone) === ServerZone.EU) {
var _a, _b;
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.serverZone) === ServerZone.STAGING) {
return SESSION_REPLAY_STAGING_SERVER_URL;
}
if (((_b = this.config) === null || _b === void 0 ? void 0 : _b.serverZone) === ServerZone.EU) {
return SESSION_REPLAY_EU_SERVER_URL;

@@ -373,0 +376,0 @@ }

import { IDBStoreSession } from './typings/session-replay';
import { ServerZone } from '@amplitude/analytics-types';
export declare const DEFAULT_EVENT_PROPERTY_PREFIX = "[Amplitude]";

@@ -7,2 +8,3 @@ export declare const DEFAULT_SESSION_REPLAY_PROPERTY: string;

export declare const DEFAULT_SAMPLE_RATE = 0;
export declare const DEFAULT_SERVER_ZONE = ServerZone.US;
export declare const BLOCK_CLASS = "amp-block";

@@ -13,2 +15,3 @@ export declare const MASK_TEXT_CLASS = "amp-mask";

export declare const SESSION_REPLAY_EU_URL = "https://api-sr.eu.amplitude.com/sessions/v2/track";
export declare const SESSION_REPLAY_STAGING_URL = "https://api-sr.stag2.amplitude.com//sessions/v2/track";
export declare const STORAGE_PREFIX: string;

@@ -15,0 +18,0 @@ export declare const MAX_EVENT_LIST_SIZE_IN_BYTES: number;

@@ -50,3 +50,3 @@ import { Logger as ILogger } from '@amplitude/analytics-types';

getSampleRate(): number;
getServerUrl(): "https://api-sr.amplitude.com/sessions/v2/track" | "https://api-sr.eu.amplitude.com/sessions/v2/track";
getServerUrl(): "https://api-sr.amplitude.com/sessions/v2/track" | "https://api-sr.eu.amplitude.com/sessions/v2/track" | "https://api-sr.stag2.amplitude.com//sessions/v2/track";
getDeviceId(): string | undefined;

@@ -53,0 +53,0 @@ send(context: SessionReplayContext, useRetry?: boolean): Promise<void>;

{
"name": "@amplitude/session-replay-browser",
"version": "0.7.0",
"version": "0.7.1",
"description": "",

@@ -60,3 +60,3 @@ "author": "Amplitude Inc",

],
"gitHead": "f8cf3440d58fcf106c02fa28b8532cba7f96e088"
"gitHead": "143b22ce7063d7a630a9a8e3e20af4c8d261dd64"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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