@betterbugs/rrweb-plugin-sequential-id-record 2.0.0-alpha.20 → 2.0.0-alpha.22

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.
@@ -1 +1 @@
1
- {"version":3,"file":"rrweb-plugin-sequential-id-record.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@betterbugs/types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":";;AAMA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,MAAM,cAAc;AAEd,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,WAAW,UACb,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,KAAK;AAEF,SAAA;AAAA,IACL,MAAM;AAAA,IACN,eAAe,OAAO;AACpB,aAAO,OAAO,OAAO;AAAA,QACnB,CAAC,SAAS,GAAG,GAAG,EAAE;AAAA,MAAA,CACnB;AACM,aAAA;AAAA,IACT;AAAA,IACA,SAAS;AAAA,EAAA;AAEb;;;"}
1
+ {"version":3,"file":"rrweb-plugin-sequential-id-record.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@betterbugs/types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":";;AAMA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,MAAM,cAAc;AAEd,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,WAAW,UACb,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,KAAK;AAEF,SAAA;AAAA,IACL,MAAM;AAAA,IACN,eAAe,OAAO;AACpB,aAAO,OAAO,OAAO;AAAA,QACnB,CAAC,SAAS,GAAG,GAAG,EAAE;AAAA,MAAA,CACnB;AACM,aAAA;AAAA,IACT;AAAA,IACA,SAAS;AAAA,EACX;AACF;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"rrweb-plugin-sequential-id-record.js","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@betterbugs/types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":"AAMA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,MAAM,cAAc;AAEd,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,WAAW,UACb,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,KAAK;AAEF,SAAA;AAAA,IACL,MAAM;AAAA,IACN,eAAe,OAAO;AACpB,aAAO,OAAO,OAAO;AAAA,QACnB,CAAC,SAAS,GAAG,GAAG,EAAE;AAAA,MAAA,CACnB;AACM,aAAA;AAAA,IACT;AAAA,IACA,SAAS;AAAA,EAAA;AAEb;"}
1
+ {"version":3,"file":"rrweb-plugin-sequential-id-record.js","sources":["../src/index.ts"],"sourcesContent":["import type { RecordPlugin } from '@betterbugs/types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],"names":[],"mappings":"AAMA,MAAM,iBAAsC;AAAA,EAC1C,KAAK;AACP;AAEO,MAAM,cAAc;AAEd,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,WAAW,UACb,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,KAAK;AAEF,SAAA;AAAA,IACL,MAAM;AAAA,IACN,eAAe,OAAO;AACpB,aAAO,OAAO,OAAO;AAAA,QACnB,CAAC,SAAS,GAAG,GAAG,EAAE;AAAA,MAAA,CACnB;AACM,aAAA;AAAA,IACT;AAAA,IACA,SAAS;AAAA,EACX;AACF;"}
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
4
  "sourcesContent": ["import type { RecordPlugin } from '@betterbugs/types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAMA,MAAM,iBAAsC;EAC1C,KAAK;AACP;AAEO,MAAM,cAAc;AAEd,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,WAAW,UACb,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,KAAK;AAEF,SAAA;IACL,MAAM;IACN,eAAe,OAAO;AACpB,aAAO,OAAO,OAAO;QACnB,CAAC,SAAS,GAAG,GAAG,EAAE;MAAA,CACnB;AACM,aAAA;IACT;IACA,SAAS;EAAA;AAEb;;;",
5
+ "mappings": ";;;;;;;;;;;;;;;AAMA,MAAM,iBAAsC;EAC1C,KAAK;AACP;AAEO,MAAM,cAAc;AAEd,MAAA,8BAEO,CAAC,YAAY;AACzB,QAAA,WAAW,UACb,OAAO,OAAO,CAAA,GAAI,gBAAgB,OAAO,IACzC;AACJ,MAAI,KAAK;AAEF,SAAA;IACL,MAAM;IACN,eAAe,OAAO;AACpB,aAAO,OAAO,OAAO;QACnB,CAAC,SAAS,GAAG,GAAG,EAAE;MAAA,CACnB;AACM,aAAA;IACT;IACA,SAAS;EACX;AACF;;;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
4
  "sourcesContent": ["import type { RecordPlugin } from '@betterbugs/types';\n\nexport type SequentialIdOptions = {\n key: string;\n};\n\nconst defaultOptions: SequentialIdOptions = {\n key: '_sid',\n};\n\nexport const PLUGIN_NAME = 'rrweb/sequential-id@1';\n\nexport const getRecordSequentialIdPlugin: (\n options?: Partial<SequentialIdOptions>,\n) => RecordPlugin = (options) => {\n const _options = options\n ? Object.assign({}, defaultOptions, options)\n : defaultOptions;\n let id = 0;\n\n return {\n name: PLUGIN_NAME,\n eventProcessor(event) {\n Object.assign(event, {\n [_options.key]: ++id,\n });\n return event;\n },\n options: _options,\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;gFAMA,MAAMA,EAAsC,CAC1C,IAAK,MACP,EAEaC,EAAc,wBAEdC,EAEQC,GAAY,CACzB,MAAAC,EAAWD,EACb,OAAO,OAAO,CAAA,EAAIH,EAAgBG,CAAO,EACzCH,EACJ,IAAIK,EAAK,EAEF,MAAA,CACL,KAAMJ,EACN,eAAeK,EAAO,CACpB,cAAO,OAAOA,EAAO,CACnB,CAACF,EAAS,GAAG,EAAG,EAAEC,CAAA,CACnB,EACMC,CACT,EACA,QAASF,CAAA,CAEb",
5
+ "mappings": ";;;;;;;;;;;;;gFAMA,MAAMA,EAAsC,CAC1C,IAAK,MACP,EAEaC,EAAc,wBAEdC,EAEQC,GAAY,CACzB,MAAAC,EAAWD,EACb,OAAO,OAAO,CAAA,EAAIH,EAAgBG,CAAO,EACzCH,EACJ,IAAIK,EAAK,EAEF,MAAA,CACL,KAAMJ,EACN,eAAeK,EAAO,CACpB,cAAO,OAAOA,EAAO,CACnB,CAACF,EAAS,GAAG,EAAG,EAAEC,CAAA,CACnB,EACMC,CACT,EACA,QAASF,CACX,CACF",
6
6
  "names": ["defaultOptions", "PLUGIN_NAME", "getRecordSequentialIdPlugin", "options", "_options", "id", "event"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterbugs/rrweb-plugin-sequential-id-record",
3
- "version": "2.0.0-alpha.20",
3
+ "version": "2.0.0-alpha.22",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,6 +23,7 @@
23
23
  }
24
24
  },
25
25
  "files": [
26
+ "umd",
26
27
  "dist",
27
28
  "package.json"
28
29
  ],
@@ -47,12 +48,12 @@
47
48
  },
48
49
  "homepage": "https://github.com/BetterBugs-Team/rrweb#readme",
49
50
  "devDependencies": {
50
- "@betterbugs/rrweb": "^2.0.0-alpha.20",
51
+ "@betterbugs/rrweb": "^2.0.0-alpha.22",
51
52
  "typescript": "^5.4.5",
52
- "vite": "^5.3.1",
53
+ "vite": "^6.0.1",
53
54
  "vite-plugin-dts": "^3.9.1"
54
55
  },
55
56
  "peerDependencies": {
56
- "@betterbugs/rrweb": "^2.0.0-alpha.20"
57
+ "@betterbugs/rrweb": "^2.0.0-alpha.22"
57
58
  }
58
59
  }
@@ -0,0 +1,53 @@
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 };
14
+ "use strict";
15
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
16
+ const defaultOptions = {
17
+ key: "_sid"
18
+ };
19
+ const PLUGIN_NAME = "rrweb/sequential-id@1";
20
+ const getRecordSequentialIdPlugin = (options) => {
21
+ const _options = options ? Object.assign({}, defaultOptions, options) : defaultOptions;
22
+ let id = 0;
23
+ return {
24
+ name: PLUGIN_NAME,
25
+ eventProcessor(event) {
26
+ Object.assign(event, {
27
+ [_options.key]: ++id
28
+ });
29
+ return event;
30
+ },
31
+ options: _options
32
+ };
33
+ };
34
+ exports.PLUGIN_NAME = PLUGIN_NAME;
35
+ exports.getRecordSequentialIdPlugin = getRecordSequentialIdPlugin;
36
+ if (typeof module.exports == "object" && typeof exports == "object") {
37
+ var __cp = (to, from, except, desc) => {
38
+ if ((from && typeof from === "object") || typeof from === "function") {
39
+ for (let key of Object.getOwnPropertyNames(from)) {
40
+ if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
41
+ Object.defineProperty(to, key, {
42
+ get: () => from[key],
43
+ enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
44
+ });
45
+ }
46
+ }
47
+ return to;
48
+ };
49
+ module.exports = __cp(module.exports, exports);
50
+ }
51
+ return module.exports;
52
+ }))
53
+ //# sourceMappingURL=rrweb-plugin-sequential-id-record.umd.cjs.map
@@ -0,0 +1,32 @@
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 };
14
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={key:"_sid"},i="rrweb/sequential-id@1",r=e=>{const t=e?Object.assign({},s,e):s;let o=0;return{name:i,eventProcessor(n){return Object.assign(n,{[t.key]:++o}),n},options:t}};exports.PLUGIN_NAME=i;exports.getRecordSequentialIdPlugin=r;
15
+ if (typeof module.exports == "object" && typeof exports == "object") {
16
+ var __cp = (to, from, except, desc) => {
17
+ if ((from && typeof from === "object") || typeof from === "function") {
18
+ for (let key of Object.getOwnPropertyNames(from)) {
19
+ if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
20
+ Object.defineProperty(to, key, {
21
+ get: () => from[key],
22
+ enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
23
+ });
24
+ }
25
+ }
26
+ return to;
27
+ };
28
+ module.exports = __cp(module.exports, exports);
29
+ }
30
+ return module.exports;
31
+ }))
32
+ //# sourceMappingURL=rrweb-plugin-sequential-id-record.umd.min.cjs.map