@amplitude/session-replay-browser
Advanced tools
Comparing version 1.14.1 to 1.14.2
import { RemoteConfigFetch } from '@amplitude/analytics-remote-config'; | ||
import { Logger } from '@amplitude/analytics-types'; | ||
import { SessionReplayOptions } from '../typings/session-replay'; | ||
import { SessionReplayLocalConfig as ISessionReplayLocalConfig, PrivacyConfig, SessionReplayJoinedConfig, SessionReplayRemoteConfig } from './types'; | ||
import { Logger } from '@amplitude/analytics-types'; | ||
export declare const removeInvalidSelectorsFromPrivacyConfig: (privacyConfig: PrivacyConfig, loggerProvider: Logger) => PrivacyConfig; | ||
export declare class SessionReplayJoinedConfigGenerator { | ||
localConfig: ISessionReplayLocalConfig; | ||
remoteConfigFetch: RemoteConfigFetch<SessionReplayRemoteConfig> | undefined; | ||
constructor(apiKey: string, options: SessionReplayOptions); | ||
initialize(): Promise<void>; | ||
private readonly localConfig; | ||
private readonly remoteConfigFetch; | ||
constructor(remoteConfigFetch: RemoteConfigFetch<SessionReplayRemoteConfig>, localConfig: ISessionReplayLocalConfig); | ||
generateJoinedConfig(sessionId?: number): Promise<SessionReplayJoinedConfig>; | ||
@@ -12,0 +11,0 @@ } |
@@ -6,4 +6,4 @@ var _this = this; | ||
var analytics_remote_config_1 = require("@amplitude/analytics-remote-config"); | ||
var helpers_1 = require("../helpers"); | ||
var local_config_1 = require("./local-config"); | ||
var helpers_1 = require("../helpers"); | ||
var removeInvalidSelectorsFromPrivacyConfig = function (privacyConfig, loggerProvider) { | ||
@@ -39,23 +39,6 @@ // This allows us to not search the DOM. | ||
var SessionReplayJoinedConfigGenerator = /** @class */ (function () { | ||
function SessionReplayJoinedConfigGenerator(apiKey, options) { | ||
this.localConfig = new local_config_1.SessionReplayLocalConfig(apiKey, options); | ||
function SessionReplayJoinedConfigGenerator(remoteConfigFetch, localConfig) { | ||
this.localConfig = localConfig; | ||
this.remoteConfigFetch = remoteConfigFetch; | ||
} | ||
SessionReplayJoinedConfigGenerator.prototype.initialize = function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var _a; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
_a = this; | ||
return [4 /*yield*/, (0, analytics_remote_config_1.createRemoteConfigFetch)({ | ||
localConfig: this.localConfig, | ||
configKeys: ['sessionReplay'], | ||
})]; | ||
case 1: | ||
_a.remoteConfigFetch = _b.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
SessionReplayJoinedConfigGenerator.prototype.generateJoinedConfig = function (sessionId) { | ||
@@ -78,6 +61,2 @@ var _a, _b, _c; | ||
_j.trys.push([1, 5, , 6]); | ||
if (!this.remoteConfigFetch) { | ||
config.captureEnabled = false; | ||
return [2 /*return*/, config]; | ||
} | ||
return [4 /*yield*/, this.remoteConfigFetch.getRemoteConfig('sessionReplay', 'sr_sampling_config', sessionId)]; | ||
@@ -237,11 +216,14 @@ case 2: | ||
var createSessionReplayJoinedConfigGenerator = function (apiKey, options) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var joinedConfigGenerator; | ||
var localConfig, remoteConfigFetch; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
joinedConfigGenerator = new SessionReplayJoinedConfigGenerator(apiKey, options); | ||
return [4 /*yield*/, joinedConfigGenerator.initialize()]; | ||
localConfig = new local_config_1.SessionReplayLocalConfig(apiKey, options); | ||
return [4 /*yield*/, (0, analytics_remote_config_1.createRemoteConfigFetch)({ | ||
localConfig: localConfig, | ||
configKeys: ['sessionReplay'], | ||
})]; | ||
case 1: | ||
_a.sent(); | ||
return [2 /*return*/, joinedConfigGenerator]; | ||
remoteConfigFetch = _a.sent(); | ||
return [2 /*return*/, new SessionReplayJoinedConfigGenerator(remoteConfigFetch, localConfig)]; | ||
} | ||
@@ -248,0 +230,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.14.1"; | ||
export declare const VERSION = "1.14.2"; | ||
//# sourceMappingURL=version.d.ts.map |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
// Autogenerated by `yarn version-file`. DO NOT EDIT | ||
exports.VERSION = '1.14.1'; | ||
exports.VERSION = '1.14.2'; | ||
//# sourceMappingURL=version.js.map |
import { RemoteConfigFetch } from '@amplitude/analytics-remote-config'; | ||
import { Logger } from '@amplitude/analytics-types'; | ||
import { SessionReplayOptions } from '../typings/session-replay'; | ||
import { SessionReplayLocalConfig as ISessionReplayLocalConfig, PrivacyConfig, SessionReplayJoinedConfig, SessionReplayRemoteConfig } from './types'; | ||
import { Logger } from '@amplitude/analytics-types'; | ||
export declare const removeInvalidSelectorsFromPrivacyConfig: (privacyConfig: PrivacyConfig, loggerProvider: Logger) => PrivacyConfig; | ||
export declare class SessionReplayJoinedConfigGenerator { | ||
localConfig: ISessionReplayLocalConfig; | ||
remoteConfigFetch: RemoteConfigFetch<SessionReplayRemoteConfig> | undefined; | ||
constructor(apiKey: string, options: SessionReplayOptions); | ||
initialize(): Promise<void>; | ||
private readonly localConfig; | ||
private readonly remoteConfigFetch; | ||
constructor(remoteConfigFetch: RemoteConfigFetch<SessionReplayRemoteConfig>, localConfig: ISessionReplayLocalConfig); | ||
generateJoinedConfig(sessionId?: number): Promise<SessionReplayJoinedConfig>; | ||
@@ -12,0 +11,0 @@ } |
import { __assign, __awaiter, __generator, __read, __values } from "tslib"; | ||
import { createRemoteConfigFetch } from '@amplitude/analytics-remote-config'; | ||
import { getDebugConfig } from '../helpers'; | ||
import { SessionReplayLocalConfig } from './local-config'; | ||
import { getDebugConfig } from '../helpers'; | ||
export var removeInvalidSelectorsFromPrivacyConfig = function (privacyConfig, loggerProvider) { | ||
@@ -34,23 +34,6 @@ // This allows us to not search the DOM. | ||
var SessionReplayJoinedConfigGenerator = /** @class */ (function () { | ||
function SessionReplayJoinedConfigGenerator(apiKey, options) { | ||
this.localConfig = new SessionReplayLocalConfig(apiKey, options); | ||
function SessionReplayJoinedConfigGenerator(remoteConfigFetch, localConfig) { | ||
this.localConfig = localConfig; | ||
this.remoteConfigFetch = remoteConfigFetch; | ||
} | ||
SessionReplayJoinedConfigGenerator.prototype.initialize = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
_a = this; | ||
return [4 /*yield*/, createRemoteConfigFetch({ | ||
localConfig: this.localConfig, | ||
configKeys: ['sessionReplay'], | ||
})]; | ||
case 1: | ||
_a.remoteConfigFetch = _b.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
SessionReplayJoinedConfigGenerator.prototype.generateJoinedConfig = function (sessionId) { | ||
@@ -73,6 +56,2 @@ var _a, _b, _c; | ||
_j.trys.push([1, 5, , 6]); | ||
if (!this.remoteConfigFetch) { | ||
config.captureEnabled = false; | ||
return [2 /*return*/, config]; | ||
} | ||
return [4 /*yield*/, this.remoteConfigFetch.getRemoteConfig('sessionReplay', 'sr_sampling_config', sessionId)]; | ||
@@ -232,11 +211,14 @@ case 2: | ||
export var createSessionReplayJoinedConfigGenerator = function (apiKey, options) { return __awaiter(void 0, void 0, void 0, function () { | ||
var joinedConfigGenerator; | ||
var localConfig, remoteConfigFetch; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
joinedConfigGenerator = new SessionReplayJoinedConfigGenerator(apiKey, options); | ||
return [4 /*yield*/, joinedConfigGenerator.initialize()]; | ||
localConfig = new SessionReplayLocalConfig(apiKey, options); | ||
return [4 /*yield*/, createRemoteConfigFetch({ | ||
localConfig: localConfig, | ||
configKeys: ['sessionReplay'], | ||
})]; | ||
case 1: | ||
_a.sent(); | ||
return [2 /*return*/, joinedConfigGenerator]; | ||
remoteConfigFetch = _a.sent(); | ||
return [2 /*return*/, new SessionReplayJoinedConfigGenerator(remoteConfigFetch, localConfig)]; | ||
} | ||
@@ -243,0 +225,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.14.1"; | ||
export declare const VERSION = "1.14.2"; | ||
//# sourceMappingURL=version.d.ts.map |
// Autogenerated by `yarn version-file`. DO NOT EDIT | ||
export var VERSION = '1.14.1'; | ||
export var VERSION = '1.14.2'; | ||
//# sourceMappingURL=version.js.map |
import { RemoteConfigFetch } from '@amplitude/analytics-remote-config'; | ||
import { Logger } from '@amplitude/analytics-types'; | ||
import { SessionReplayOptions } from '../typings/session-replay'; | ||
import { SessionReplayLocalConfig as ISessionReplayLocalConfig, PrivacyConfig, SessionReplayJoinedConfig, SessionReplayRemoteConfig } from './types'; | ||
import { Logger } from '@amplitude/analytics-types'; | ||
export declare const removeInvalidSelectorsFromPrivacyConfig: (privacyConfig: PrivacyConfig, loggerProvider: Logger) => PrivacyConfig; | ||
export declare class SessionReplayJoinedConfigGenerator { | ||
localConfig: ISessionReplayLocalConfig; | ||
remoteConfigFetch: RemoteConfigFetch<SessionReplayRemoteConfig> | undefined; | ||
constructor(apiKey: string, options: SessionReplayOptions); | ||
initialize(): Promise<void>; | ||
private readonly localConfig; | ||
private readonly remoteConfigFetch; | ||
constructor(remoteConfigFetch: RemoteConfigFetch<SessionReplayRemoteConfig>, localConfig: ISessionReplayLocalConfig); | ||
generateJoinedConfig(sessionId?: number): Promise<SessionReplayJoinedConfig>; | ||
@@ -12,0 +11,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.14.1"; | ||
export declare const VERSION = "1.14.2"; | ||
//# sourceMappingURL=version.d.ts.map |
{ | ||
"name": "@amplitude/session-replay-browser", | ||
"version": "1.14.1", | ||
"version": "1.14.2", | ||
"description": "", | ||
@@ -45,3 +45,3 @@ "author": "Amplitude Inc", | ||
"@amplitude/analytics-types": ">=1 <3", | ||
"@amplitude/rrweb": "2.0.0-alpha.20", | ||
"@amplitude/rrweb": "2.0.0-alpha.21", | ||
"idb": "^8.0.0", | ||
@@ -67,3 +67,3 @@ "tslib": "^2.4.1" | ||
], | ||
"gitHead": "7ef4e4d40766492eae05ae60913b278b1f94ae7f" | ||
"gitHead": "07d0b255c2a6c74776468c23cd7a74733ff9ea69" | ||
} |
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
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
1065565
7849
+ Added@amplitude/rrweb@2.0.0-alpha.21(transitive)
- Removed@amplitude/rrweb@2.0.0-alpha.20(transitive)