@openreplay/tracker 3.4.6 → 3.4.10
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/cjs/app/index.d.ts +7 -7
- package/cjs/app/index.js +22 -21
- package/cjs/app/logger.d.ts +0 -0
- package/cjs/app/logger.js +1 -0
- package/cjs/app/observer/iframe_observer.d.ts +1 -1
- package/cjs/app/observer/iframe_observer.js +8 -7
- package/cjs/app/observer/observer.d.ts +5 -2
- package/cjs/app/observer/observer.js +70 -49
- package/cjs/app/observer/shadow_root_observer.d.ts +1 -1
- package/cjs/app/observer/shadow_root_observer.js +4 -4
- package/cjs/app/observer/top_observer.d.ts +3 -3
- package/cjs/app/observer/top_observer.js +28 -24
- package/cjs/app/observer.d.ts +1 -1
- package/cjs/app/observer.js +26 -22
- package/cjs/app/sanitizer.d.ts +0 -0
- package/cjs/app/sanitizer.js +1 -0
- package/cjs/app/ticker.d.ts +1 -1
- package/cjs/index.d.ts +11 -10
- package/cjs/index.js +59 -56
- package/cjs/messages/index.d.ts +2 -2
- package/cjs/messages/message.d.ts +1 -1
- package/cjs/modules/connection.d.ts +1 -1
- package/cjs/modules/connection.js +2 -2
- package/cjs/modules/console.d.ts +1 -1
- package/cjs/modules/console.js +6 -6
- package/cjs/modules/cssrules.d.ts +1 -1
- package/cjs/modules/cssrules.js +4 -4
- package/cjs/modules/exception.d.ts +2 -2
- package/cjs/modules/exception.js +4 -4
- package/cjs/modules/img.d.ts +1 -1
- package/cjs/modules/img.js +6 -6
- package/cjs/modules/input.d.ts +1 -1
- package/cjs/modules/input.js +11 -11
- package/cjs/modules/longtasks.d.ts +1 -1
- package/cjs/modules/longtasks.js +2 -2
- package/cjs/modules/mouse.d.ts +1 -1
- package/cjs/modules/mouse.js +10 -10
- package/cjs/modules/performance.d.ts +1 -1
- package/cjs/modules/performance.js +5 -5
- package/cjs/modules/scroll.d.ts +1 -1
- package/cjs/modules/scroll.js +3 -3
- package/cjs/modules/timing.d.ts +1 -1
- package/cjs/modules/timing.js +6 -6
- package/cjs/modules/viewport.d.ts +1 -1
- package/cjs/modules/viewport.js +4 -4
- package/cjs/utils.js +1 -1
- package/lib/app/index.d.ts +7 -7
- package/lib/app/index.js +10 -9
- package/lib/app/logger.d.ts +0 -0
- package/lib/app/logger.js +1 -0
- package/lib/app/observer/iframe_observer.d.ts +1 -1
- package/lib/app/observer/iframe_observer.js +7 -6
- package/lib/app/observer/observer.d.ts +5 -2
- package/lib/app/observer/observer.js +58 -37
- package/lib/app/observer/shadow_root_observer.d.ts +1 -1
- package/lib/app/observer/shadow_root_observer.js +2 -2
- package/lib/app/observer/top_observer.d.ts +3 -3
- package/lib/app/observer/top_observer.js +22 -18
- package/lib/app/observer.d.ts +1 -1
- package/lib/app/observer.js +9 -5
- package/lib/app/sanitizer.d.ts +0 -0
- package/lib/app/sanitizer.js +1 -0
- package/lib/app/ticker.d.ts +1 -1
- package/lib/index.d.ts +11 -10
- package/lib/index.js +25 -22
- package/lib/messages/index.d.ts +2 -2
- package/lib/messages/message.d.ts +1 -1
- package/lib/messages/tsconfig.tsbuildinfo +1 -1
- package/lib/modules/connection.d.ts +1 -1
- package/lib/modules/connection.js +1 -1
- package/lib/modules/console.d.ts +1 -1
- package/lib/modules/console.js +4 -4
- package/lib/modules/cssrules.d.ts +1 -1
- package/lib/modules/cssrules.js +1 -1
- package/lib/modules/exception.d.ts +2 -2
- package/lib/modules/exception.js +1 -1
- package/lib/modules/img.d.ts +1 -1
- package/lib/modules/img.js +2 -2
- package/lib/modules/input.d.ts +1 -1
- package/lib/modules/input.js +2 -2
- package/lib/modules/longtasks.d.ts +1 -1
- package/lib/modules/longtasks.js +1 -1
- package/lib/modules/mouse.d.ts +1 -1
- package/lib/modules/mouse.js +3 -3
- package/lib/modules/performance.d.ts +1 -1
- package/lib/modules/performance.js +2 -2
- package/lib/modules/scroll.d.ts +1 -1
- package/lib/modules/scroll.js +1 -1
- package/lib/modules/timing.d.ts +1 -1
- package/lib/modules/timing.js +3 -3
- package/lib/modules/viewport.d.ts +1 -1
- package/lib/modules/viewport.js +1 -1
- package/package.json +2 -2
- package/tsconfig-base.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { stars, hasOpenreplayAttribute } from
|
|
2
|
-
import {
|
|
1
|
+
import { stars, hasOpenreplayAttribute } from "../../utils.js";
|
|
2
|
+
import { RemoveNodeAttribute, SetNodeAttribute, SetNodeAttributeURLBased, SetCSSDataURLBased, SetNodeData, CreateTextNode, CreateElementNode, MoveNode, RemoveNode, } from "../../messages/index.js";
|
|
3
3
|
function isSVGElement(node) {
|
|
4
4
|
return node.namespaceURI === 'http://www.w3.org/2000/svg';
|
|
5
5
|
}
|
|
@@ -61,6 +61,7 @@ export default class Observer {
|
|
|
61
61
|
obscureTextEmails: true,
|
|
62
62
|
obscureTextNumbers: false,
|
|
63
63
|
}, options);
|
|
64
|
+
this.inUpperContext = context.parent === context;
|
|
64
65
|
this.observer = new MutationObserver(this.app.safe((mutations) => {
|
|
65
66
|
for (const mutation of mutations) {
|
|
66
67
|
const target = mutation.target;
|
|
@@ -182,24 +183,35 @@ export default class Observer {
|
|
|
182
183
|
}
|
|
183
184
|
this.app.send(new SetNodeAttribute(id, name, value));
|
|
184
185
|
}
|
|
186
|
+
/* TODO: abstract sanitation */
|
|
187
|
+
getInnerTextSecure(el) {
|
|
188
|
+
const id = this.app.nodes.getID(el);
|
|
189
|
+
if (!id) {
|
|
190
|
+
return '';
|
|
191
|
+
}
|
|
192
|
+
return this.checkObscure(id, el.innerText);
|
|
193
|
+
}
|
|
194
|
+
checkObscure(id, data) {
|
|
195
|
+
if (this.textMasked.has(id)) {
|
|
196
|
+
return data.replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, '█');
|
|
197
|
+
}
|
|
198
|
+
if (this.options.obscureTextNumbers) {
|
|
199
|
+
data = data.replace(/\d/g, '0');
|
|
200
|
+
}
|
|
201
|
+
if (this.options.obscureTextEmails) {
|
|
202
|
+
data = data.replace(/([^\s]+)@([^\s]+)\.([^\s]+)/g, (...f) => stars(f[1]) + '@' + stars(f[2]) + '.' + stars(f[3]));
|
|
203
|
+
}
|
|
204
|
+
return data;
|
|
205
|
+
}
|
|
185
206
|
sendNodeData(id, parentElement, data) {
|
|
186
207
|
if (isInstance(parentElement, HTMLStyleElement) || isInstance(parentElement, SVGStyleElement)) {
|
|
187
208
|
this.app.send(new SetCSSDataURLBased(id, data, this.app.getBaseHref()));
|
|
188
209
|
return;
|
|
189
210
|
}
|
|
190
|
-
|
|
191
|
-
data = data.replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, '█');
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
if (this.options.obscureTextNumbers) {
|
|
195
|
-
data = data.replace(/\d/g, '0');
|
|
196
|
-
}
|
|
197
|
-
if (this.options.obscureTextEmails) {
|
|
198
|
-
data = data.replace(/([^\s]+)@([^\s]+)\.([^\s]+)/g, (...f) => stars(f[1]) + '@' + stars(f[2]) + '.' + stars(f[3]));
|
|
199
|
-
}
|
|
200
|
-
}
|
|
211
|
+
data = this.checkObscure(id, data);
|
|
201
212
|
this.app.send(new SetNodeData(id, data));
|
|
202
213
|
}
|
|
214
|
+
/* end TODO: abstract sanitation */
|
|
203
215
|
bindNode(node) {
|
|
204
216
|
const r = this.app.nodes.registerNode(node);
|
|
205
217
|
const id = r[0];
|
|
@@ -214,7 +226,9 @@ export default class Observer {
|
|
|
214
226
|
acceptNode: (node) => isIgnored(node) || this.app.nodes.getID(node) !== undefined
|
|
215
227
|
? NodeFilter.FILTER_REJECT
|
|
216
228
|
: NodeFilter.FILTER_ACCEPT,
|
|
217
|
-
},
|
|
229
|
+
},
|
|
230
|
+
// @ts-ignore
|
|
231
|
+
false);
|
|
218
232
|
while (walker.nextNode()) {
|
|
219
233
|
this.bindNode(walker.currentNode);
|
|
220
234
|
}
|
|
@@ -231,25 +245,27 @@ export default class Observer {
|
|
|
231
245
|
}
|
|
232
246
|
const parent = node.parentNode;
|
|
233
247
|
let parentID;
|
|
234
|
-
//
|
|
235
|
-
//
|
|
236
|
-
//
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
(
|
|
252
|
-
|
|
248
|
+
// Disable parent check for the upper context HTMLHtmlElement, because it is root there... (before)
|
|
249
|
+
// TODO: get rid of "special" cases (there is an issue with CreateDocument altered behaviour though)
|
|
250
|
+
// TODO: Clean the logic (though now it workd fine)
|
|
251
|
+
if (!isInstance(node, HTMLHtmlElement) || !this.inUpperContext) {
|
|
252
|
+
if (parent === null) {
|
|
253
|
+
this.unbindNode(node);
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
parentID = this.app.nodes.getID(parent);
|
|
257
|
+
if (parentID === undefined) {
|
|
258
|
+
this.unbindNode(node);
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
if (!this.commitNode(parentID)) {
|
|
262
|
+
this.unbindNode(node);
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
if (this.textMasked.has(parentID) ||
|
|
266
|
+
(isInstance(node, Element) && hasOpenreplayAttribute(node, 'masked'))) {
|
|
267
|
+
this.textMasked.add(id);
|
|
268
|
+
}
|
|
253
269
|
}
|
|
254
270
|
let sibling = node.previousSibling;
|
|
255
271
|
while (sibling !== null) {
|
|
@@ -262,7 +278,7 @@ export default class Observer {
|
|
|
262
278
|
sibling = sibling.previousSibling;
|
|
263
279
|
}
|
|
264
280
|
if (sibling === null) {
|
|
265
|
-
this.indexes[id] = 0;
|
|
281
|
+
this.indexes[id] = 0; //
|
|
266
282
|
}
|
|
267
283
|
const isNew = this.recents[id];
|
|
268
284
|
const index = this.indexes[id];
|
|
@@ -321,14 +337,19 @@ export default class Observer {
|
|
|
321
337
|
commitNodes() {
|
|
322
338
|
let node;
|
|
323
339
|
for (let id = 0; id < this.recents.length; id++) {
|
|
340
|
+
// TODO: take a look at recents/ commitNode logic. why wasn't this check here before commitNode? only because of committed check inside?
|
|
341
|
+
if (!this.recents[id]) {
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
324
344
|
this.commitNode(id);
|
|
325
|
-
if (
|
|
345
|
+
if (node = this.app.nodes.getNode(id)) {
|
|
326
346
|
this.app.nodes.callNodeCallbacks(node);
|
|
327
347
|
}
|
|
328
348
|
}
|
|
329
349
|
this.clear();
|
|
330
350
|
}
|
|
331
|
-
|
|
351
|
+
// ISSSUE
|
|
352
|
+
observeRoot(node, beforeCommit, nodeToBind = node) {
|
|
332
353
|
this.observer.observe(node, {
|
|
333
354
|
childList: true,
|
|
334
355
|
attributes: true,
|
|
@@ -337,7 +358,7 @@ export default class Observer {
|
|
|
337
358
|
attributeOldValue: false,
|
|
338
359
|
characterDataOldValue: false,
|
|
339
360
|
});
|
|
340
|
-
this.bindTree(
|
|
361
|
+
this.bindTree(nodeToBind);
|
|
341
362
|
beforeCommit(this.app.nodes.getID(node));
|
|
342
363
|
this.commitNodes();
|
|
343
364
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Observer from
|
|
2
|
-
import { CreateIFrameDocument
|
|
1
|
+
import Observer from "./observer.js";
|
|
2
|
+
import { CreateIFrameDocument } from "../../messages/index.js";
|
|
3
3
|
export default class ShadowRootObserver extends Observer {
|
|
4
4
|
observe(el) {
|
|
5
5
|
const shRoot = el.shadowRoot;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Observer from
|
|
2
|
-
import type { Options as BaseOptions } from
|
|
3
|
-
import
|
|
1
|
+
import Observer from "./observer.js";
|
|
2
|
+
import type { Options as BaseOptions } from "./observer.js";
|
|
3
|
+
import App from "../index.js";
|
|
4
4
|
export interface Options extends Partial<BaseOptions> {
|
|
5
5
|
captureIFrames: boolean;
|
|
6
6
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import Observer, { isInstance } from
|
|
2
|
-
import IFrameObserver from
|
|
3
|
-
import ShadowRootObserver from
|
|
4
|
-
import { CreateDocument
|
|
1
|
+
import Observer, { isInstance } from "./observer.js";
|
|
2
|
+
import IFrameObserver from "./iframe_observer.js";
|
|
3
|
+
import ShadowRootObserver from "./shadow_root_observer.js";
|
|
4
|
+
import { CreateDocument } from "../../messages/index.js";
|
|
5
|
+
const attachShadowNativeFn = Element.prototype.attachShadow;
|
|
5
6
|
export default class TopObserver extends Observer {
|
|
6
7
|
constructor(app, options) {
|
|
7
8
|
super(app, Object.assign({
|
|
@@ -22,21 +23,10 @@ export default class TopObserver extends Observer {
|
|
|
22
23
|
this.handleShadowRoot(node.shadowRoot);
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
|
-
const attachShadowNative = Element.prototype.attachShadow;
|
|
26
|
-
const observer = this;
|
|
27
|
-
Element.prototype.attachShadow = function () {
|
|
28
|
-
const shadow = attachShadowNative.apply(this, arguments);
|
|
29
|
-
if (app.active()) { // Is it necessary here?
|
|
30
|
-
// TODO: clearify logic - sub-observation should happen only during main observation.
|
|
31
|
-
// THat works well with node callbacks, but not here
|
|
32
|
-
observer.handleShadowRoot(shadow);
|
|
33
|
-
}
|
|
34
|
-
return shadow;
|
|
35
|
-
};
|
|
36
26
|
}
|
|
37
27
|
handleIframe(iframe) {
|
|
38
28
|
let context = null;
|
|
39
|
-
const handle = () => {
|
|
29
|
+
const handle = this.app.safe(() => {
|
|
40
30
|
const id = this.app.nodes.getID(iframe);
|
|
41
31
|
if (id === undefined) {
|
|
42
32
|
return;
|
|
@@ -51,7 +41,7 @@ export default class TopObserver extends Observer {
|
|
|
51
41
|
const observer = new IFrameObserver(this.app, this.options, context);
|
|
52
42
|
this.iframeObservers.push(observer);
|
|
53
43
|
observer.observe(iframe);
|
|
54
|
-
};
|
|
44
|
+
});
|
|
55
45
|
this.app.attachEventListener(iframe, "load", handle);
|
|
56
46
|
handle();
|
|
57
47
|
}
|
|
@@ -61,11 +51,25 @@ export default class TopObserver extends Observer {
|
|
|
61
51
|
observer.observe(shRoot.host);
|
|
62
52
|
}
|
|
63
53
|
observe() {
|
|
54
|
+
// Protection from several subsequent calls?
|
|
55
|
+
const observer = this;
|
|
56
|
+
Element.prototype.attachShadow = function () {
|
|
57
|
+
const shadow = attachShadowNativeFn.apply(this, arguments);
|
|
58
|
+
observer.handleShadowRoot(shadow);
|
|
59
|
+
return shadow;
|
|
60
|
+
};
|
|
61
|
+
// Can observe documentElement (<html>) here, because it is not supposed to be changing.
|
|
62
|
+
// However, it is possible in some exotic cases and may cause an ignorance of the newly created <html>
|
|
63
|
+
// In this case context.document have to be observed, but this will cause
|
|
64
|
+
// the change in the re-player behaviour caused by CreateDocument message:
|
|
65
|
+
// the 0-node ("fRoot") will become #document rather than documentElement as it is now.
|
|
66
|
+
// Alternatively - observe(#document) then bindNode(documentElement)
|
|
64
67
|
this.observeRoot(this.context.document, () => {
|
|
65
68
|
this.app.send(new CreateDocument());
|
|
66
|
-
});
|
|
69
|
+
}, this.context.document.documentElement);
|
|
67
70
|
}
|
|
68
71
|
disconnect() {
|
|
72
|
+
Element.prototype.attachShadow = attachShadowNativeFn;
|
|
69
73
|
this.iframeObservers.forEach(o => o.disconnect());
|
|
70
74
|
this.iframeObservers = [];
|
|
71
75
|
this.shadowRootObservers.forEach(o => o.disconnect());
|
package/lib/app/observer.d.ts
CHANGED
package/lib/app/observer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { stars, hasOpenreplayAttribute } from
|
|
2
|
-
import { CreateDocument, CreateElementNode, CreateTextNode, SetNodeData, SetCSSDataURLBased, SetNodeAttribute, SetNodeAttributeURLBased, RemoveNodeAttribute, MoveNode, RemoveNode, CreateIFrameDocument, } from
|
|
1
|
+
import { stars, hasOpenreplayAttribute } from "../utils.js";
|
|
2
|
+
import { CreateDocument, CreateElementNode, CreateTextNode, SetNodeData, SetCSSDataURLBased, SetNodeAttribute, SetNodeAttributeURLBased, RemoveNodeAttribute, MoveNode, RemoveNode, CreateIFrameDocument, } from "../messages/index.js";
|
|
3
3
|
function isSVGElement(node) {
|
|
4
4
|
return node.namespaceURI === 'http://www.w3.org/2000/svg';
|
|
5
5
|
}
|
|
@@ -167,6 +167,7 @@ export default class Observer {
|
|
|
167
167
|
}
|
|
168
168
|
this.app.send(new SetNodeAttribute(id, name, value));
|
|
169
169
|
}
|
|
170
|
+
/* TODO: abstract sanitation */
|
|
170
171
|
getInnerTextSecure(el) {
|
|
171
172
|
const id = this.app.nodes.getID(el);
|
|
172
173
|
if (!id) {
|
|
@@ -194,6 +195,7 @@ export default class Observer {
|
|
|
194
195
|
data = this.checkObscure(id, data);
|
|
195
196
|
this.app.send(new SetNodeData(id, data));
|
|
196
197
|
}
|
|
198
|
+
/* end TODO: abstract sanitation */
|
|
197
199
|
bindNode(node) {
|
|
198
200
|
const r = this.app.nodes.registerNode(node);
|
|
199
201
|
const id = r[0];
|
|
@@ -208,7 +210,9 @@ export default class Observer {
|
|
|
208
210
|
acceptNode: (node) => this.isIgnored(node) || this.app.nodes.getID(node) !== undefined
|
|
209
211
|
? NodeFilter.FILTER_REJECT
|
|
210
212
|
: NodeFilter.FILTER_ACCEPT,
|
|
211
|
-
},
|
|
213
|
+
},
|
|
214
|
+
// @ts-ignore
|
|
215
|
+
false);
|
|
212
216
|
while (walker.nextNode()) {
|
|
213
217
|
this.bindNode(walker.currentNode);
|
|
214
218
|
}
|
|
@@ -327,7 +331,7 @@ export default class Observer {
|
|
|
327
331
|
}
|
|
328
332
|
handleIframe(iframe) {
|
|
329
333
|
let context = null;
|
|
330
|
-
const handle = () => {
|
|
334
|
+
const handle = this.app.safe(() => {
|
|
331
335
|
const id = this.app.nodes.getID(iframe);
|
|
332
336
|
if (id === undefined) {
|
|
333
337
|
return;
|
|
@@ -342,7 +346,7 @@ export default class Observer {
|
|
|
342
346
|
const observer = new Observer(this.app, this.options, context);
|
|
343
347
|
this.iframeObservers.push(observer);
|
|
344
348
|
observer.observeIframe(id, context);
|
|
345
|
-
};
|
|
349
|
+
});
|
|
346
350
|
this.app.attachEventListener(iframe, "load", handle);
|
|
347
351
|
handle();
|
|
348
352
|
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/app/ticker.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import App from
|
|
2
|
-
export { default as App } from './app';
|
|
3
|
-
import * as _Messages from
|
|
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
|
|
6
|
-
import { Options as ConsoleOptions } from
|
|
7
|
-
import { Options as ExceptionOptions } from
|
|
8
|
-
import { Options as InputOptions } from
|
|
9
|
-
import { Options as PerformanceOptions } from
|
|
10
|
-
import { Options as TimingOptions } from
|
|
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
|
+
export type { OnStartInfo } from './app/index.js';
|
|
11
12
|
export declare type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
|
|
12
13
|
projectID?: number;
|
|
13
14
|
projectKey: string;
|
|
@@ -22,7 +23,7 @@ export default class API {
|
|
|
22
23
|
use<T>(fn: (app: App | null, options?: Options) => T): T;
|
|
23
24
|
isActive(): boolean;
|
|
24
25
|
active(): boolean;
|
|
25
|
-
start():
|
|
26
|
+
start(): Promise<import("./app/index.js").OnStartInfo>;
|
|
26
27
|
stop(): void;
|
|
27
28
|
getSessionToken(): string | null | undefined;
|
|
28
29
|
getSessionID(): string | null | undefined;
|
package/lib/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import App, { DEFAULT_INGEST_POINT } from
|
|
2
|
-
export { default as App } from './app';
|
|
3
|
-
import { UserID, UserAnonymousID, Metadata, RawCustomEvent, CustomIssue } from
|
|
4
|
-
import * as _Messages from
|
|
1
|
+
import App, { DEFAULT_INGEST_POINT } from "./app/index.js";
|
|
2
|
+
export { default as App } from './app/index.js';
|
|
3
|
+
import { UserID, UserAnonymousID, Metadata, RawCustomEvent, CustomIssue } from "./messages/index.js";
|
|
4
|
+
import * as _Messages from "./messages/index.js";
|
|
5
5
|
export const Messages = _Messages;
|
|
6
|
-
import Connection from
|
|
7
|
-
import Console from
|
|
8
|
-
import Exception, { getExceptionMessageFromEvent, getExceptionMessage } from
|
|
9
|
-
import Img from
|
|
10
|
-
import Input from
|
|
11
|
-
import Mouse from
|
|
12
|
-
import Timing from
|
|
13
|
-
import Performance from
|
|
14
|
-
import Scroll from
|
|
15
|
-
import Viewport from
|
|
16
|
-
import Longtasks from
|
|
17
|
-
import CSSRules from
|
|
18
|
-
import { IN_BROWSER, deprecationWarn, DOCS_HOST } from
|
|
6
|
+
import Connection from "./modules/connection.js";
|
|
7
|
+
import Console from "./modules/console.js";
|
|
8
|
+
import Exception, { getExceptionMessageFromEvent, getExceptionMessage } from "./modules/exception.js";
|
|
9
|
+
import Img from "./modules/img.js";
|
|
10
|
+
import Input from "./modules/input.js";
|
|
11
|
+
import Mouse from "./modules/mouse.js";
|
|
12
|
+
import Timing from "./modules/timing.js";
|
|
13
|
+
import Performance from "./modules/performance.js";
|
|
14
|
+
import Scroll from "./modules/scroll.js";
|
|
15
|
+
import Viewport from "./modules/viewport.js";
|
|
16
|
+
import Longtasks from "./modules/longtasks.js";
|
|
17
|
+
import CSSRules from "./modules/cssrules.js";
|
|
18
|
+
import { IN_BROWSER, deprecationWarn, DOCS_HOST } from "./utils.js";
|
|
19
19
|
const DOCS_SETUP = '/installation/setup-or';
|
|
20
20
|
function processOptions(obj) {
|
|
21
21
|
if (obj == null) {
|
|
@@ -73,7 +73,10 @@ export default class API {
|
|
|
73
73
|
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.");
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
const doNotTrack = options.respectDoNotTrack &&
|
|
76
|
+
const doNotTrack = options.respectDoNotTrack &&
|
|
77
|
+
(navigator.doNotTrack == '1'
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
|| window.doNotTrack == '1');
|
|
77
80
|
this.app = doNotTrack ||
|
|
78
81
|
!('Map' in window) ||
|
|
79
82
|
!('Set' in window) ||
|
|
@@ -108,7 +111,7 @@ export default class API {
|
|
|
108
111
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
109
112
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
110
113
|
req.send(JSON.stringify({
|
|
111
|
-
trackerVersion: '3.4.
|
|
114
|
+
trackerVersion: '3.4.10',
|
|
112
115
|
projectKey: options.projectKey,
|
|
113
116
|
doNotTrack,
|
|
114
117
|
// TODO: add precise reason (an exact API missing)
|
|
@@ -131,12 +134,12 @@ export default class API {
|
|
|
131
134
|
start() {
|
|
132
135
|
if (!IN_BROWSER) {
|
|
133
136
|
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 ${DOCS_HOST}${DOCS_SETUP}`);
|
|
134
|
-
return;
|
|
137
|
+
return Promise.reject("Trying to start not in browser.");
|
|
135
138
|
}
|
|
136
139
|
if (this.app === null) {
|
|
137
|
-
return;
|
|
140
|
+
return Promise.reject("Browser doesn't support required api, or doNotTrack is active.");
|
|
138
141
|
}
|
|
139
|
-
this.app.start();
|
|
142
|
+
return this.app.start();
|
|
140
143
|
}
|
|
141
144
|
stop() {
|
|
142
145
|
if (this.app === null) {
|
package/lib/messages/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/messages/writer.ts","../../src/messages/message.ts","../../src/messages/index.ts","../../src/messages/webworker.ts","../../node_modules/@types/eslint-visitor-keys/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/base.d.ts","../../node_modules/@types/node/ts3.2/fs.d.ts","../../node_modules/@types/node/ts3.2/util.d.ts","../../node_modules/@types/node/ts3.2/globals.d.ts","../../node_modules/@types/node/ts3.2/base.d.ts","../../node_modules/@types/node/ts3.5/globals.global.d.ts","../../node_modules/@types/node/ts3.5/wasi.d.ts","../../node_modules/@types/node/ts3.5/base.d.ts","../../node_modules/@types/node/ts3.7/assert.d.ts","../../node_modules/@types/node/ts3.7/base.d.ts","../../node_modules/@types/node/ts3.7/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"b8aeff6e394e47092b25a03db1c5db0339a3f2d4fa4e9b7118ea43b440068086","8aa4c0659b8a040f765531d17e6cbac53deeb0a7e334d53e80d9dc85cb774546","98dd06c7e91230a93cd752a6a5d75d77c845b72bfc5228f9ff5b24f9ee1019d0","fe729eaf166de740549d4f03414e8edcf5c324e316a1eb20a1da3cbb1f72ad60","725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",{"version":"2dd7dbacbd70cc156185235140b7b6682c002c1ea678dd87d7a20589d4555fc0","affectsGlobalScope":true},"4ed9f71ddbb5753771ee391f64297078a88f7dfd1480646dcf08c31395778682","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","465150173a56b943b2f6d8918e35c89d8386ffd37aa466e486ca54db54d6cee7","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d4dd0b19ee0338dd4f1603eacb41859b9d5371bfef2b2849cb870d6fd6602bcb","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","eaa8136bb11fbea5bdaf29e06aa45a1969ddd39fbfb5fe58a01f00d7f1562cd9","e253cd3c7d10c4f600308d0528dd371d7e4165d8295b37a1f38d0ef6c0dfaf60","fb28748ff8d015f52e99daee4f454e57cec1a22141f1257c317f3630a15edeb7","9440dcf960685f7ec10856891a6cebb52a5ae8cef6a2e85daf9476dafd346cbe","5d9394b829cfd504b2fe17287aaad8ce1dcfb2a2183c962a90a85b96da2c1c90","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947","bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665","46cac76114704902baa535b30fb66a26aeaf9430f3b3ab44746e329f12e85498","ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","406a63c7e94107394341e97dbdc3312a1ecea75571d067a69eaa213786d9f154","d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","baa711b17f67390c60eac3c70a1391b23a8e3833cb723b2d7336d4817a22455c","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","b46af749e3574b83bccc0ec829322b15e834ae90b45760eebc75a189c28c0868","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"4cef33b2997388559c39b2f98c37e8319ad61e30a1f0edc55c53913f2250bade",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","255dbc5a5acef2b83b47145042aa0127ebf7fe24cd5ce6afaaaf5c8fc2c5eb96","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","64ef5112114bdd77304acb548f93777b263bbf57272776139425a58f68a10775","ecdf947a5111318568ba99f2a87b8498382d8871207f1bc6271ff3b9536a2448","2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761"],"options":{"composite":true,"declaration":true,"module":5,"noImplicitAny":true,"noImplicitThis":true,"outDir":"..","rootDir":"../../src","strictNullChecks":true,"target":2},"fileIdsList":[[46,69,75,76],[45,46,69,75,76,84,85],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76],[45,46,53,62,69,75,76],[37,45,46,53,69,75,76],[41,46,54,69,75,76],[46,62,69,75,76],[43,45,46,53,69,75,76],[45,46,69,75,76],[45,47,62,68,69,75,76],[45,46,53,62,68,69,75,76],[45,46,48,53,62,65,68,69,75,76],[45,46,48,65,68,69,75,76],[46,68,69,75,76],[43,45,46,62,69,75,76],[35,46,69,75,76],[46,67,69,75,76],[45,46,62,69,75,76],[46,60,69,71,75,76],[41,43,46,53,62,69,75,76],[46,69,74,75,76,77],[46,69,76],[34,46,69,75,76],[46,69,75],[46,69,75,76,78,79,80],[46,69,75,76,81,82],[46,69,75,76,83],[46,53,69,75,76],[46,59,69,75,76],[46,75,76],[45,46,62,68,69,71,75,76],[46,69,75,76,84],[28,29,46,69,75,76],[28,46,69,75,76]],"referencedMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"exportedModulesMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"semanticDiagnosticsPerFile":[32,33,86,87,85,35,74,36,37,38,39,40,41,42,43,44,45,46,47,34,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,78,75,77,76,81,79,80,82,83,84,67,68,69,70,71,72,73,88,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,30,29,31,28]},"version":"4.3.4"}
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/messages/writer.ts","../../src/messages/message.ts","../../src/messages/index.ts","../../src/messages/webworker.ts","../../node_modules/@types/eslint-visitor-keys/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/base.d.ts","../../node_modules/@types/node/ts3.2/fs.d.ts","../../node_modules/@types/node/ts3.2/util.d.ts","../../node_modules/@types/node/ts3.2/globals.d.ts","../../node_modules/@types/node/ts3.2/base.d.ts","../../node_modules/@types/node/ts3.5/globals.global.d.ts","../../node_modules/@types/node/ts3.5/wasi.d.ts","../../node_modules/@types/node/ts3.5/base.d.ts","../../node_modules/@types/node/ts3.7/assert.d.ts","../../node_modules/@types/node/ts3.7/base.d.ts","../../node_modules/@types/node/ts3.7/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"ca3c1cd7464b613bf148a1422cb3201fe083e08565a02dc99eaad0d2977c16a7","affectsGlobalScope":true,"impliedFormat":1},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true,"impliedFormat":1},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true,"impliedFormat":1},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true,"impliedFormat":1},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true,"impliedFormat":1},"b8aeff6e394e47092b25a03db1c5db0339a3f2d4fa4e9b7118ea43b440068086","a062dcc0b20cee146dddc091a5bec09ac124de804d4cac0b9dc01c079abff0c1","e08964f1603ec6ddf7e9f7db5f5cc5d954d6dee304e4d9ab4be5cad61d64e59f","fe729eaf166de740549d4f03414e8edcf5c324e316a1eb20a1da3cbb1f72ad60","725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",{"version":"2dd7dbacbd70cc156185235140b7b6682c002c1ea678dd87d7a20589d4555fc0","affectsGlobalScope":true,"impliedFormat":1},"4ed9f71ddbb5753771ee391f64297078a88f7dfd1480646dcf08c31395778682","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","465150173a56b943b2f6d8918e35c89d8386ffd37aa466e486ca54db54d6cee7","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d4dd0b19ee0338dd4f1603eacb41859b9d5371bfef2b2849cb870d6fd6602bcb","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","eaa8136bb11fbea5bdaf29e06aa45a1969ddd39fbfb5fe58a01f00d7f1562cd9","e253cd3c7d10c4f600308d0528dd371d7e4165d8295b37a1f38d0ef6c0dfaf60","fb28748ff8d015f52e99daee4f454e57cec1a22141f1257c317f3630a15edeb7","9440dcf960685f7ec10856891a6cebb52a5ae8cef6a2e85daf9476dafd346cbe","5d9394b829cfd504b2fe17287aaad8ce1dcfb2a2183c962a90a85b96da2c1c90","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947","bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665","46cac76114704902baa535b30fb66a26aeaf9430f3b3ab44746e329f12e85498","ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true,"impliedFormat":1},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","406a63c7e94107394341e97dbdc3312a1ecea75571d067a69eaa213786d9f154","d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","baa711b17f67390c60eac3c70a1391b23a8e3833cb723b2d7336d4817a22455c","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","b46af749e3574b83bccc0ec829322b15e834ae90b45760eebc75a189c28c0868","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true,"impliedFormat":1},"4cef33b2997388559c39b2f98c37e8319ad61e30a1f0edc55c53913f2250bade",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true,"impliedFormat":1},"0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","255dbc5a5acef2b83b47145042aa0127ebf7fe24cd5ce6afaaaf5c8fc2c5eb96","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","64ef5112114bdd77304acb548f93777b263bbf57272776139425a58f68a10775","ecdf947a5111318568ba99f2a87b8498382d8871207f1bc6271ff3b9536a2448","2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761"],"options":{"composite":true,"declaration":true,"module":5,"noImplicitAny":true,"noImplicitThis":true,"outDir":"..","rootDir":"../../src","strictNullChecks":true,"target":2},"fileIdsList":[[46,69,75,76],[45,46,69,75,76,84,85],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76],[45,46,53,62,69,75,76],[37,45,46,53,69,75,76],[41,46,54,69,75,76],[46,62,69,75,76],[43,45,46,53,69,75,76],[45,46,69,75,76],[45,47,62,68,69,75,76],[45,46,53,62,68,69,75,76],[45,46,48,53,62,65,68,69,75,76],[45,46,48,65,68,69,75,76],[46,68,69,75,76],[43,45,46,62,69,75,76],[35,46,69,75,76],[46,67,69,75,76],[45,46,62,69,75,76],[46,60,69,71,75,76],[41,43,46,53,62,69,75,76],[46,69,74,75,76,77],[46,69,76],[34,46,69,75,76],[46,69,75],[46,69,75,76,78,79,80],[46,69,75,76,81,82],[46,69,75,76,83],[46,53,69,75,76],[46,59,69,75,76],[46,75,76],[45,46,62,68,69,71,75,76],[46,69,75,76,84],[28,29,46,69,75,76],[28,46,69,75,76]],"referencedMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"exportedModulesMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"semanticDiagnosticsPerFile":[32,33,86,87,85,35,74,36,37,38,39,40,41,42,43,44,45,46,47,34,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,78,75,77,76,81,79,80,82,83,84,67,68,69,70,71,72,73,88,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,30,29,31,28]},"version":"4.6.0-dev.20211126"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import App from
|
|
1
|
+
import App from "../app/index.js";
|
|
2
2
|
export default function (app: App): void;
|
package/lib/modules/console.d.ts
CHANGED
package/lib/modules/console.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IN_BROWSER } from
|
|
2
|
-
import { ConsoleLog } from
|
|
1
|
+
import { IN_BROWSER } from "../utils.js";
|
|
2
|
+
import { ConsoleLog } from "../messages/index.js";
|
|
3
3
|
const printError = IN_BROWSER && 'InstallTrigger' in window // detect Firefox
|
|
4
4
|
? (e) => e.message + '\n' + e.stack
|
|
5
5
|
: (e) => e.stack || e.message;
|
|
@@ -112,7 +112,7 @@ export default function (app, opts) {
|
|
|
112
112
|
};
|
|
113
113
|
});
|
|
114
114
|
patchConsole(window.console);
|
|
115
|
-
app.nodes.attachNodeCallback(node => {
|
|
115
|
+
app.nodes.attachNodeCallback(app.safe(node => {
|
|
116
116
|
if (node instanceof HTMLIFrameElement) {
|
|
117
117
|
let context = node.contentWindow;
|
|
118
118
|
if (context) {
|
|
@@ -125,5 +125,5 @@ export default function (app, opts) {
|
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
});
|
|
128
|
+
}));
|
|
129
129
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import App from
|
|
1
|
+
import App from "../app/index.js";
|
|
2
2
|
export default function (app: App | null): void;
|
package/lib/modules/cssrules.js
CHANGED
package/lib/modules/exception.js
CHANGED
package/lib/modules/img.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import App from
|
|
1
|
+
import App from "../app/index.js";
|
|
2
2
|
export default function (app: App): void;
|
package/lib/modules/img.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { timestamp, isURL } from
|
|
2
|
-
import { ResourceTiming, SetNodeAttributeURLBased } from
|
|
1
|
+
import { timestamp, isURL } from "../utils.js";
|
|
2
|
+
import { ResourceTiming, SetNodeAttributeURLBased } from "../messages/index.js";
|
|
3
3
|
export default function (app) {
|
|
4
4
|
const sendImgSrc = app.safe(function () {
|
|
5
5
|
const id = app.nodes.getID(this);
|