@statsig/session-replay 0.0.1-beta.25 → 0.0.1-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/SessionReplay.d.ts +1 -0
- package/src/SessionReplay.js +11 -1
- package/src/index.d.ts +2 -2
- package/src/index.js +4 -2
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/session-replay",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.26",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"rrweb": "2.0.0-alpha.12",
|
|
6
|
-
"@statsig/client-core": "0.0.1-beta.
|
|
6
|
+
"@statsig/client-core": "0.0.1-beta.26"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@rrweb/types": "2.0.0-alpha.12"
|
package/src/SessionReplay.d.ts
CHANGED
package/src/SessionReplay.js
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SessionReplay = void 0;
|
|
3
|
+
exports.SessionReplay = exports.runStatsigSessionReplay = void 0;
|
|
4
4
|
const client_core_1 = require("@statsig/client-core");
|
|
5
5
|
const SessionReplayClient_1 = require("./SessionReplayClient");
|
|
6
6
|
const MAX_REPLAY_PAYLOAD_BYTES = 2048;
|
|
7
|
+
function runStatsigSessionReplay(client) {
|
|
8
|
+
new SessionReplay(client);
|
|
9
|
+
}
|
|
10
|
+
exports.runStatsigSessionReplay = runStatsigSessionReplay;
|
|
7
11
|
class SessionReplay {
|
|
8
12
|
constructor(_client) {
|
|
13
|
+
var _a;
|
|
9
14
|
this._client = _client;
|
|
10
15
|
this._sessionData = null;
|
|
11
16
|
this._events = [];
|
|
12
17
|
this._sessionID = '';
|
|
18
|
+
const { sdkKey } = _client.getContext();
|
|
19
|
+
__STATSIG__ = __STATSIG__ !== null && __STATSIG__ !== void 0 ? __STATSIG__ : {};
|
|
20
|
+
const instances = (_a = __STATSIG__.srInstances) !== null && _a !== void 0 ? _a : {};
|
|
21
|
+
instances[sdkKey] = this;
|
|
22
|
+
__STATSIG__.srInstances = instances;
|
|
13
23
|
this._replayer = new SessionReplayClient_1.SessionReplayClient();
|
|
14
24
|
this._client.on('pre_shutdown', () => this._shutdown());
|
|
15
25
|
this._client.on('values_updated', () => this._attemptToStartRecording());
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SessionReplay } from './SessionReplay';
|
|
1
|
+
import { SessionReplay, runStatsigSessionReplay } from './SessionReplay';
|
|
2
2
|
import { SessionReplayClient } from './SessionReplayClient';
|
|
3
3
|
export type { ReplaySessionData as ReplayData, ReplayEvent, } from './SessionReplayClient';
|
|
4
|
-
export { SessionReplayClient, SessionReplay };
|
|
4
|
+
export { SessionReplayClient, SessionReplay, runStatsigSessionReplay };
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SessionReplay = exports.SessionReplayClient = void 0;
|
|
3
|
+
exports.runStatsigSessionReplay = exports.SessionReplay = exports.SessionReplayClient = void 0;
|
|
4
4
|
const SessionReplay_1 = require("./SessionReplay");
|
|
5
5
|
Object.defineProperty(exports, "SessionReplay", { enumerable: true, get: function () { return SessionReplay_1.SessionReplay; } });
|
|
6
|
+
Object.defineProperty(exports, "runStatsigSessionReplay", { enumerable: true, get: function () { return SessionReplay_1.runStatsigSessionReplay; } });
|
|
6
7
|
const SessionReplayClient_1 = require("./SessionReplayClient");
|
|
7
8
|
Object.defineProperty(exports, "SessionReplayClient", { enumerable: true, get: function () { return SessionReplayClient_1.SessionReplayClient; } });
|
|
8
9
|
__STATSIG__ = Object.assign(Object.assign({}, (__STATSIG__ !== null && __STATSIG__ !== void 0 ? __STATSIG__ : {})), { SessionReplayClient: SessionReplayClient_1.SessionReplayClient,
|
|
9
|
-
SessionReplay: SessionReplay_1.SessionReplay
|
|
10
|
+
SessionReplay: SessionReplay_1.SessionReplay,
|
|
11
|
+
runStatsigSessionReplay: SessionReplay_1.runStatsigSessionReplay });
|