@appsurify-testmap/rrweb-plugin-sequential-id-replay 2.1.0-alpha.7 → 2.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 +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.cjs.map +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.js +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.js.map +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.umd.cjs +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.umd.cjs.map +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs +1 -1
- package/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs.map +2 -2
- 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: '
|
|
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;AAEa,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,EAAE,KAAK,gBAAoB,IAAA,UAC7B,OAAO,OAAO,IAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,YAAY;AAET,SAAA;AAAA,IACL,QAAQ,OAAsB;AAC5B,UAAI,OAAO,OAAO;AACV,cAAA,KAAM,MAA4C,GAAG;AAC3D,YAAI,OAAO,WAAW;AACZ,kBAAA;AAAA,YACN,2DAA2D,SAAS,eAAe,EAAE;AAAA,UAAA;AAAA,QACvF,OACK;AACL;AAAA,QACF;AAAA,iBACS,iBAAiB;AAClB,gBAAA;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: '
|
|
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;AAEa,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,EAAE,KAAK,gBAAoB,IAAA,UAC7B,OAAO,OAAO,IAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,YAAY;AAET,SAAA;AAAA,IACL,QAAQ,OAAsB;AAC5B,UAAI,OAAO,OAAO;AACV,cAAA,KAAM,MAA4C,GAAG;AAC3D,YAAI,OAAO,WAAW;AACZ,kBAAA;AAAA,YACN,2DAA2D,SAAS,eAAe,EAAE;AAAA,UAAA;AAAA,QACvF,OACK;AACL;AAAA,QACF;AAAA,iBACS,iBAAiB;AAClB,gBAAA;AAAA,UACN,qDAAqD,GAAG;AAAA,QAAA;AAAA,MAE5D;AAAA,IACF;AAAA,EAAA;AAEJ;"}
|
|
@@ -14,7 +14,7 @@ var module = { exports };
|
|
|
14
14
|
"use strict";
|
|
15
15
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
16
16
|
const defaultOptions = {
|
|
17
|
-
key: "
|
|
17
|
+
key: "id",
|
|
18
18
|
warnOnMissingId: true
|
|
19
19
|
};
|
|
20
20
|
const getReplaySequentialIdPlugin = (options) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
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: '
|
|
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
5
|
"mappings": ";;;;;;;;;;;;;;;AAQA,MAAM,iBAA0B;EAC9B,KAAK;EACL,iBAAiB;AACnB;AAEa,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,EAAE,KAAK,gBAAoB,IAAA,UAC7B,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,YAAY;AAET,SAAA;IACL,QAAQ,OAAsB;AAC5B,UAAI,OAAO,OAAO;AACV,cAAA,KAAM,MAA4C,GAAG;AAC3D,YAAI,OAAO,WAAW;AACZ,kBAAA;YACN,2DAA2D,SAAS,eAAe,EAAE;UAAA;QACvF,OACK;AACL;QACF;MAAA,WACS,iBAAiB;AAClB,gBAAA;UACN,qDAAqD,GAAG;QAAA;MAE5D;IACF;EAAA;AAEJ;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={key:"
|
|
14
|
+
"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
15
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
16
16
|
var __cp = (to, from, except, desc) => {
|
|
17
17
|
if ((from && typeof from === "object") || typeof from === "function") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
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: '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;gFAQA,MAAMA,EAA0B,CAC9B,IAAK,
|
|
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": ";;;;;;;;;;;;;gFAQA,MAAMA,EAA0B,CAC9B,IAAK,KACL,gBAAiB,EACnB,EAEaC,EAEQC,GAAY,CACzB,KAAA,CAAE,IAAAC,EAAK,gBAAAC,CAAoB,EAAAF,EAC7B,OAAO,OAAO,CAAA,EAAIF,EAAgBE,CAAO,EACzCF,EACJ,IAAIK,EAAY,EAET,MAAA,CACL,QAAQC,EAAsB,CAC5B,GAAIH,KAAOG,EAAO,CACV,MAAAC,EAAMD,EAA4CH,CAAG,EACvDI,IAAOF,EACD,QAAA,MACN,2DAA2DA,CAAS,eAAeE,CAAE,GAAA,EAGvFF,GACF,MACSD,GACD,QAAA,KACN,qDAAqDD,CAAG,GAAA,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": "2.1.
|
|
3
|
+
"version": "2.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": "^2.1.
|
|
47
|
-
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^2.1.
|
|
46
|
+
"@appsurify-testmap/rrweb": "^2.1.1-alpha.2",
|
|
47
|
+
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^2.1.1-alpha.2",
|
|
48
48
|
"typescript": "^5.4.5",
|
|
49
49
|
"vite": "^5.3.1",
|
|
50
50
|
"vite-plugin-dts": "^3.9.1"
|