@cedarai/session-replay-sdk 0.5.0 → 0.6.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/dist/index.d.ts +4 -0
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface SDKConfig {
|
|
2
2
|
serverUrl: string;
|
|
3
3
|
cedarSessionId: string;
|
|
4
|
+
environment: string;
|
|
5
|
+
developer?: string;
|
|
4
6
|
batchIntervalMs?: number;
|
|
5
7
|
batchMaxSize?: number;
|
|
6
8
|
console?: ConsoleConfig;
|
|
@@ -23,6 +25,8 @@ interface RecorderConfig {
|
|
|
23
25
|
interface InitConfig {
|
|
24
26
|
serverUrl: string;
|
|
25
27
|
cedarSessionId: string;
|
|
28
|
+
environment: string;
|
|
29
|
+
developer?: string;
|
|
26
30
|
batchIntervalMs?: number;
|
|
27
31
|
batchMaxSize?: number;
|
|
28
32
|
console?: SDKConfig['console'];
|
package/dist/index.js
CHANGED
|
@@ -150,7 +150,7 @@ var Transport = class {
|
|
|
150
150
|
const json = JSON.stringify(payload);
|
|
151
151
|
gzipCompress(json).then((compressed) => {
|
|
152
152
|
if (this.queue.length > 0) {
|
|
153
|
-
this.pendingBeaconBlob = new Blob([compressed], { type: "
|
|
153
|
+
this.pendingBeaconBlob = new Blob([compressed], { type: "text/plain" });
|
|
154
154
|
this.pendingBeaconUrl = `${this.config.serverUrl}/api/ingest?encoding=gzip`;
|
|
155
155
|
}
|
|
156
156
|
}).catch(() => {
|
|
@@ -165,7 +165,11 @@ var Transport = class {
|
|
|
165
165
|
viewportWidth: typeof window !== "undefined" ? window.innerWidth : 0,
|
|
166
166
|
viewportHeight: typeof window !== "undefined" ? window.innerHeight : 0,
|
|
167
167
|
url: typeof window !== "undefined" ? window.location.href : "",
|
|
168
|
-
events
|
|
168
|
+
events,
|
|
169
|
+
metadata: {
|
|
170
|
+
environment: this.config.environment,
|
|
171
|
+
...this.config.developer ? { developer: this.config.developer } : {}
|
|
172
|
+
}
|
|
169
173
|
};
|
|
170
174
|
}
|
|
171
175
|
estimateQueueSize() {
|
|
@@ -666,6 +670,8 @@ var CedarReplay = {
|
|
|
666
670
|
{
|
|
667
671
|
serverUrl: config.serverUrl,
|
|
668
672
|
cedarSessionId: config.cedarSessionId,
|
|
673
|
+
environment: config.environment,
|
|
674
|
+
developer: config.developer,
|
|
669
675
|
batchIntervalMs: config.batchIntervalMs,
|
|
670
676
|
batchMaxSize: config.batchMaxSize
|
|
671
677
|
},
|