@offscript/sdk 0.1.9 → 0.1.11
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/adapters/nuxt.cjs +3 -3
- package/dist/adapters/nuxt.js +2 -2
- package/dist/adapters/vanilla.cjs +5 -5
- package/dist/adapters/vanilla.js +3 -3
- package/dist/adapters/vue.cjs +3 -3
- package/dist/adapters/vue.js +2 -2
- package/dist/{chunk-M2E6CWGK.cjs → chunk-4IHD7THY.cjs} +3 -3
- package/dist/chunk-4IHD7THY.cjs.map +1 -0
- package/dist/{chunk-KKEYBVTX.js → chunk-6MFPECOC.js} +3 -3
- package/dist/chunk-6MFPECOC.js.map +1 -0
- package/dist/{chunk-U232L3JD.js → chunk-DJ4AXIYI.js} +3 -3
- package/dist/{chunk-U232L3JD.js.map → chunk-DJ4AXIYI.js.map} +1 -1
- package/dist/{chunk-WK242AJ2.cjs → chunk-EVEXSHUF.cjs} +4 -4
- package/dist/{chunk-WK242AJ2.cjs.map → chunk-EVEXSHUF.cjs.map} +1 -1
- package/dist/{chunk-YPGRVKY4.cjs → chunk-IWIRG4LY.cjs} +22 -15
- package/dist/chunk-IWIRG4LY.cjs.map +1 -0
- package/dist/{chunk-5F637PDG.js → chunk-OKTRTFLH.js} +17 -10
- package/dist/chunk-OKTRTFLH.js.map +1 -0
- package/dist/core/OffscriptSDK.d.ts +1 -1
- package/dist/index.cjs +20 -20
- package/dist/index.js +3 -3
- package/dist/playwright.cjs +13 -13
- package/dist/playwright.js +1 -1
- package/dist/recorders/RRWebRecorder.d.ts +1 -0
- package/dist/types/events.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-5F637PDG.js.map +0 -1
- package/dist/chunk-KKEYBVTX.js.map +0 -1
- package/dist/chunk-M2E6CWGK.cjs.map +0 -1
- package/dist/chunk-YPGRVKY4.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildPlaywrightContract, SDK_VERSION, SelectorGenerator, ACTION_SCHEMA_VERSION } from './chunk-
|
|
1
|
+
import { buildPlaywrightContract, SDK_VERSION, SelectorGenerator, ACTION_SCHEMA_VERSION } from './chunk-6MFPECOC.js';
|
|
2
2
|
|
|
3
3
|
// src/types/config.ts
|
|
4
4
|
var DEFAULT_RECORDING = {
|
|
@@ -1264,6 +1264,7 @@ var RRWebRecorder = class {
|
|
|
1264
1264
|
this.needsSnapshot = false;
|
|
1265
1265
|
this.snapshotsTaken = 0;
|
|
1266
1266
|
this.settling = false;
|
|
1267
|
+
this.recoveringSnapshot = false;
|
|
1267
1268
|
}
|
|
1268
1269
|
async start() {
|
|
1269
1270
|
this.stopped = false;
|
|
@@ -1402,11 +1403,16 @@ var RRWebRecorder = class {
|
|
|
1402
1403
|
}
|
|
1403
1404
|
}
|
|
1404
1405
|
takeFullSnapshot() {
|
|
1405
|
-
if (this.stopped) return;
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
this.
|
|
1409
|
-
|
|
1406
|
+
if (this.stopped || this.recoveringSnapshot) return;
|
|
1407
|
+
this.recoveringSnapshot = true;
|
|
1408
|
+
try {
|
|
1409
|
+
guard(this.sink, this.name, () => {
|
|
1410
|
+
if (!this.mod?.record) return;
|
|
1411
|
+
this.mod.record.takeFullSnapshot(true);
|
|
1412
|
+
});
|
|
1413
|
+
} finally {
|
|
1414
|
+
this.recoveringSnapshot = false;
|
|
1415
|
+
}
|
|
1410
1416
|
}
|
|
1411
1417
|
addCustomEvent(tag, payload) {
|
|
1412
1418
|
if (this.stopped) return;
|
|
@@ -2302,10 +2308,11 @@ async function encodeRecordingPayload(payload) {
|
|
|
2302
2308
|
try {
|
|
2303
2309
|
const stream = new CompressionStreamCtor("gzip");
|
|
2304
2310
|
const writer = stream.writable.getWriter();
|
|
2311
|
+
const compressedBody = new Response(stream.readable).blob();
|
|
2305
2312
|
await writer.write(new TextEncoder().encode(json));
|
|
2306
2313
|
await writer.close();
|
|
2307
2314
|
return {
|
|
2308
|
-
body: await
|
|
2315
|
+
body: await compressedBody,
|
|
2309
2316
|
contentEncoding: "gzip"
|
|
2310
2317
|
};
|
|
2311
2318
|
} catch {
|
|
@@ -2521,7 +2528,7 @@ var Offscript = class {
|
|
|
2521
2528
|
this.rrweb = this.actions = this.context = void 0;
|
|
2522
2529
|
this.payload = this.buildPayload();
|
|
2523
2530
|
this.setStatus("stopped");
|
|
2524
|
-
|
|
2531
|
+
if (this.store) this.save(this.store.flush());
|
|
2525
2532
|
this.bus.emit("recordingEnd", this.payload);
|
|
2526
2533
|
return this.payload;
|
|
2527
2534
|
}
|
|
@@ -2763,5 +2770,5 @@ var Offscript = class {
|
|
|
2763
2770
|
Offscript.version = SDK_VERSION;
|
|
2764
2771
|
|
|
2765
2772
|
export { ConfigError, DEFAULT_PRIVACY, DEFAULT_RECORDING, DataSanitizer, InvalidStateError, Offscript, OffscriptError };
|
|
2766
|
-
//# sourceMappingURL=chunk-
|
|
2767
|
-
//# sourceMappingURL=chunk-
|
|
2773
|
+
//# sourceMappingURL=chunk-OKTRTFLH.js.map
|
|
2774
|
+
//# sourceMappingURL=chunk-OKTRTFLH.js.map
|