@statsig/cli-session-replay-node 3.31.0 → 3.31.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/cli-session-replay-node",
3
- "version": "3.31.0",
3
+ "version": "3.31.1",
4
4
  "license": "ISC",
5
5
  "homepage": "https://github.com/statsig-io/js-client-monorepo",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  "directory": "packages/cli-session-replay-node"
10
10
  },
11
11
  "dependencies": {
12
- "@statsig/client-core": "3.31.0",
12
+ "@statsig/client-core": "3.31.1",
13
13
  "intercept-stdout": "^0.1.2"
14
14
  },
15
15
  "type": "commonjs",
@@ -32,8 +32,7 @@ class CliRecording {
32
32
  this._client = client;
33
33
  this._adapter = adapterFactory(this._buildController());
34
34
  // Read data from client
35
- const clientContext = this._client.getContext();
36
- this._sessionID = this._getSessionIdFromClient(clientContext);
35
+ this._sessionID = this._getSessionIdFromClient();
37
36
  // Subscribe to events
38
37
  const timeout = setTimeout(() => {
39
38
  this.finish('timeout');
@@ -140,8 +139,9 @@ class CliRecording {
140
139
  metadata,
141
140
  });
142
141
  }
143
- _getSessionIdFromClient(context = this._client.getContext()) {
144
- return context.session.data.sessionID;
142
+ _getSessionIdFromClient() {
143
+ const context = this._client.getContextHandle();
144
+ return context.getSession().data.sessionID;
145
145
  }
146
146
  _recTime(now = Date.now()) {
147
147
  return (now - this.startTimestamp) / 1000;