@openreplay/tracker 3.4.7 → 3.4.8

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.
Files changed (86) hide show
  1. package/cjs/app/index.d.ts +6 -6
  2. package/cjs/app/index.js +19 -19
  3. package/cjs/app/observer.d.ts +1 -1
  4. package/cjs/app/observer.js +24 -20
  5. package/cjs/app/ticker.d.ts +1 -1
  6. package/cjs/index.d.ts +9 -9
  7. package/cjs/index.js +56 -53
  8. package/cjs/messages/index.d.ts +2 -2
  9. package/cjs/messages/message.d.ts +1 -1
  10. package/cjs/modules/connection.d.ts +1 -1
  11. package/cjs/modules/connection.js +2 -2
  12. package/cjs/modules/console.d.ts +1 -1
  13. package/cjs/modules/console.js +4 -4
  14. package/cjs/modules/cssrules.d.ts +1 -1
  15. package/cjs/modules/cssrules.js +4 -4
  16. package/cjs/modules/exception.d.ts +2 -2
  17. package/cjs/modules/exception.js +4 -4
  18. package/cjs/modules/img.d.ts +1 -1
  19. package/cjs/modules/img.js +6 -6
  20. package/cjs/modules/input.d.ts +1 -1
  21. package/cjs/modules/input.js +11 -11
  22. package/cjs/modules/longtasks.d.ts +1 -1
  23. package/cjs/modules/longtasks.js +2 -2
  24. package/cjs/modules/mouse.d.ts +1 -1
  25. package/cjs/modules/mouse.js +10 -10
  26. package/cjs/modules/performance.d.ts +1 -1
  27. package/cjs/modules/performance.js +5 -5
  28. package/cjs/modules/scroll.d.ts +1 -1
  29. package/cjs/modules/scroll.js +3 -3
  30. package/cjs/modules/timing.d.ts +1 -1
  31. package/cjs/modules/timing.js +6 -6
  32. package/cjs/modules/viewport.d.ts +1 -1
  33. package/cjs/modules/viewport.js +4 -4
  34. package/cjs/utils.js +1 -1
  35. package/lib/app/index.d.ts +6 -6
  36. package/lib/app/index.js +7 -7
  37. package/lib/app/observer.d.ts +1 -1
  38. package/lib/app/observer.js +7 -3
  39. package/lib/app/ticker.d.ts +1 -1
  40. package/lib/index.d.ts +9 -9
  41. package/lib/index.js +22 -19
  42. package/lib/messages/index.d.ts +2 -2
  43. package/lib/messages/message.d.ts +1 -1
  44. package/lib/messages/tsconfig.tsbuildinfo +1 -1
  45. package/lib/modules/connection.d.ts +1 -1
  46. package/lib/modules/connection.js +1 -1
  47. package/lib/modules/console.d.ts +1 -1
  48. package/lib/modules/console.js +2 -2
  49. package/lib/modules/cssrules.d.ts +1 -1
  50. package/lib/modules/cssrules.js +1 -1
  51. package/lib/modules/exception.d.ts +2 -2
  52. package/lib/modules/exception.js +1 -1
  53. package/lib/modules/img.d.ts +1 -1
  54. package/lib/modules/img.js +2 -2
  55. package/lib/modules/input.d.ts +1 -1
  56. package/lib/modules/input.js +2 -2
  57. package/lib/modules/longtasks.d.ts +1 -1
  58. package/lib/modules/longtasks.js +1 -1
  59. package/lib/modules/mouse.d.ts +1 -1
  60. package/lib/modules/mouse.js +3 -3
  61. package/lib/modules/performance.d.ts +1 -1
  62. package/lib/modules/performance.js +2 -2
  63. package/lib/modules/scroll.d.ts +1 -1
  64. package/lib/modules/scroll.js +1 -1
  65. package/lib/modules/timing.d.ts +1 -1
  66. package/lib/modules/timing.js +2 -2
  67. package/lib/modules/viewport.d.ts +1 -1
  68. package/lib/modules/viewport.js +1 -1
  69. package/package.json +2 -2
  70. package/tsconfig-base.json +1 -1
  71. package/cjs/app/observer/iframe_observer.d.ts +0 -4
  72. package/cjs/app/observer/iframe_observer.js +0 -21
  73. package/cjs/app/observer/observer.d.ts +0 -46
  74. package/cjs/app/observer/observer.js +0 -353
  75. package/cjs/app/observer/shadow_root_observer.d.ts +0 -4
  76. package/cjs/app/observer/shadow_root_observer.js +0 -21
  77. package/cjs/app/observer/top_observer.d.ts +0 -15
  78. package/cjs/app/observer/top_observer.js +0 -78
  79. package/lib/app/observer/iframe_observer.d.ts +0 -4
  80. package/lib/app/observer/iframe_observer.js +0 -18
  81. package/lib/app/observer/observer.d.ts +0 -46
  82. package/lib/app/observer/observer.js +0 -348
  83. package/lib/app/observer/shadow_root_observer.d.ts +0 -4
  84. package/lib/app/observer/shadow_root_observer.js +0 -18
  85. package/lib/app/observer/top_observer.d.ts +0 -15
  86. package/lib/app/observer/top_observer.js +0 -75
@@ -1,9 +1,9 @@
1
- import Message from '../messages/message';
2
- import Nodes from './nodes';
3
- import Observer from './observer';
4
- import Ticker from './ticker';
5
- import type { Options as ObserverOptions } from './observer';
6
- import type { Options as WebworkerOptions } from '../messages/webworker';
1
+ import Message from "../messages/message.js";
2
+ import Nodes from "./nodes.js";
3
+ import Observer from "./observer.js";
4
+ import Ticker from "./ticker.js";
5
+ import type { Options as ObserverOptions } from "./observer.js";
6
+ import type { Options as WebworkerOptions } from "../messages/webworker.js";
7
7
  interface OnStartInfo {
8
8
  sessionID: string;
9
9
  sessionToken: string;
package/cjs/app/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEFAULT_INGEST_POINT = void 0;
4
- const utils_1 = require("../utils");
5
- const messages_1 = require("../messages");
6
- const nodes_1 = require("./nodes");
7
- const observer_1 = require("./observer");
8
- const ticker_1 = require("./ticker");
9
- const performance_1 = require("../modules/performance");
4
+ const utils_js_1 = require("../utils.js");
5
+ const index_js_1 = require("../messages/index.js");
6
+ const nodes_js_1 = require("./nodes.js");
7
+ const observer_js_1 = require("./observer.js");
8
+ const ticker_js_1 = require("./ticker.js");
9
+ const performance_js_1 = require("../modules/performance.js");
10
10
  // TODO: use backendHost only
11
11
  exports.DEFAULT_INGEST_POINT = 'https://api.openreplay.com/ingest';
12
12
  class App {
@@ -17,7 +17,7 @@ class App {
17
17
  this.commitCallbacks = [];
18
18
  this._sessionID = null;
19
19
  this.isActive = false;
20
- this.version = '3.4.7';
20
+ this.version = '3.4.8';
21
21
  this.projectKey = projectKey;
22
22
  this.options = Object.assign({
23
23
  revID: '',
@@ -38,9 +38,9 @@ class App {
38
38
  sessionStorage.setItem(this.options.session_token_key, sessionToken);
39
39
  }
40
40
  this.revID = this.options.revID;
41
- this.nodes = new nodes_1.default(this.options.node_id);
42
- this.observer = new observer_1.default(this, this.options);
43
- this.ticker = new ticker_1.default(this);
41
+ this.nodes = new nodes_js_1.default(this.options.node_id);
42
+ this.observer = new observer_js_1.default(this, this.options);
43
+ this.ticker = new ticker_js_1.default(this);
44
44
  this.ticker.attach(() => this.commit());
45
45
  try {
46
46
  this.worker = new Worker(URL.createObjectURL(new Blob([`"use strict";function t(t){function s(...s){return new t(...s)}return s.prototype=t.prototype,s}const s=new Map;const i=t(class{constructor(t,s,i){this.pageNo=t,this.firstIndex=s,this.timestamp=i,this._id=80}encode(t){return t.uint(80)&&t.uint(this.pageNo)&&t.uint(this.firstIndex)&&t.int(this.timestamp)}});s.set(80,i);const n=t(class{constructor(t){this.timestamp=t,this._id=0}encode(t){return t.uint(0)&&t.uint(this.timestamp)}});s.set(0,n);const e=t(class{constructor(t,s,i){this.url=t,this.referrer=s,this.navigationStart=i,this._id=4}encode(t){return t.uint(4)&&t.string(this.url)&&t.string(this.referrer)&&t.uint(this.navigationStart)}});s.set(4,e);const r=t(class{constructor(t,s){this.width=t,this.height=s,this._id=5}encode(t){return t.uint(5)&&t.uint(this.width)&&t.uint(this.height)}});s.set(5,r);const o=t(class{constructor(t,s){this.x=t,this.y=s,this._id=6}encode(t){return t.uint(6)&&t.int(this.x)&&t.int(this.y)}});s.set(6,o);const h=t(class{constructor(){this._id=7}encode(t){return t.uint(7)}});s.set(7,h);const c=t(class{constructor(t,s,i,n,e){this.id=t,this.parentID=s,this.index=i,this.tag=n,this.svg=e,this._id=8}encode(t){return t.uint(8)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)&&t.string(this.tag)&&t.boolean(this.svg)}});s.set(8,c);const u=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=9}encode(t){return t.uint(9)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(9,u);const a=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=10}encode(t){return t.uint(10)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(10,a);const d=t(class{constructor(t){this.id=t,this._id=11}encode(t){return t.uint(11)&&t.uint(this.id)}});s.set(11,d);const l=t(class{constructor(t,s,i){this.id=t,this.name=s,this.value=i,this._id=12}encode(t){return t.uint(12)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)}});s.set(12,l);const g=t(class{constructor(t,s){this.id=t,this.name=s,this._id=13}encode(t){return t.uint(13)&&t.uint(this.id)&&t.string(this.name)}});s.set(13,g);const f=t(class{constructor(t,s){this.id=t,this.data=s,this._id=14}encode(t){return t.uint(14)&&t.uint(this.id)&&t.string(this.data)}});s.set(14,f);const p=t(class{constructor(t,s,i){this.id=t,this.x=s,this.y=i,this._id=16}encode(t){return t.uint(16)&&t.uint(this.id)&&t.int(this.x)&&t.int(this.y)}});s.set(16,p);const m=t(class{constructor(t,s){this.id=t,this.label=s,this._id=17}encode(t){return t.uint(17)&&t.uint(this.id)&&t.string(this.label)}});s.set(17,m);const _=t(class{constructor(t,s,i){this.id=t,this.value=s,this.mask=i,this._id=18}encode(t){return t.uint(18)&&t.uint(this.id)&&t.string(this.value)&&t.int(this.mask)}});s.set(18,_);const y=t(class{constructor(t,s){this.id=t,this.checked=s,this._id=19}encode(t){return t.uint(19)&&t.uint(this.id)&&t.boolean(this.checked)}});s.set(19,y);const v=t(class{constructor(t,s){this.x=t,this.y=s,this._id=20}encode(t){return t.uint(20)&&t.uint(this.x)&&t.uint(this.y)}});s.set(20,v);const S=t(class{constructor(t,s){this.level=t,this.value=s,this._id=22}encode(t){return t.uint(22)&&t.string(this.level)&&t.string(this.value)}});s.set(22,S);const b=t(class{constructor(t,s,i,n,e,r,o,h,c){this.requestStart=t,this.responseStart=s,this.responseEnd=i,this.domContentLoadedEventStart=n,this.domContentLoadedEventEnd=e,this.loadEventStart=r,this.loadEventEnd=o,this.firstPaint=h,this.firstContentfulPaint=c,this._id=23}encode(t){return t.uint(23)&&t.uint(this.requestStart)&&t.uint(this.responseStart)&&t.uint(this.responseEnd)&&t.uint(this.domContentLoadedEventStart)&&t.uint(this.domContentLoadedEventEnd)&&t.uint(this.loadEventStart)&&t.uint(this.loadEventEnd)&&t.uint(this.firstPaint)&&t.uint(this.firstContentfulPaint)}});s.set(23,b);const x=t(class{constructor(t,s,i){this.speedIndex=t,this.visuallyComplete=s,this.timeToInteractive=i,this._id=24}encode(t){return t.uint(24)&&t.uint(this.speedIndex)&&t.uint(this.visuallyComplete)&&t.uint(this.timeToInteractive)}});s.set(24,x);const E=t(class{constructor(t,s,i){this.name=t,this.message=s,this.payload=i,this._id=25}encode(t){return t.uint(25)&&t.string(this.name)&&t.string(this.message)&&t.string(this.payload)}});s.set(25,E);const k=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=27}encode(t){return t.uint(27)&&t.string(this.name)&&t.string(this.payload)}});s.set(27,k);const I=t(class{constructor(t){this.id=t,this._id=28}encode(t){return t.uint(28)&&t.string(this.id)}});s.set(28,I);const z=t(class{constructor(t){this.id=t,this._id=29}encode(t){return t.uint(29)&&t.string(this.id)}});s.set(29,z);const w=t(class{constructor(t,s){this.key=t,this.value=s,this._id=30}encode(t){return t.uint(30)&&t.string(this.key)&&t.string(this.value)}});s.set(30,w);const T=t(class{constructor(t,s,i){this.id=t,this.rule=s,this.index=i,this._id=37}encode(t){return t.uint(37)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)}});s.set(37,T);const L=t(class{constructor(t,s){this.id=t,this.index=s,this._id=38}encode(t){return t.uint(38)&&t.uint(this.id)&&t.uint(this.index)}});s.set(38,L);const A=t(class{constructor(t,s,i,n,e,r,o){this.method=t,this.url=s,this.request=i,this.response=n,this.status=e,this.timestamp=r,this.duration=o,this._id=39}encode(t){return t.uint(39)&&t.string(this.method)&&t.string(this.url)&&t.string(this.request)&&t.string(this.response)&&t.uint(this.status)&&t.uint(this.timestamp)&&t.uint(this.duration)}});s.set(39,A);const C=t(class{constructor(t,s,i,n){this.name=t,this.duration=s,this.args=i,this.result=n,this._id=40}encode(t){return t.uint(40)&&t.string(this.name)&&t.uint(this.duration)&&t.string(this.args)&&t.string(this.result)}});s.set(40,C);const M=t(class{constructor(t,s){this.key=t,this.value=s,this._id=41}encode(t){return t.uint(41)&&t.string(this.key)&&t.string(this.value)}});s.set(41,M);const R=t(class{constructor(t){this.type=t,this._id=42}encode(t){return t.uint(42)&&t.string(this.type)}});s.set(42,R);const N=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=44}encode(t){return t.uint(44)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(44,N);const D=t(class{constructor(t,s){this.mutation=t,this.state=s,this._id=45}encode(t){return t.uint(45)&&t.string(this.mutation)&&t.string(this.state)}});s.set(45,D);const U=t(class{constructor(t,s){this.type=t,this.payload=s,this._id=46}encode(t){return t.uint(46)&&t.string(this.type)&&t.string(this.payload)}});s.set(46,U);const O=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=47}encode(t){return t.uint(47)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(47,O);const q=t(class{constructor(t,s,i,n){this.operationKind=t,this.operationName=s,this.variables=i,this.response=n,this._id=48}encode(t){return t.uint(48)&&t.string(this.operationKind)&&t.string(this.operationName)&&t.string(this.variables)&&t.string(this.response)}});s.set(48,q);const H=t(class{constructor(t,s,i,n){this.frames=t,this.ticks=s,this.totalJSHeapSize=i,this.usedJSHeapSize=n,this._id=49}encode(t){return t.uint(49)&&t.int(this.frames)&&t.int(this.ticks)&&t.uint(this.totalJSHeapSize)&&t.uint(this.usedJSHeapSize)}});s.set(49,H);const P=t(class{constructor(t,s,i,n,e,r,o,h){this.timestamp=t,this.duration=s,this.ttfb=i,this.headerSize=n,this.encodedBodySize=e,this.decodedBodySize=r,this.url=o,this.initiator=h,this._id=53}encode(t){return t.uint(53)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.ttfb)&&t.uint(this.headerSize)&&t.uint(this.encodedBodySize)&&t.uint(this.decodedBodySize)&&t.string(this.url)&&t.string(this.initiator)}});s.set(53,P);const B=t(class{constructor(t,s){this.downlink=t,this.type=s,this._id=54}encode(t){return t.uint(54)&&t.uint(this.downlink)&&t.string(this.type)}});s.set(54,B);const J=t(class{constructor(t){this.hidden=t,this._id=55}encode(t){return t.uint(55)&&t.boolean(this.hidden)}});s.set(55,J);const j=t(class{constructor(t,s,i,n,e,r,o){this.timestamp=t,this.duration=s,this.context=i,this.containerType=n,this.containerSrc=e,this.containerId=r,this.containerName=o,this._id=59}encode(t){return t.uint(59)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.context)&&t.uint(this.containerType)&&t.string(this.containerSrc)&&t.string(this.containerId)&&t.string(this.containerName)}});s.set(59,j);const G=t(class{constructor(t,s,i,n){this.id=t,this.name=s,this.value=i,this.baseURL=n,this._id=60}encode(t){return t.uint(60)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)&&t.string(this.baseURL)}});s.set(60,G);const K=t(class{constructor(t,s,i){this.id=t,this.data=s,this.baseURL=i,this._id=61}encode(t){return t.uint(61)&&t.uint(this.id)&&t.string(this.data)&&t.string(this.baseURL)}});s.set(61,K);const X=t(class{constructor(t,s){this.type=t,this.value=s,this._id=63}encode(t){return t.uint(63)&&t.string(this.type)&&t.string(this.value)}});s.set(63,X);const F=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=64}encode(t){return t.uint(64)&&t.string(this.name)&&t.string(this.payload)}});s.set(64,F);const Q=t(class{constructor(){this._id=65}encode(t){return t.uint(65)}});s.set(65,Q);const V=t(class{constructor(t,s,i,n){this.id=t,this.rule=s,this.index=i,this.baseURL=n,this._id=67}encode(t){return t.uint(67)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)&&t.string(this.baseURL)}});s.set(67,V);const W=t(class{constructor(t,s,i,n){this.id=t,this.hesitationTime=s,this.label=i,this.selector=n,this._id=69}encode(t){return t.uint(69)&&t.uint(this.id)&&t.uint(this.hesitationTime)&&t.string(this.label)&&t.string(this.selector)}});s.set(69,W);const Y=t(class{constructor(t,s){this.frameID=t,this.id=s,this._id=70}encode(t){return t.uint(70)&&t.uint(this.frameID)&&t.uint(this.id)}});s.set(70,Y);const Z="function"==typeof TextEncoder?new TextEncoder:{encode(t){const s=t.length,i=new Uint8Array(3*s);let n=-1;for(var e=0,r=0,o=0;o!==s;){if(e=t.charCodeAt(o),o+=1,e>=55296&&e<=56319){if(o===s){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;break}if(!((r=t.charCodeAt(o))>=56320&&r<=57343)){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;continue}if(o+=1,(e=1024*(e-55296)+r-56320+65536)>65535){i[n+=1]=240|e>>>18,i[n+=1]=128|e>>>12&63,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e;continue}}e<=127?i[n+=1]=0|e:e<=2047?(i[n+=1]=192|e>>>6,i[n+=1]=128|63&e):(i[n+=1]=224|e>>>12,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e)}return i.subarray(0,n+1)}};class tt{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}checkpoint(){this.checkpointOffset=this.offset}isEmpty(){return 0===this.offset}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for((t<0||t>Number.MAX_SAFE_INTEGER)&&(t=0);t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=Z.encode(t),i=s.byteLength;return!(!this.uint(i)||this.offset+i>this.size)&&(this.data.set(s,this.offset),this.offset+=i,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}let st,it=1e6,nt=4e5,et=new tt(nt),rt="",ot="",ht=0,ct=0,ut=0,at=0,dt=!0;function lt(){return new i(ht,at,ct).encode(et)}const gt=[];let ft,pt=!1,mt=0,_t=8e3,yt=10;function vt(){if(dt||""===ot||""===rt)return;const t=et.flush();pt?gt.push(t):(pt=!0,function t(s){const i=new XMLHttpRequest;i.open("POST",rt+"/v1/web/i",!1),i.setRequestHeader("Authorization","Bearer "+ot),i.onreadystatechange=function(){if(4===this.readyState){if(0==this.status)return;if(this.status>=400)return St(),gt.length=0,401===this.status?void self.postMessage("restart"):void self.postMessage(null);const s=gt.shift();s?t(s):pt=!1}},i.onerror=function(i){if(mt>=yt)return St(),void self.postMessage(null);mt++,setTimeout(()=>t(s),_t)},i.send(s.buffer)}(t)),dt=!0,lt()}function St(){rt="",ot="",clearInterval(st),et.reset()}self.onmessage=({data:t})=>{if(null!==t)return"stop"===t?(vt(),void St()):Array.isArray(t)?void t.forEach(t=>{const i=new(s.get(t._id));if(Object.assign(i,t),i instanceof n?ct=i.timestamp:i instanceof J&&(i.hidden?ft=setTimeout(()=>self.postMessage("restart"),3e5):clearTimeout(ft)),et.checkpoint(),!i.encode(et)&&(vt(),!i.encode(et)))for(;!i.encode(et);){if(nt===it)return console.warn("OpenReplay: beacon size overflow."),et.reset(),void lt();nt=Math.min(2*nt,it),et=new tt(nt),lt()}at++,dt=!1}):(rt=t.ingestPoint||rt,ot=t.token||ot,ht=t.pageNo||ht,ct=t.startTimestamp||ct,ut=t.timeAdjustment||ut,yt=t.connAttemptCount||yt,_t=t.connAttemptGap||_t,it=t.beaconSizeLimit||it,nt=Math.min(it,t.beaconSize||nt),et.isEmpty()&&lt(),void(null==st&&(st=setInterval(vt,2e4))));vt()};
@@ -48,7 +48,7 @@ class App {
48
48
  this.worker.onerror = e => {
49
49
  this._debug("webworker_error", e);
50
50
  };
51
- let lastTs = utils_1.timestamp();
51
+ let lastTs = (0, utils_js_1.timestamp)();
52
52
  let fileno = 0;
53
53
  this.worker.onmessage = ({ data }) => {
54
54
  if (data === null) {
@@ -85,7 +85,7 @@ class App {
85
85
  });
86
86
  }
87
87
  if (this.options.__debug_log) {
88
- utils_1.warn("OpenReplay error: ", context, e);
88
+ (0, utils_js_1.warn)("OpenReplay error: ", context, e);
89
89
  }
90
90
  }
91
91
  send(message, urgent = false) {
@@ -99,7 +99,7 @@ class App {
99
99
  }
100
100
  commit() {
101
101
  if (this.worker && this.messages.length) {
102
- this.messages.unshift(new messages_1.Timestamp(utils_1.timestamp()));
102
+ this.messages.unshift(new index_js_1.Timestamp((0, utils_js_1.timestamp)()));
103
103
  this.worker.postMessage(this.messages);
104
104
  this.commitCallbacks.forEach(cb => cb(this.messages));
105
105
  this.messages.length = 0;
@@ -194,7 +194,7 @@ class App {
194
194
  pageNo++;
195
195
  }
196
196
  sessionStorage.setItem(this.options.session_pageno_key, pageNo.toString());
197
- const startTimestamp = utils_1.timestamp();
197
+ const startTimestamp = (0, utils_js_1.timestamp)();
198
198
  const messageData = {
199
199
  ingestPoint: this.options.ingestPoint,
200
200
  pageNo,
@@ -216,8 +216,8 @@ class App {
216
216
  timestamp: startTimestamp,
217
217
  trackerVersion: this.version,
218
218
  isSnippet: this.options.__is_snippet,
219
- deviceMemory: performance_1.deviceMemory,
220
- jsHeapSizeLimit: performance_1.jsHeapSizeLimit,
219
+ deviceMemory: performance_js_1.deviceMemory,
220
+ jsHeapSizeLimit: performance_js_1.jsHeapSizeLimit,
221
221
  reset,
222
222
  }),
223
223
  })
@@ -250,7 +250,7 @@ class App {
250
250
  this.startCallbacks.forEach((cb) => cb());
251
251
  this.observer.observe();
252
252
  this.ticker.start();
253
- utils_1.log("OpenReplay tracking started.");
253
+ (0, utils_js_1.log)("OpenReplay tracking started.");
254
254
  const onStartInfo = { sessionToken: token, userUUID, sessionID };
255
255
  if (typeof this.options.onStart === 'function') {
256
256
  this.options.onStart(onStartInfo);
@@ -260,7 +260,7 @@ class App {
260
260
  .catch(e => {
261
261
  sessionStorage.removeItem(this.options.session_token_key);
262
262
  this.stop();
263
- utils_1.warn("OpenReplay was unable to start. ", e);
263
+ (0, utils_js_1.warn)("OpenReplay was unable to start. ", e);
264
264
  this._debug("session_start", e);
265
265
  throw e;
266
266
  });
@@ -293,7 +293,7 @@ class App {
293
293
  this.nodes.clear();
294
294
  this.ticker.stop();
295
295
  this.stopCallbacks.forEach((cb) => cb());
296
- utils_1.log("OpenReplay tracking stopped.");
296
+ (0, utils_js_1.log)("OpenReplay tracking stopped.");
297
297
  }
298
298
  finally {
299
299
  this.isActive = false;
@@ -1,4 +1,4 @@
1
- import App from './index';
1
+ import App from "./index.js";
2
2
  interface Window extends WindowProxy {
3
3
  HTMLInputElement: typeof HTMLInputElement;
4
4
  HTMLLinkElement: typeof HTMLLinkElement;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../utils");
4
- const messages_1 = require("../messages");
3
+ const utils_js_1 = require("../utils.js");
4
+ const index_js_1 = require("../messages/index.js");
5
5
  function isSVGElement(node) {
6
6
  return node.namespaceURI === 'http://www.w3.org/2000/svg';
7
7
  }
@@ -33,7 +33,7 @@ class Observer {
33
33
  if (frameID === undefined || docID === undefined) {
34
34
  continue;
35
35
  }
36
- this.app.send(messages_1.CreateIFrameDocument(frameID, docID));
36
+ this.app.send((0, index_js_1.CreateIFrameDocument)(frameID, docID));
37
37
  continue;
38
38
  }
39
39
  if (this.isIgnored(target) || !context.document.contains(target)) {
@@ -128,16 +128,16 @@ class Observer {
128
128
  name = name.substr(6);
129
129
  }
130
130
  if (value === null) {
131
- this.app.send(new messages_1.RemoveNodeAttribute(id, name));
131
+ this.app.send(new index_js_1.RemoveNodeAttribute(id, name));
132
132
  }
133
133
  else if (name === 'href') {
134
134
  if (value.length > 1e5) {
135
135
  value = '';
136
136
  }
137
- this.app.send(new messages_1.SetNodeAttributeURLBased(id, name, value, this.app.getBaseHref()));
137
+ this.app.send(new index_js_1.SetNodeAttributeURLBased(id, name, value, this.app.getBaseHref()));
138
138
  }
139
139
  else {
140
- this.app.send(new messages_1.SetNodeAttribute(id, name, value));
140
+ this.app.send(new index_js_1.SetNodeAttribute(id, name, value));
141
141
  }
142
142
  return;
143
143
  }
@@ -157,18 +157,19 @@ class Observer {
157
157
  return;
158
158
  }
159
159
  if (value === null) {
160
- this.app.send(new messages_1.RemoveNodeAttribute(id, name));
160
+ this.app.send(new index_js_1.RemoveNodeAttribute(id, name));
161
161
  return;
162
162
  }
163
163
  if (name === 'style' || name === 'href' && this.isInstance(node, HTMLLinkElement)) {
164
- this.app.send(new messages_1.SetNodeAttributeURLBased(id, name, value, this.app.getBaseHref()));
164
+ this.app.send(new index_js_1.SetNodeAttributeURLBased(id, name, value, this.app.getBaseHref()));
165
165
  return;
166
166
  }
167
167
  if (name === 'href' || value.length > 1e5) {
168
168
  value = '';
169
169
  }
170
- this.app.send(new messages_1.SetNodeAttribute(id, name, value));
170
+ this.app.send(new index_js_1.SetNodeAttribute(id, name, value));
171
171
  }
172
+ /* TODO: abstract sanitation */
172
173
  getInnerTextSecure(el) {
173
174
  const id = this.app.nodes.getID(el);
174
175
  if (!id) {
@@ -184,18 +185,19 @@ class Observer {
184
185
  data = data.replace(/\d/g, '0');
185
186
  }
186
187
  if (this.options.obscureTextEmails) {
187
- data = data.replace(/([^\s]+)@([^\s]+)\.([^\s]+)/g, (...f) => utils_1.stars(f[1]) + '@' + utils_1.stars(f[2]) + '.' + utils_1.stars(f[3]));
188
+ data = data.replace(/([^\s]+)@([^\s]+)\.([^\s]+)/g, (...f) => (0, utils_js_1.stars)(f[1]) + '@' + (0, utils_js_1.stars)(f[2]) + '.' + (0, utils_js_1.stars)(f[3]));
188
189
  }
189
190
  return data;
190
191
  }
191
192
  sendNodeData(id, parentElement, data) {
192
193
  if (this.isInstance(parentElement, HTMLStyleElement) || this.isInstance(parentElement, SVGStyleElement)) {
193
- this.app.send(new messages_1.SetCSSDataURLBased(id, data, this.app.getBaseHref()));
194
+ this.app.send(new index_js_1.SetCSSDataURLBased(id, data, this.app.getBaseHref()));
194
195
  return;
195
196
  }
196
197
  data = this.checkObscure(id, data);
197
- this.app.send(new messages_1.SetNodeData(id, data));
198
+ this.app.send(new index_js_1.SetNodeData(id, data));
198
199
  }
200
+ /* end TODO: abstract sanitation */
199
201
  bindNode(node) {
200
202
  const r = this.app.nodes.registerNode(node);
201
203
  const id = r[0];
@@ -210,7 +212,9 @@ class Observer {
210
212
  acceptNode: (node) => this.isIgnored(node) || this.app.nodes.getID(node) !== undefined
211
213
  ? NodeFilter.FILTER_REJECT
212
214
  : NodeFilter.FILTER_ACCEPT,
213
- }, false);
215
+ },
216
+ // @ts-ignore
217
+ false);
214
218
  while (walker.nextNode()) {
215
219
  this.bindNode(walker.currentNode);
216
220
  }
@@ -218,7 +222,7 @@ class Observer {
218
222
  unbindNode(node) {
219
223
  const id = this.app.nodes.unregisterNode(node);
220
224
  if (id !== undefined && this.recents[id] === false) {
221
- this.app.send(new messages_1.RemoveNode(id));
225
+ this.app.send(new index_js_1.RemoveNode(id));
222
226
  }
223
227
  }
224
228
  _commitNode(id, node) {
@@ -242,7 +246,7 @@ class Observer {
242
246
  return false;
243
247
  }
244
248
  if (this.textMasked.has(parentID) ||
245
- (this.isInstance(node, Element) && utils_1.hasOpenreplayAttribute(node, 'masked'))) {
249
+ (this.isInstance(node, Element) && (0, utils_js_1.hasOpenreplayAttribute)(node, 'masked'))) {
246
250
  this.textMasked.add(id);
247
251
  }
248
252
  let sibling = node.previousSibling;
@@ -267,7 +271,7 @@ class Observer {
267
271
  if (isNew === true) {
268
272
  if (this.isInstance(node, Element)) {
269
273
  if (parentID !== undefined) {
270
- this.app.send(new messages_1.CreateElementNode(id, parentID, index, node.tagName, isSVGElement(node)));
274
+ this.app.send(new index_js_1.CreateElementNode(id, parentID, index, node.tagName, isSVGElement(node)));
271
275
  }
272
276
  for (let i = 0; i < node.attributes.length; i++) {
273
277
  const attr = node.attributes[i];
@@ -280,13 +284,13 @@ class Observer {
280
284
  }
281
285
  else if (this.isInstance(node, Text)) {
282
286
  // for text node id != 0, hence parentID !== undefined and parent is Element
283
- this.app.send(new messages_1.CreateTextNode(id, parentID, index));
287
+ this.app.send(new index_js_1.CreateTextNode(id, parentID, index));
284
288
  this.sendNodeData(id, parent, node.data);
285
289
  }
286
290
  return true;
287
291
  }
288
292
  if (isNew === false && parentID !== undefined) {
289
- this.app.send(new messages_1.MoveNode(id, parentID, index));
293
+ this.app.send(new index_js_1.MoveNode(id, parentID, index));
290
294
  }
291
295
  const attr = this.attributesList[id];
292
296
  if (attr !== undefined) {
@@ -365,7 +369,7 @@ class Observer {
365
369
  console.log("Wrong");
366
370
  return;
367
371
  }
368
- this.app.send(messages_1.CreateIFrameDocument(id, docID));
372
+ this.app.send((0, index_js_1.CreateIFrameDocument)(id, docID));
369
373
  this.commitNodes();
370
374
  }
371
375
  observe() {
@@ -377,7 +381,7 @@ class Observer {
377
381
  attributeOldValue: false,
378
382
  characterDataOldValue: false,
379
383
  });
380
- this.app.send(new messages_1.CreateDocument());
384
+ this.app.send(new index_js_1.CreateDocument());
381
385
  this.bindTree(this.context.document.documentElement);
382
386
  this.commitNodes();
383
387
  }
@@ -1,4 +1,4 @@
1
- import App from './index';
1
+ import App from "./index.js";
2
2
  declare type Callback = () => void;
3
3
  export default class Ticker {
4
4
  private readonly app;
package/cjs/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import App from './app';
2
- export { default as App } from './app';
3
- import * as _Messages from './messages';
1
+ import App from "./app/index.js";
2
+ export { default as App } from './app/index.js';
3
+ import * as _Messages from "./messages/index.js";
4
4
  export declare const Messages: typeof _Messages;
5
- import { Options as AppOptions } from './app';
6
- import { Options as ConsoleOptions } from './modules/console';
7
- import { Options as ExceptionOptions } from './modules/exception';
8
- import { Options as InputOptions } from './modules/input';
9
- import { Options as PerformanceOptions } from './modules/performance';
10
- import { Options as TimingOptions } from './modules/timing';
5
+ import { Options as AppOptions } from "./app/index.js";
6
+ import { Options as ConsoleOptions } from "./modules/console.js";
7
+ import { Options as ExceptionOptions } from "./modules/exception.js";
8
+ import { Options as InputOptions } from "./modules/input.js";
9
+ import { Options as PerformanceOptions } from "./modules/performance.js";
10
+ import { Options as TimingOptions } from "./modules/timing.js";
11
11
  export declare type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
12
12
  projectID?: number;
13
13
  projectKey: string;
package/cjs/index.js CHANGED
@@ -1,40 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Messages = exports.App = void 0;
4
- const app_1 = require("./app");
5
- var app_2 = require("./app");
6
- Object.defineProperty(exports, "App", { enumerable: true, get: function () { return app_2.default; } });
7
- const messages_1 = require("./messages");
8
- const _Messages = require("./messages");
4
+ const index_js_1 = require("./app/index.js");
5
+ var index_js_2 = require("./app/index.js");
6
+ Object.defineProperty(exports, "App", { enumerable: true, get: function () { return index_js_2.default; } });
7
+ const index_js_3 = require("./messages/index.js");
8
+ const _Messages = require("./messages/index.js");
9
9
  exports.Messages = _Messages;
10
- const connection_1 = require("./modules/connection");
11
- const console_1 = require("./modules/console");
12
- const exception_1 = require("./modules/exception");
13
- const img_1 = require("./modules/img");
14
- const input_1 = require("./modules/input");
15
- const mouse_1 = require("./modules/mouse");
16
- const timing_1 = require("./modules/timing");
17
- const performance_1 = require("./modules/performance");
18
- const scroll_1 = require("./modules/scroll");
19
- const viewport_1 = require("./modules/viewport");
20
- const longtasks_1 = require("./modules/longtasks");
21
- const cssrules_1 = require("./modules/cssrules");
22
- const utils_1 = require("./utils");
10
+ const connection_js_1 = require("./modules/connection.js");
11
+ const console_js_1 = require("./modules/console.js");
12
+ const exception_js_1 = require("./modules/exception.js");
13
+ const img_js_1 = require("./modules/img.js");
14
+ const input_js_1 = require("./modules/input.js");
15
+ const mouse_js_1 = require("./modules/mouse.js");
16
+ const timing_js_1 = require("./modules/timing.js");
17
+ const performance_js_1 = require("./modules/performance.js");
18
+ const scroll_js_1 = require("./modules/scroll.js");
19
+ const viewport_js_1 = require("./modules/viewport.js");
20
+ const longtasks_js_1 = require("./modules/longtasks.js");
21
+ const cssrules_js_1 = require("./modules/cssrules.js");
22
+ const utils_js_1 = require("./utils.js");
23
23
  const DOCS_SETUP = '/installation/setup-or';
24
24
  function processOptions(obj) {
25
25
  if (obj == null) {
26
- console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${utils_1.DOCS_HOST}${DOCS_SETUP}`);
26
+ console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${utils_js_1.DOCS_HOST}${DOCS_SETUP}`);
27
27
  return false;
28
28
  }
29
29
  if (typeof obj.projectKey !== 'string') {
30
30
  if (typeof obj.projectKey !== 'number') {
31
31
  if (typeof obj.projectID !== 'number') { // Back compatability
32
- console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${utils_1.DOCS_HOST}${DOCS_SETUP} for more information.`);
32
+ console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${utils_js_1.DOCS_HOST}${DOCS_SETUP} for more information.`);
33
33
  return false;
34
34
  }
35
35
  else {
36
36
  obj.projectKey = obj.projectID.toString();
37
- utils_1.deprecationWarn("`projectID` option", "`projectKey` option", DOCS_SETUP);
37
+ (0, utils_js_1.deprecationWarn)("`projectID` option", "`projectKey` option", DOCS_SETUP);
38
38
  }
39
39
  }
40
40
  else {
@@ -43,7 +43,7 @@ function processOptions(obj) {
43
43
  }
44
44
  }
45
45
  if (typeof obj.sessionToken !== 'string' && obj.sessionToken != null) {
46
- console.warn(`OpenReplay: invalid options argument type. Please, check documentation on ${utils_1.DOCS_HOST}${DOCS_SETUP}`);
46
+ console.warn(`OpenReplay: invalid options argument type. Please, check documentation on ${utils_js_1.DOCS_HOST}${DOCS_SETUP}`);
47
47
  }
48
48
  return true;
49
49
  }
@@ -56,17 +56,17 @@ class API {
56
56
  return;
57
57
  }
58
58
  if (e instanceof Error) {
59
- this.app.send(exception_1.getExceptionMessage(e, []));
59
+ this.app.send((0, exception_js_1.getExceptionMessage)(e, []));
60
60
  }
61
61
  else if (e instanceof ErrorEvent ||
62
62
  ('PromiseRejectionEvent' in window && e instanceof PromiseRejectionEvent)) {
63
- const msg = exception_1.getExceptionMessageFromEvent(e);
63
+ const msg = (0, exception_js_1.getExceptionMessageFromEvent)(e);
64
64
  if (msg != null) {
65
65
  this.app.send(msg);
66
66
  }
67
67
  }
68
68
  };
69
- if (!utils_1.IN_BROWSER || !processOptions(options)) {
69
+ if (!utils_js_1.IN_BROWSER || !processOptions(options)) {
70
70
  return;
71
71
  }
72
72
  if (window.__OPENREPLAY__) {
@@ -77,7 +77,10 @@ class API {
77
77
  console.error("OpenReplay: Your website must be publicly accessible and running on SSL in order for OpenReplay to properly capture and replay the user session. You can disable this check by setting `__DISABLE_SECURE_MODE` option to `true` if you are testing in localhost. Keep in mind, that asset files on a local machine are not available to the outside world. This might affect tracking if you use css files.");
78
78
  return;
79
79
  }
80
- const doNotTrack = options.respectDoNotTrack && (navigator.doNotTrack == '1' || window.doNotTrack == '1');
80
+ const doNotTrack = options.respectDoNotTrack &&
81
+ (navigator.doNotTrack == '1'
82
+ // @ts-ignore
83
+ || window.doNotTrack == '1');
81
84
  this.app = doNotTrack ||
82
85
  !('Map' in window) ||
83
86
  !('Set' in window) ||
@@ -88,31 +91,31 @@ class API {
88
91
  !('Blob' in window) ||
89
92
  !('Worker' in window)
90
93
  ? null
91
- : new app_1.default(options.projectKey, options.sessionToken, options);
94
+ : new index_js_1.default(options.projectKey, options.sessionToken, options);
92
95
  if (this.app !== null) {
93
- viewport_1.default(this.app);
94
- cssrules_1.default(this.app);
95
- connection_1.default(this.app);
96
- console_1.default(this.app, options);
97
- exception_1.default(this.app, options);
98
- img_1.default(this.app);
99
- input_1.default(this.app, options);
100
- mouse_1.default(this.app);
101
- timing_1.default(this.app, options);
102
- performance_1.default(this.app, options);
103
- scroll_1.default(this.app);
104
- longtasks_1.default(this.app);
96
+ (0, viewport_js_1.default)(this.app);
97
+ (0, cssrules_js_1.default)(this.app);
98
+ (0, connection_js_1.default)(this.app);
99
+ (0, console_js_1.default)(this.app, options);
100
+ (0, exception_js_1.default)(this.app, options);
101
+ (0, img_js_1.default)(this.app);
102
+ (0, input_js_1.default)(this.app, options);
103
+ (0, mouse_js_1.default)(this.app);
104
+ (0, timing_js_1.default)(this.app, options);
105
+ (0, performance_js_1.default)(this.app, options);
106
+ (0, scroll_js_1.default)(this.app);
107
+ (0, longtasks_js_1.default)(this.app);
105
108
  window.__OPENREPLAY__ = this;
106
109
  }
107
110
  else {
108
111
  console.log("OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1.");
109
112
  const req = new XMLHttpRequest();
110
- const orig = options.ingestPoint || app_1.DEFAULT_INGEST_POINT;
113
+ const orig = options.ingestPoint || index_js_1.DEFAULT_INGEST_POINT;
111
114
  req.open("POST", orig + "/v1/web/not-started");
112
115
  // no-cors issue only with text/plain or not-set Content-Type
113
116
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
114
117
  req.send(JSON.stringify({
115
- trackerVersion: '3.4.7',
118
+ trackerVersion: '3.4.8',
116
119
  projectKey: options.projectKey,
117
120
  doNotTrack,
118
121
  // TODO: add precise reason (an exact API missing)
@@ -129,12 +132,12 @@ class API {
129
132
  return this.app.active();
130
133
  }
131
134
  active() {
132
- utils_1.deprecationWarn("'active' method", "'isActive' method", "/");
135
+ (0, utils_js_1.deprecationWarn)("'active' method", "'isActive' method", "/");
133
136
  return this.isActive();
134
137
  }
135
138
  start() {
136
- if (!utils_1.IN_BROWSER) {
137
- console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${utils_1.DOCS_HOST}${DOCS_SETUP}`);
139
+ if (!utils_js_1.IN_BROWSER) {
140
+ console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${utils_js_1.DOCS_HOST}${DOCS_SETUP}`);
138
141
  return;
139
142
  }
140
143
  if (this.app === null) {
@@ -161,36 +164,36 @@ class API {
161
164
  return this.app.getSessionID();
162
165
  }
163
166
  sessionID() {
164
- utils_1.deprecationWarn("'sessionID' method", "'getSessionID' method", "/");
167
+ (0, utils_js_1.deprecationWarn)("'sessionID' method", "'getSessionID' method", "/");
165
168
  return this.getSessionID();
166
169
  }
167
170
  setUserID(id) {
168
171
  if (typeof id === 'string' && this.app !== null) {
169
- this.app.send(new messages_1.UserID(id));
172
+ this.app.send(new index_js_3.UserID(id));
170
173
  }
171
174
  }
172
175
  userID(id) {
173
- utils_1.deprecationWarn("'userID' method", "'setUserID' method", "/");
176
+ (0, utils_js_1.deprecationWarn)("'userID' method", "'setUserID' method", "/");
174
177
  this.setUserID(id);
175
178
  }
176
179
  setUserAnonymousID(id) {
177
180
  if (typeof id === 'string' && this.app !== null) {
178
- this.app.send(new messages_1.UserAnonymousID(id));
181
+ this.app.send(new index_js_3.UserAnonymousID(id));
179
182
  }
180
183
  }
181
184
  userAnonymousID(id) {
182
- utils_1.deprecationWarn("'userAnonymousID' method", "'setUserAnonymousID' method", "/");
185
+ (0, utils_js_1.deprecationWarn)("'userAnonymousID' method", "'setUserAnonymousID' method", "/");
183
186
  this.setUserAnonymousID(id);
184
187
  }
185
188
  setMetadata(key, value) {
186
189
  if (typeof key === 'string' &&
187
190
  typeof value === 'string' &&
188
191
  this.app !== null) {
189
- this.app.send(new messages_1.Metadata(key, value));
192
+ this.app.send(new index_js_3.Metadata(key, value));
190
193
  }
191
194
  }
192
195
  metadata(key, value) {
193
- utils_1.deprecationWarn("'metadata' method", "'setMetadata' method", "/");
196
+ (0, utils_js_1.deprecationWarn)("'metadata' method", "'setMetadata' method", "/");
194
197
  this.setMetadata(key, value);
195
198
  }
196
199
  event(key, payload, issue = false) {
@@ -205,7 +208,7 @@ class API {
205
208
  catch (e) {
206
209
  return;
207
210
  }
208
- this.app.send(new messages_1.RawCustomEvent(key, payload));
211
+ this.app.send(new index_js_3.RawCustomEvent(key, payload));
209
212
  }
210
213
  }
211
214
  }
@@ -217,7 +220,7 @@ class API {
217
220
  catch (e) {
218
221
  return;
219
222
  }
220
- this.app.send(new messages_1.CustomIssue(key, payload));
223
+ this.app.send(new index_js_3.CustomIssue(key, payload));
221
224
  }
222
225
  }
223
226
  }
@@ -1,5 +1,5 @@
1
- import Message from './message';
2
- import Writer from './writer';
1
+ import Message from "./message.js";
2
+ import Writer from "./writer.js";
3
3
  export declare const classes: Map<number, Function>;
4
4
  declare class _BatchMeta implements Message {
5
5
  pageNo: number;
@@ -1,4 +1,4 @@
1
- import Writer from './writer';
1
+ import Writer from "./writer.js";
2
2
  export default interface Message {
3
3
  encode(w: Writer): boolean;
4
4
  }
@@ -1,2 +1,2 @@
1
- import App from '../app';
1
+ import App from "../app/index.js";
2
2
  export default function (app: App): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const messages_1 = require("../messages");
3
+ const index_js_1 = require("../messages/index.js");
4
4
  function default_1(app) {
5
5
  const connection = navigator.connection ||
6
6
  navigator.mozConnection ||
@@ -8,7 +8,7 @@ function default_1(app) {
8
8
  if (connection === undefined) {
9
9
  return;
10
10
  }
11
- const sendConnectionInformation = () => app.send(new messages_1.ConnectionInformation(Math.round(connection.downlink * 1000), connection.type || 'unknown'));
11
+ const sendConnectionInformation = () => app.send(new index_js_1.ConnectionInformation(Math.round(connection.downlink * 1000), connection.type || 'unknown'));
12
12
  sendConnectionInformation();
13
13
  connection.addEventListener('change', sendConnectionInformation);
14
14
  }
@@ -1,4 +1,4 @@
1
- import App from '../app';
1
+ import App from "../app/index.js";
2
2
  export interface Options {
3
3
  consoleMethods: Array<string> | null;
4
4
  consoleThrottling: number;