@appsurify-testmap/rrweb-plugin-sequential-id-replay 2.1.3-alpha.4 → 3.1.1-alpha.2
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/rrweb-plugin-sequential-id-replay.cjs.map +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.js.map +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.umd.cjs +2 -14
- package/dist/rrweb-plugin-sequential-id-replay.umd.cjs.map +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs +2 -14
- package/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rrweb-plugin-sequential-id-replay.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\nimport type { ReplayPlugin } from '@appsurify-testmap/rrweb';\nimport type { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: 'id',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = (event as unknown as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":[],"mappings":";;AAQA,MAAM,iBAA0B;AAAA,EAC9B,KAAK;AAAA,EACL,iBAAiB;AACnB;
|
|
1
|
+
{"version":3,"file":"rrweb-plugin-sequential-id-replay.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\nimport type { ReplayPlugin } from '@appsurify-testmap/rrweb';\nimport type { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: 'id',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = (event as unknown as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":[],"mappings":";;AAQA,MAAM,iBAA0B;AAAA,EAC9B,KAAK;AAAA,EACL,iBAAiB;AACnB;AAEO,MAAM,8BAEO,CAAC,YAAY;AAC/B,QAAM,EAAE,KAAK,gBAAA,IAAoB,UAC7B,OAAO,OAAO,IAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,YAAY;AAEhB,SAAO;AAAA,IACL,QAAQ,OAAsB;AAC5B,UAAI,OAAO,OAAO;AAChB,cAAM,KAAM,MAA4C,GAAG;AAC3D,YAAI,OAAO,WAAW;AACpB,kBAAQ;AAAA,YACN,2DAA2D,SAAS,eAAe,EAAE;AAAA,UAAA;AAAA,QAEzF,OAAO;AACL;AAAA,QACF;AAAA,MACF,WAAW,iBAAiB;AAC1B,gBAAQ;AAAA,UACN,qDAAqD,GAAG;AAAA,QAAA;AAAA,MAE5D;AAAA,IACF;AAAA,EAAA;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rrweb-plugin-sequential-id-replay.js","sources":["../src/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\nimport type { ReplayPlugin } from '@appsurify-testmap/rrweb';\nimport type { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: 'id',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = (event as unknown as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":[],"mappings":"AAQA,MAAM,iBAA0B;AAAA,EAC9B,KAAK;AAAA,EACL,iBAAiB;AACnB;
|
|
1
|
+
{"version":3,"file":"rrweb-plugin-sequential-id-replay.js","sources":["../src/index.ts"],"sourcesContent":["import type { SequentialIdOptions } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\nimport type { ReplayPlugin } from '@appsurify-testmap/rrweb';\nimport type { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: 'id',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = (event as unknown as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],"names":[],"mappings":"AAQA,MAAM,iBAA0B;AAAA,EAC9B,KAAK;AAAA,EACL,iBAAiB;AACnB;AAEO,MAAM,8BAEO,CAAC,YAAY;AAC/B,QAAM,EAAE,KAAK,gBAAA,IAAoB,UAC7B,OAAO,OAAO,IAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,YAAY;AAEhB,SAAO;AAAA,IACL,QAAQ,OAAsB;AAC5B,UAAI,OAAO,OAAO;AAChB,cAAM,KAAM,MAA4C,GAAG;AAC3D,YAAI,OAAO,WAAW;AACpB,kBAAQ;AAAA,YACN,2DAA2D,SAAS,eAAe,EAAE;AAAA,UAAA;AAAA,QAEzF,OAAO;AACL;AAAA,QACF;AAAA,MACF,WAAW,iBAAiB;AAC1B,gBAAQ;AAAA,UACN,qDAAqD,GAAG;AAAA,QAAA;AAAA,MAE5D;AAAA,IACF;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
(function (g, f) {
|
|
2
|
-
if ("object" == typeof exports && "object" == typeof module) {
|
|
3
|
-
module.exports = f();
|
|
4
|
-
} else if ("function" == typeof define && define.amd) {
|
|
5
|
-
define("rrwebPluginSequentialIdReplay", [], f);
|
|
6
|
-
} else if ("object" == typeof exports) {
|
|
7
|
-
exports["rrwebPluginSequentialIdReplay"] = f();
|
|
8
|
-
} else {
|
|
9
|
-
g["rrwebPluginSequentialIdReplay"] = f();
|
|
10
|
-
}
|
|
11
|
-
}(this, () => {
|
|
12
|
-
var exports = {};
|
|
13
|
-
var module = { exports };
|
|
1
|
+
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebPluginSequentialIdReplay", [], f);} else if ("object" == typeof exports) {exports["rrwebPluginSequentialIdReplay"] = f();} else {g["rrwebPluginSequentialIdReplay"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
14
2
|
"use strict";
|
|
15
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
16
4
|
const defaultOptions = {
|
|
@@ -40,7 +28,7 @@ const getReplaySequentialIdPlugin = (options) => {
|
|
|
40
28
|
};
|
|
41
29
|
};
|
|
42
30
|
exports.getReplaySequentialIdPlugin = getReplaySequentialIdPlugin;
|
|
43
|
-
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
31
|
+
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
44
32
|
var __cp = (to, from, except, desc) => {
|
|
45
33
|
if ((from && typeof from === "object") || typeof from === "function") {
|
|
46
34
|
for (let key of Object.getOwnPropertyNames(from)) {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import type { SequentialIdOptions } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\nimport type { ReplayPlugin } from '@appsurify-testmap/rrweb';\nimport type { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: 'id',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = (event as unknown as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;AAQA,MAAM,iBAA0B;EAC9B,KAAK;EACL,iBAAiB;AACnB;AAEO,MAAM,8BAEO,CAAC,YAAY;AAC/B,QAAM,EAAE,KAAK,gBAAA,IAAoB,UAC7B,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,YAAY;AAEhB,SAAO;IACL,QAAQ,OAAsB;AAC5B,UAAI,OAAO,OAAO;AAChB,cAAM,KAAM,MAA4C,GAAG;AAC3D,YAAI,OAAO,WAAW;AACpB,kBAAQ;YACN,2DAA2D,wBAAwB;UAAE;QAEzF,OAAO;AACL;QACF;MACF,WAAW,iBAAiB;AAC1B,gBAAQ;UACN,qDAAqD;QAAG;MAE5D;IACF;EAAA;AAEJ;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
(function (g, f) {
|
|
2
|
-
if ("object" == typeof exports && "object" == typeof module) {
|
|
3
|
-
module.exports = f();
|
|
4
|
-
} else if ("function" == typeof define && define.amd) {
|
|
5
|
-
define("rrwebPluginSequentialIdReplay", [], f);
|
|
6
|
-
} else if ("object" == typeof exports) {
|
|
7
|
-
exports["rrwebPluginSequentialIdReplay"] = f();
|
|
8
|
-
} else {
|
|
9
|
-
g["rrwebPluginSequentialIdReplay"] = f();
|
|
10
|
-
}
|
|
11
|
-
}(this, () => {
|
|
12
|
-
var exports = {};
|
|
13
|
-
var module = { exports };
|
|
1
|
+
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebPluginSequentialIdReplay", [], f);} else if ("object" == typeof exports) {exports["rrwebPluginSequentialIdReplay"] = f();} else {g["rrwebPluginSequentialIdReplay"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
14
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={key:"id",warnOnMissingId:!0},u=n=>{const{key:e,warnOnMissingId:a}=n?Object.assign({},s,n):s;let i=1;return{handler(t){if(e in t){const l=t[e];l!==i?console.error(`[sequential-id-plugin]: expect to get an id with value "${i}", but got "${l}"`):i++}else a&&console.warn(`[sequential-id-plugin]: failed to get id in key: "${e}"`)}}};exports.getReplaySequentialIdPlugin=u;
|
|
15
|
-
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
3
|
+
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
16
4
|
var __cp = (to, from, except, desc) => {
|
|
17
5
|
if ((from && typeof from === "object") || typeof from === "function") {
|
|
18
6
|
for (let key of Object.getOwnPropertyNames(from)) {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import type { SequentialIdOptions } from '@appsurify-testmap/rrweb-plugin-sequential-id-record';\nimport type { ReplayPlugin } from '@appsurify-testmap/rrweb';\nimport type { eventWithTime } from '@appsurify-testmap/rrweb-types';\n\ntype Options = SequentialIdOptions & {\n warnOnMissingId: boolean;\n};\n\nconst defaultOptions: Options = {\n key: 'id',\n warnOnMissingId: true,\n};\n\nexport const getReplaySequentialIdPlugin: (\n options?: Partial<Options>,\n) => ReplayPlugin = (options) => {\n const { key, warnOnMissingId } = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let currentId = 1;\n\n return {\n handler(event: eventWithTime) {\n if (key in event) {\n const id = (event as unknown as Record<string, number>)[key];\n if (id !== currentId) {\n console.error(\n `[sequential-id-plugin]: expect to get an id with value \"${currentId}\", but got \"${id}\"`,\n );\n } else {\n currentId++;\n }\n } else if (warnOnMissingId) {\n console.warn(\n `[sequential-id-plugin]: failed to get id in key: \"${key}\"`,\n );\n }\n },\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";gFAQA,MAAMA,EAA0B,CAC9B,IAAK,KACL,gBAAiB,EACnB,EAEaC,EAEQC,GAAY,CAC/B,KAAM,CAAE,IAAAC,EAAK,gBAAAC,CAAA,EAAoBF,EAC7B,OAAO,OAAO,CAAA,EAAIF,EAAgBE,CAAO,EACzCF,EACJ,IAAIK,EAAY,EAEhB,MAAO,CACL,QAAQC,EAAsB,CAC5B,GAAIH,KAAOG,EAAO,CAChB,MAAMC,EAAMD,EAA4CH,CAAG,EACvDI,IAAOF,EACT,QAAQ,MACN,2DAA2DA,gBAAwBE,IAAE,EAGvFF,SAEOD,GACT,QAAQ,KACN,qDAAqDD,IAAG,CAG9D,CAAA,CAEJ",
|
|
6
6
|
"names": ["defaultOptions", "getReplaySequentialIdPlugin", "options", "key", "warnOnMissingId", "currentId", "event", "id"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsurify-testmap/rrweb-plugin-sequential-id-replay",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.1-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/rrweb-plugin-sequential-id-replay.umd.cjs",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/rrweb-io/rrweb#readme",
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@appsurify-testmap/rrweb": "^
|
|
47
|
-
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^
|
|
46
|
+
"@appsurify-testmap/rrweb": "^3.1.1-alpha.2",
|
|
47
|
+
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^3.1.1-alpha.2",
|
|
48
48
|
"typescript": "^5.4.5",
|
|
49
49
|
"vite": "^5.3.1",
|
|
50
50
|
"vite-plugin-dts": "^3.9.1"
|