@statsig/session-replay 3.0.0 → 3.2.0-beta.1
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 +7 -1
- package/src/SessionReplay.js +12 -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": "3.0.
|
|
3
|
+
"version": "3.2.0-beta.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"rrweb": "2.0.0-alpha.12",
|
|
6
|
-
"@statsig/client-core": "3.0.
|
|
6
|
+
"@statsig/client-core": "3.2.0-beta.1"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@rrweb/types": "2.0.0-alpha.12"
|
package/src/SessionReplay.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { PrecomputedEvaluationsInterface } from '@statsig/client-core';
|
|
1
|
+
import { PrecomputedEvaluationsInterface, StatsigPlugin } from '@statsig/client-core';
|
|
2
2
|
import { RRWebConfig } from './SessionReplayClient';
|
|
3
3
|
type SessionReplayOptions = {
|
|
4
4
|
rrwebConfig?: RRWebConfig;
|
|
5
5
|
forceRecording?: boolean;
|
|
6
6
|
};
|
|
7
|
+
export declare class StatsigSessionReplayPlugin implements StatsigPlugin<PrecomputedEvaluationsInterface> {
|
|
8
|
+
private readonly options?;
|
|
9
|
+
readonly __plugin = "session-replay";
|
|
10
|
+
constructor(options?: SessionReplayOptions | undefined);
|
|
11
|
+
bind(client: PrecomputedEvaluationsInterface): void;
|
|
12
|
+
}
|
|
7
13
|
export declare function runStatsigSessionReplay(client: PrecomputedEvaluationsInterface, options?: SessionReplayOptions): void;
|
|
8
14
|
export declare class SessionReplay {
|
|
9
15
|
private _client;
|
package/src/SessionReplay.js
CHANGED
|
@@ -9,10 +9,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SessionReplay = exports.runStatsigSessionReplay = void 0;
|
|
12
|
+
exports.SessionReplay = exports.runStatsigSessionReplay = exports.StatsigSessionReplayPlugin = void 0;
|
|
13
13
|
const client_core_1 = require("@statsig/client-core");
|
|
14
14
|
const SessionReplayClient_1 = require("./SessionReplayClient");
|
|
15
15
|
const MAX_REPLAY_PAYLOAD_BYTES = 2048;
|
|
16
|
+
class StatsigSessionReplayPlugin {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.options = options;
|
|
19
|
+
this.__plugin = 'session-replay';
|
|
20
|
+
}
|
|
21
|
+
bind(client) {
|
|
22
|
+
runStatsigSessionReplay(client, this.options);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.StatsigSessionReplayPlugin = StatsigSessionReplayPlugin;
|
|
16
26
|
function runStatsigSessionReplay(client, options) {
|
|
17
27
|
new SessionReplay(client, options);
|
|
18
28
|
}
|
|
@@ -126,6 +136,7 @@ class SessionReplay {
|
|
|
126
136
|
session_end_ts: String(data.endTime),
|
|
127
137
|
clicks_captured_cumulative: String(data.clickCount),
|
|
128
138
|
rrweb_events: payload,
|
|
139
|
+
rrweb_payload_size: String(payload.length),
|
|
129
140
|
session_replay_sdk_version: client_core_1.SDK_VERSION,
|
|
130
141
|
},
|
|
131
142
|
};
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SessionReplay, runStatsigSessionReplay } from './SessionReplay';
|
|
1
|
+
import { SessionReplay, StatsigSessionReplayPlugin, runStatsigSessionReplay } from './SessionReplay';
|
|
2
2
|
import { SessionReplayClient } from './SessionReplayClient';
|
|
3
3
|
export type { ReplaySessionData as ReplayData, ReplayEvent, } from './SessionReplayClient';
|
|
4
|
-
export { SessionReplayClient, SessionReplay, runStatsigSessionReplay };
|
|
4
|
+
export { SessionReplayClient, SessionReplay, runStatsigSessionReplay, StatsigSessionReplayPlugin, };
|
package/src/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runStatsigSessionReplay = exports.SessionReplay = exports.SessionReplayClient = void 0;
|
|
3
|
+
exports.StatsigSessionReplayPlugin = 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, "StatsigSessionReplayPlugin", { enumerable: true, get: function () { return SessionReplay_1.StatsigSessionReplayPlugin; } });
|
|
6
7
|
Object.defineProperty(exports, "runStatsigSessionReplay", { enumerable: true, get: function () { return SessionReplay_1.runStatsigSessionReplay; } });
|
|
7
8
|
const SessionReplayClient_1 = require("./SessionReplayClient");
|
|
8
9
|
Object.defineProperty(exports, "SessionReplayClient", { enumerable: true, get: function () { return SessionReplayClient_1.SessionReplayClient; } });
|
|
9
10
|
__STATSIG__ = Object.assign(Object.assign({}, (__STATSIG__ !== null && __STATSIG__ !== void 0 ? __STATSIG__ : {})), { SessionReplayClient: SessionReplayClient_1.SessionReplayClient,
|
|
10
11
|
SessionReplay: SessionReplay_1.SessionReplay,
|
|
11
|
-
runStatsigSessionReplay: SessionReplay_1.runStatsigSessionReplay
|
|
12
|
+
runStatsigSessionReplay: SessionReplay_1.runStatsigSessionReplay,
|
|
13
|
+
StatsigSessionReplayPlugin: SessionReplay_1.StatsigSessionReplayPlugin });
|