@statsig/session-replay 3.15.1 → 3.15.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/session-replay",
3
- "version": "3.15.1",
3
+ "version": "3.15.3",
4
4
  "license": "ISC",
5
5
  "homepage": "https://github.com/statsig-io/js-client-monorepo",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "rrweb": "2.0.0-alpha.14",
13
- "@statsig/client-core": "3.15.1"
13
+ "@statsig/client-core": "3.15.3"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@rrweb/types": "2.0.0-alpha.14"
@@ -51,8 +51,8 @@ class SessionReplay {
51
51
  // Note: this exists as a separate function to ensure closure scope only contains `sdkKey`
52
52
  const { sdkKey } = this._client.getContext();
53
53
  (0, client_core_1._subscribeToVisiblityChanged)((vis) => {
54
- var _a;
55
- const inst = (_a = __STATSIG__ === null || __STATSIG__ === void 0 ? void 0 : __STATSIG__.srInstances) === null || _a === void 0 ? void 0 : _a[sdkKey];
54
+ var _a, _b;
55
+ const inst = (_b = (_a = (0, client_core_1._getStatsigGlobal)()) === null || _a === void 0 ? void 0 : _a.srInstances) === null || _b === void 0 ? void 0 : _b[sdkKey];
56
56
  if (inst instanceof SessionReplay) {
57
57
  inst._onVisibilityChanged(vis);
58
58
  }
package/src/index.js CHANGED
@@ -1,13 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatsigSessionReplayPlugin = exports.runStatsigSessionReplay = exports.SessionReplay = exports.SessionReplayClient = void 0;
4
+ const client_core_1 = require("@statsig/client-core");
4
5
  const SessionReplay_1 = require("./SessionReplay");
5
6
  Object.defineProperty(exports, "SessionReplay", { enumerable: true, get: function () { return SessionReplay_1.SessionReplay; } });
6
7
  Object.defineProperty(exports, "StatsigSessionReplayPlugin", { enumerable: true, get: function () { return SessionReplay_1.StatsigSessionReplayPlugin; } });
7
8
  Object.defineProperty(exports, "runStatsigSessionReplay", { enumerable: true, get: function () { return SessionReplay_1.runStatsigSessionReplay; } });
8
9
  const SessionReplayClient_1 = require("./SessionReplayClient");
9
10
  Object.defineProperty(exports, "SessionReplayClient", { enumerable: true, get: function () { return SessionReplayClient_1.SessionReplayClient; } });
10
- __STATSIG__ = Object.assign(Object.assign({}, (__STATSIG__ !== null && __STATSIG__ !== void 0 ? __STATSIG__ : {})), { SessionReplayClient: SessionReplayClient_1.SessionReplayClient,
11
+ Object.assign((0, client_core_1._getStatsigGlobal)(), {
12
+ SessionReplayClient: SessionReplayClient_1.SessionReplayClient,
11
13
  SessionReplay: SessionReplay_1.SessionReplay,
12
14
  runStatsigSessionReplay: SessionReplay_1.runStatsigSessionReplay,
13
- StatsigSessionReplayPlugin: SessionReplay_1.StatsigSessionReplayPlugin });
15
+ StatsigSessionReplayPlugin: SessionReplay_1.StatsigSessionReplayPlugin,
16
+ });