@appsurify-testmap/rrweb-plugin-sequential-id-replay 2.1.1-alpha.6 → 2.1.2-alpha.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.
|
@@ -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": ";;;;;;;;;;;;;;;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,
|
|
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,wBAAwB;UAAE;QACvF,OACK;AACL;QACF;MAAA,WACS,iBAAiB;AAClB,gBAAA;UACN,qDAAqD;QAAG;MAE5D;IACF;EAAA;AAEJ;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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": ";;;;;;;;;;;;;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,
|
|
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,gBAAwBE,IAAE,EAGvFF,SAEOD,GACD,QAAA,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": "2.1.
|
|
3
|
+
"version": "2.1.2-alpha.1",
|
|
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.2-alpha.1",
|
|
47
|
+
"@appsurify-testmap/rrweb-plugin-sequential-id-record": "^2.1.2-alpha.1",
|
|
48
48
|
"typescript": "^5.4.5",
|
|
49
49
|
"vite": "^5.3.1",
|
|
50
50
|
"vite-plugin-dts": "^3.9.1"
|