@appsurify-testmap/rrweb-plugin-sequential-id-record 3.1.1-alpha.1 → 3.1.1-alpha.3
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-record.cjs.map +1 -1
- package/dist/rrweb-plugin-sequential-id-record.js.map +1 -1
- package/dist/rrweb-plugin-sequential-id-record.umd.cjs +2 -14
- package/dist/rrweb-plugin-sequential-id-record.umd.cjs.map +1 -1
- package/dist/rrweb-plugin-sequential-id-record.umd.min.cjs +2 -14
- package/dist/rrweb-plugin-sequential-id-record.umd.min.cjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rrweb-plugin-sequential-id-record.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@appsurify-testmap/rrweb-types';\n\nexport type SequentialIdOptions = {\n key: string;\n getId?: () => number; // ❗️необязательный колбэк для получения ID\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: 'id',\n};\n\nexport let globalSequentialId = 0;\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = Object.assign({}, defaultOptions, options);\n let localId = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n const id = _options.getId ? _options.getId() : ++localId;\n Object.assign(event, {\n [_options.key]: id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":";;AAOA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,IAAI,qBAAqB;AAEzB,MAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"rrweb-plugin-sequential-id-record.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@appsurify-testmap/rrweb-types';\n\nexport type SequentialIdOptions = {\n key: string;\n getId?: () => number; // ❗️необязательный колбэк для получения ID\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: 'id',\n};\n\nexport let globalSequentialId = 0;\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = Object.assign({}, defaultOptions, options);\n let localId = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n const id = _options.getId ? _options.getId() : ++localId;\n Object.assign(event, {\n [_options.key]: id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":";;AAOA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,IAAI,qBAAqB;AAEzB,MAAM,cAAc;AAEpB,MAAM,8BAEO,CAAC,YAAY;AAC/B,QAAM,WAAW,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO;AAC1D,MAAI,UAAU;AAEd,SAAO;AAAA,IACL,MAAM;AAAA,IACN,eAAe,OAAO;AACpB,YAAM,KAAK,SAAS,QAAQ,SAAS,MAAA,IAAU,EAAE;AACjD,aAAO,OAAO,OAAO;AAAA,QACnB,CAAC,SAAS,GAAG,GAAG;AAAA,MAAA,CACjB;AACD,aAAO;AAAA,IACT;AAAA,IACA,SAAS;AAAA,EAAA;AAEb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rrweb-plugin-sequential-id-record.js","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@appsurify-testmap/rrweb-types';\n\nexport type SequentialIdOptions = {\n key: string;\n getId?: () => number; // ❗️необязательный колбэк для получения ID\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: 'id',\n};\n\nexport let globalSequentialId = 0;\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = Object.assign({}, defaultOptions, options);\n let localId = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n const id = _options.getId ? _options.getId() : ++localId;\n Object.assign(event, {\n [_options.key]: id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":"AAOA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,IAAI,qBAAqB;AAEzB,MAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"rrweb-plugin-sequential-id-record.js","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@appsurify-testmap/rrweb-types';\n\nexport type SequentialIdOptions = {\n key: string;\n getId?: () => number; // ❗️необязательный колбэк для получения ID\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: 'id',\n};\n\nexport let globalSequentialId = 0;\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = Object.assign({}, defaultOptions, options);\n let localId = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n const id = _options.getId ? _options.getId() : ++localId;\n Object.assign(event, {\n [_options.key]: id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":"AAOA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,IAAI,qBAAqB;AAEzB,MAAM,cAAc;AAEpB,MAAM,8BAEO,CAAC,YAAY;AAC/B,QAAM,WAAW,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO;AAC1D,MAAI,UAAU;AAEd,SAAO;AAAA,IACL,MAAM;AAAA,IACN,eAAe,OAAO;AACpB,YAAM,KAAK,SAAS,QAAQ,SAAS,MAAA,IAAU,EAAE;AACjD,aAAO,OAAO,OAAO;AAAA,QACnB,CAAC,SAAS,GAAG,GAAG;AAAA,MAAA,CACjB;AACD,aAAO;AAAA,IACT;AAAA,IACA,SAAS;AAAA,EAAA;AAEb;"}
|
|
@@ -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("rrwebPluginSequentialIdRecord", [], f);
|
|
6
|
-
} else if ("object" == typeof exports) {
|
|
7
|
-
exports["rrwebPluginSequentialIdRecord"] = f();
|
|
8
|
-
} else {
|
|
9
|
-
g["rrwebPluginSequentialIdRecord"] = 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("rrwebPluginSequentialIdRecord", [], f);} else if ("object" == typeof exports) {exports["rrwebPluginSequentialIdRecord"] = f();} else {g["rrwebPluginSequentialIdRecord"] = 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 = {
|
|
@@ -36,7 +24,7 @@ const getRecordSequentialIdPlugin = (options) => {
|
|
|
36
24
|
exports.PLUGIN_NAME = PLUGIN_NAME;
|
|
37
25
|
exports.getRecordSequentialIdPlugin = getRecordSequentialIdPlugin;
|
|
38
26
|
exports.globalSequentialId = globalSequentialId;
|
|
39
|
-
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
27
|
+
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
40
28
|
var __cp = (to, from, except, desc) => {
|
|
41
29
|
if ((from && typeof from === "object") || typeof from === "function") {
|
|
42
30
|
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 { RecordPlugin } from '@appsurify-testmap/rrweb-types';\n\nexport type SequentialIdOptions = {\n key: string;\n getId?: () => number; // ❗️необязательный колбэк для получения ID\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: 'id',\n};\n\nexport let globalSequentialId = 0;\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = Object.assign({}, defaultOptions, options);\n let localId = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n const id = _options.getId ? _options.getId() : ++localId;\n Object.assign(event, {\n [_options.key]: id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;AAOA,MAAM,iBAAsC;EAC1C,KAAK;AACP;AAEO,IAAI,qBAAqB;AAEzB,MAAM,cAAc;AAEpB,MAAM,8BAEO,CAAC,YAAY;AAC/B,QAAM,WAAW,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO;AAC1D,MAAI,UAAU;AAEd,SAAO;IACL,MAAM;IACN,eAAe,OAAO;AACpB,YAAM,KAAK,SAAS,QAAQ,SAAS,MAAA,IAAU,EAAE;AACjD,aAAO,OAAO,OAAO;QACnB,CAAC,SAAS,GAAG,GAAG;MAAA,CACjB;AACD,aAAO;IACT;IACA,SAAS;EAAA;AAEb;;;;",
|
|
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("rrwebPluginSequentialIdRecord", [], f);
|
|
6
|
-
} else if ("object" == typeof exports) {
|
|
7
|
-
exports["rrwebPluginSequentialIdRecord"] = f();
|
|
8
|
-
} else {
|
|
9
|
-
g["rrwebPluginSequentialIdRecord"] = 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("rrwebPluginSequentialIdRecord", [], f);} else if ("object" == typeof exports) {exports["rrwebPluginSequentialIdRecord"] = f();} else {g["rrwebPluginSequentialIdRecord"] = 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"};let d=0;const n="rrweb/sequential-id@1",a=o=>{const e=Object.assign({},s,o);let l=0;return{name:n,eventProcessor(t){const i=e.getId?e.getId():++l;return Object.assign(t,{[e.key]:i}),t},options:e}};exports.PLUGIN_NAME=n;exports.getRecordSequentialIdPlugin=a;exports.globalSequentialId=d;
|
|
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 { RecordPlugin } from '@appsurify-testmap/rrweb-types';\n\nexport type SequentialIdOptions = {\n key: string;\n getId?: () => number; // ❗️необязательный колбэк для получения ID\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: 'id',\n};\n\nexport let globalSequentialId = 0;\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = Object.assign({}, defaultOptions, options);\n let localId = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n const id = _options.getId ? _options.getId() : ++localId;\n Object.assign(event, {\n [_options.key]: id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";gFAOA,MAAMA,EAAsC,CAC1C,IAAK,IACP,EAEO,IAAIC,EAAqB,EAEzB,MAAMC,EAAc,wBAEdC,EAEQC,GAAY,CAC/B,MAAMC,EAAW,OAAO,OAAO,CAAA,EAAIL,EAAgBI,CAAO,EAC1D,IAAIE,EAAU,EAEd,MAAO,CACL,KAAMJ,EACN,eAAeK,EAAO,CACpB,MAAMC,EAAKH,EAAS,MAAQA,EAAS,MAAA,EAAU,EAAEC,EACjD,cAAO,OAAOC,EAAO,CACnB,CAACF,EAAS,GAAG,EAAGG,CAAA,CACjB,EACMD,CACT,EACA,QAASF,CAAA,CAEb",
|
|
6
6
|
"names": ["defaultOptions", "globalSequentialId", "PLUGIN_NAME", "getRecordSequentialIdPlugin", "options", "_options", "localId", "event", "id"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsurify-testmap/rrweb-plugin-sequential-id-record",
|
|
3
|
-
"version": "3.1.1-alpha.
|
|
3
|
+
"version": "3.1.1-alpha.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/rrweb-plugin-sequential-id-record.umd.cjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/rrweb-io/rrweb#readme",
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@appsurify-testmap/rrweb": "^3.1.1-alpha.
|
|
46
|
+
"@appsurify-testmap/rrweb": "^3.1.1-alpha.3",
|
|
47
47
|
"typescript": "^5.4.5",
|
|
48
48
|
"vite": "^5.3.1",
|
|
49
49
|
"vite-plugin-dts": "^3.9.1"
|