@openreplay/tracker 3.5.16 → 3.5.17-beta.0
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/.eslintignore +8 -0
- package/cjs/app/guards.js +1 -2
- package/cjs/app/index.d.ts +14 -14
- package/cjs/app/index.js +51 -44
- package/cjs/app/logger.js +6 -3
- package/cjs/app/observer/iframe_observer.d.ts +1 -1
- package/cjs/app/observer/iframe_observer.js +1 -1
- package/cjs/app/observer/observer.d.ts +1 -1
- package/cjs/app/observer/observer.js +12 -15
- package/cjs/app/observer/shadow_root_observer.d.ts +1 -1
- package/cjs/app/observer/shadow_root_observer.js +1 -1
- package/cjs/app/observer/top_observer.d.ts +2 -2
- package/cjs/app/observer/top_observer.js +12 -11
- package/cjs/app/sanitizer.d.ts +1 -1
- package/cjs/app/sanitizer.js +5 -5
- package/cjs/app/session.d.ts +1 -1
- package/cjs/app/session.js +4 -3
- package/cjs/app/ticker.d.ts +1 -1
- package/cjs/common/webworker.d.ts +3 -3
- package/cjs/index.d.ts +8 -8
- package/cjs/index.js +27 -27
- package/cjs/modules/connection.d.ts +1 -1
- package/cjs/modules/console.d.ts +1 -1
- package/cjs/modules/console.js +5 -5
- package/cjs/modules/cssrules.d.ts +1 -1
- package/cjs/modules/cssrules.js +3 -3
- package/cjs/modules/exception.d.ts +2 -2
- package/cjs/modules/exception.js +7 -6
- package/cjs/modules/img.d.ts +1 -1
- package/cjs/modules/img.js +15 -12
- package/cjs/modules/input.d.ts +1 -1
- package/cjs/modules/input.js +15 -15
- package/cjs/modules/longtasks.d.ts +1 -1
- package/cjs/modules/longtasks.js +13 -5
- package/cjs/modules/mouse.d.ts +1 -1
- package/cjs/modules/mouse.js +10 -12
- package/cjs/modules/performance.d.ts +1 -1
- package/cjs/modules/scroll.d.ts +1 -1
- package/cjs/modules/timing.d.ts +1 -1
- package/cjs/modules/timing.js +12 -24
- package/cjs/modules/viewport.d.ts +1 -1
- package/cjs/utils.js +7 -7
- package/cjs/vendors/finder/finder.js +53 -48
- package/lib/app/guards.js +1 -2
- package/lib/app/index.d.ts +14 -14
- package/lib/app/index.js +60 -53
- package/lib/app/logger.js +6 -3
- package/lib/app/observer/iframe_observer.d.ts +1 -1
- package/lib/app/observer/iframe_observer.js +3 -3
- package/lib/app/observer/observer.d.ts +1 -1
- package/lib/app/observer/observer.js +14 -17
- package/lib/app/observer/shadow_root_observer.d.ts +1 -1
- package/lib/app/observer/shadow_root_observer.js +3 -3
- package/lib/app/observer/top_observer.d.ts +2 -2
- package/lib/app/observer/top_observer.js +17 -16
- package/lib/app/sanitizer.d.ts +1 -1
- package/lib/app/sanitizer.js +7 -7
- package/lib/app/session.d.ts +1 -1
- package/lib/app/session.js +4 -3
- package/lib/app/ticker.d.ts +1 -1
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/common/webworker.d.ts +3 -3
- package/lib/index.d.ts +8 -8
- package/lib/index.js +42 -42
- 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 +8 -8
- package/lib/modules/cssrules.d.ts +1 -1
- package/lib/modules/cssrules.js +5 -5
- package/lib/modules/exception.d.ts +2 -2
- package/lib/modules/exception.js +8 -7
- package/lib/modules/img.d.ts +1 -1
- package/lib/modules/img.js +18 -15
- package/lib/modules/input.d.ts +1 -1
- package/lib/modules/input.js +18 -18
- package/lib/modules/longtasks.d.ts +1 -1
- package/lib/modules/longtasks.js +14 -6
- package/lib/modules/mouse.d.ts +1 -1
- package/lib/modules/mouse.js +14 -16
- 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 +2 -2
- package/lib/modules/timing.d.ts +1 -1
- package/lib/modules/timing.js +15 -27
- package/lib/modules/viewport.d.ts +1 -1
- package/lib/modules/viewport.js +1 -1
- package/lib/utils.js +7 -7
- package/lib/vendors/finder/finder.js +53 -48
- package/package.json +27 -10
package/lib/app/sanitizer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { stars, hasOpenreplayAttribute } from
|
|
2
|
-
import { isElementNode } from
|
|
1
|
+
import { stars, hasOpenreplayAttribute } from '../utils.js';
|
|
2
|
+
import { isElementNode } from './guards.js';
|
|
3
3
|
export default class Sanitizer {
|
|
4
4
|
constructor(app, options) {
|
|
5
5
|
this.app = app;
|
|
@@ -12,20 +12,20 @@ export default class Sanitizer {
|
|
|
12
12
|
}
|
|
13
13
|
handleNode(id, parentID, node) {
|
|
14
14
|
if (this.masked.has(parentID) ||
|
|
15
|
-
(isElementNode(node) &&
|
|
16
|
-
hasOpenreplayAttribute(node, 'masked'))) {
|
|
15
|
+
(isElementNode(node) && hasOpenreplayAttribute(node, 'masked'))) {
|
|
17
16
|
this.masked.add(id);
|
|
18
17
|
}
|
|
19
18
|
if (this.maskedContainers.has(parentID) ||
|
|
20
|
-
(isElementNode(node) &&
|
|
21
|
-
hasOpenreplayAttribute(node, 'htmlmasked'))) {
|
|
19
|
+
(isElementNode(node) && hasOpenreplayAttribute(node, 'htmlmasked'))) {
|
|
22
20
|
this.maskedContainers.add(id);
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
sanitize(id, data) {
|
|
26
24
|
if (this.masked.has(id)) {
|
|
27
25
|
// TODO: is it the best place to put trim() ? Might trimmed spaces be considered in layout in certain cases?
|
|
28
|
-
return data
|
|
26
|
+
return data
|
|
27
|
+
.trim()
|
|
28
|
+
.replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, '█');
|
|
29
29
|
}
|
|
30
30
|
if (this.options.obscureTextNumbers) {
|
|
31
31
|
data = data.replace(/\d/g, '0');
|
package/lib/app/session.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export default class Session {
|
|
|
8
8
|
private metadata;
|
|
9
9
|
private userID;
|
|
10
10
|
private sessionID;
|
|
11
|
-
private callbacks;
|
|
11
|
+
private readonly callbacks;
|
|
12
12
|
attachUpdateCallback(cb: OnUpdateCallback): void;
|
|
13
13
|
private handleUpdate;
|
|
14
14
|
update(newInfo: Partial<SessionInfo>): void;
|
package/lib/app/session.js
CHANGED
|
@@ -15,14 +15,15 @@ export default class Session {
|
|
|
15
15
|
if (newInfo.sessionID == null) {
|
|
16
16
|
delete newInfo.sessionID;
|
|
17
17
|
}
|
|
18
|
-
this.callbacks.forEach(cb => cb(newInfo));
|
|
18
|
+
this.callbacks.forEach((cb) => cb(newInfo));
|
|
19
19
|
}
|
|
20
20
|
update(newInfo) {
|
|
21
|
-
if (newInfo.userID !== undefined) {
|
|
21
|
+
if (newInfo.userID !== undefined) {
|
|
22
|
+
// TODO clear nullable/undefinable types
|
|
22
23
|
this.userID = newInfo.userID;
|
|
23
24
|
}
|
|
24
25
|
if (newInfo.metadata !== undefined) {
|
|
25
|
-
Object.entries(newInfo.metadata).forEach(([k, v]) => this.metadata[k] = v);
|
|
26
|
+
Object.entries(newInfo.metadata).forEach(([k, v]) => (this.metadata[k] = v));
|
|
26
27
|
}
|
|
27
28
|
if (newInfo.sessionID !== undefined) {
|
|
28
29
|
this.sessionID = newInfo.sessionID;
|
package/lib/app/ticker.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.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.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.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/common/types.ts","../../src/common/messages.ts","../../src/common/webworker.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.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/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.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/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.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/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/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","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"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":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"ca06fa264234f5895ebfe13ec1f578ee1c18a0d02219a54c3cdad296686251cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true,"impliedFormat":1},"8f2ce078b846e85a1e1d9608ee441d1b01babad7059966dafb3fb203c0be58b3","57f6a26ef13806a81f4fd41f0afc9745f8133850172d593bd8a873f8ac8ef8e1","f7bf98d3ccfb7f6ef1048b3e7a947df1494dd7a5ee1013745450814613920c51","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true,"impliedFormat":1},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true,"impliedFormat":1},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","34ec1daf3566f26c43dbab380af0de1aac29166e57e4f9ef379a2f154e0cb290","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true,"impliedFormat":1},"2f60ac046e587e917d739f1edc77540eb0ec34f83090dae4ebd5f96c1c9578d4","a9b6b0f7b1e30359283b131ba6d1c51ee2d3601a2f12e1623141e6a1a60c92a5","aeee0090b38de0dd47ca9a79ad5c2d156e3e09d92306719b0b45a3e96098e564","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","09416dd69576b03a3f485adf329a02f043e4a481e060ef5b208194e488d31fd9","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true,"impliedFormat":1},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","4275d5f964e7fc7afc18538e26b3748c207dd772998346d17f409749aa1f3a63",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true,"impliedFormat":1},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","556bf5c36deb62cffa1bf697c1789fe008ec82db0273025001db66732714e9d9","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true,"impliedFormat":1},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","653968fc1b35c5eb3d273d36fac1c1dc66f9537edf28f33485b8776bd956e23d",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true,"impliedFormat":1},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true,"impliedFormat":1},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},"64d5585e08ad1ab194b18bf4e851f22a626eae33ac7312ca4ba90bb7ea7daf64","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede"],"options":{"composite":true,"declaration":true,"module":5,"noImplicitAny":true,"noImplicitThis":true,"outDir":"..","rootDir":"../../src","strictNullChecks":true,"target":2},"fileIdsList":[[87],[58,59,87,94,95],[43,87],[46,87],[47,52,87],[48,58,59,66,75,86,87],[48,49,58,66,87],[50,87],[51,52,59,67,87],[52,75,83,87],[53,55,58,66,87],[54,87],[55,56,87],[57,58,87],[58,87],[58,59,60,75,86,87],[58,59,60,75,78,87],[87,91],[61,66,75,86,87],[58,59,61,62,66,75,83,86,87],[61,63,75,83,86,87],[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,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],[58,64,87],[65,86,87],[55,58,66,75,87],[67,87],[68,87],[46,69,87],[70,85,87,91],[71,87],[72,87],[58,73,87],[73,74,87,89],[58,75,76,77,78,87],[75,77,87],[75,76,87],[78,87],[79,87],[58,81,82,87],[81,82,87],[52,66,75,83,87],[84,87],[66,85,87],[47,61,72,86,87],[52,87],[75,87,88],[87,89],[87,90],[47,52,58,60,69,75,86,87,89,91],[75,87,92],[87,94],[39,87]],"referencedMap":[[42,1],[96,2],[97,1],[95,1],[43,3],[44,3],[46,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,13],[57,14],[58,15],[59,16],[60,17],[45,18],[93,1],[61,19],[62,20],[63,21],[94,22],[64,23],[65,24],[66,25],[67,26],[68,27],[69,28],[70,29],[71,30],[72,31],[73,32],[74,33],[75,34],[77,35],[76,36],[78,37],[79,38],[80,1],[81,39],[82,40],[83,41],[84,42],[85,43],[86,44],[87,45],[88,46],[89,47],[90,48],[91,49],[92,50],[98,51],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[7,1],[37,1],[33,1],[34,1],[35,1],[36,1],[1,1],[38,1],[40,52],[39,1],[41,1]],"exportedModulesMap":[[42,1],[96,2],[97,1],[95,1],[43,3],[44,3],[46,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,13],[57,14],[58,15],[59,16],[60,17],[45,18],[93,1],[61,19],[62,20],[63,21],[94,22],[64,23],[65,24],[66,25],[67,26],[68,27],[69,28],[70,29],[71,30],[72,31],[73,32],[74,33],[75,34],[77,35],[76,36],[78,37],[79,38],[80,1],[81,39],[82,40],[83,41],[84,42],[85,43],[86,44],[87,45],[88,46],[89,47],[90,48],[91,49],[92,50],[98,51],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[7,1],[37,1],[33,1],[34,1],[35,1],[36,1],[1,1],[38,1],[40,52],[39,1],[41,1]],"semanticDiagnosticsPerFile":[42,96,97,95,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,45,93,61,62,63,94,64,65,66,67,68,69,70,71,72,73,74,75,77,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,98,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,6,29,30,31,32,7,37,33,34,35,36,1,38,40,39,41]},"version":"4.6.0-dev.20211126"}
|
|
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.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.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.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/common/types.ts","../../src/common/messages.ts","../../src/common/webworker.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.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/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.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/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.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/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/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","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"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":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"ca06fa264234f5895ebfe13ec1f578ee1c18a0d02219a54c3cdad296686251cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true,"impliedFormat":1},"8f2ce078b846e85a1e1d9608ee441d1b01babad7059966dafb3fb203c0be58b3","57f6a26ef13806a81f4fd41f0afc9745f8133850172d593bd8a873f8ac8ef8e1","b9a83730257e24e49eebe2f67a5287cd472b1b2f6acea9ae349360cf43c14c4a","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true,"impliedFormat":1},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true,"impliedFormat":1},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","025fc13211ed47d2798269017af3ec869122a050d5431a6ad3c1997900e65c58","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true,"impliedFormat":1},"2f60ac046e587e917d739f1edc77540eb0ec34f83090dae4ebd5f96c1c9578d4","a9b6b0f7b1e30359283b131ba6d1c51ee2d3601a2f12e1623141e6a1a60c92a5","aeee0090b38de0dd47ca9a79ad5c2d156e3e09d92306719b0b45a3e96098e564","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","09416dd69576b03a3f485adf329a02f043e4a481e060ef5b208194e488d31fd9","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true,"impliedFormat":1},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","4275d5f964e7fc7afc18538e26b3748c207dd772998346d17f409749aa1f3a63",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true,"impliedFormat":1},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","12a70315c8281e46d65696086dd25827408e967b305a22276ae2779fe519e0fe","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true,"impliedFormat":1},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","29d613c3964ea75b2b4e0d17098245c34529282e9cc72b7e4eeb2a7b12c27cb7",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true,"impliedFormat":1},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true,"impliedFormat":1},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},"82fc37849846a3a0264047621d5beb6ce2ddeb2f83bdee2c79523af3c3282d97","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede"],"options":{"composite":true,"declaration":true,"module":5,"noImplicitAny":true,"noImplicitThis":true,"outDir":"..","rootDir":"../../src","strictNullChecks":true,"target":2},"fileIdsList":[[87],[58,59,87,94,95],[43,87],[46,87],[47,52,87],[48,58,59,66,75,86,87],[48,49,58,66,87],[50,87],[51,52,59,67,87],[52,75,83,87],[53,55,58,66,87],[54,87],[55,56,87],[57,58,87],[58,87],[58,59,60,75,86,87],[58,59,60,75,78,87],[87,91],[61,66,75,86,87],[58,59,61,62,66,75,83,86,87],[61,63,75,83,86,87],[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,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],[58,64,87],[65,86,87],[55,58,66,75,87],[67,87],[68,87],[46,69,87],[70,85,87,91],[71,87],[72,87],[58,73,87],[73,74,87,89],[58,75,76,77,78,87],[75,77,87],[75,76,87],[78,87],[79,87],[58,81,82,87],[81,82,87],[52,66,75,83,87],[84,87],[66,85,87],[47,61,72,86,87],[52,87],[75,87,88],[87,89],[87,90],[47,52,58,60,69,75,86,87,89,91],[75,87,92],[87,94],[39,87]],"referencedMap":[[42,1],[96,2],[97,1],[95,1],[43,3],[44,3],[46,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,13],[57,14],[58,15],[59,16],[60,17],[45,18],[93,1],[61,19],[62,20],[63,21],[94,22],[64,23],[65,24],[66,25],[67,26],[68,27],[69,28],[70,29],[71,30],[72,31],[73,32],[74,33],[75,34],[77,35],[76,36],[78,37],[79,38],[80,1],[81,39],[82,40],[83,41],[84,42],[85,43],[86,44],[87,45],[88,46],[89,47],[90,48],[91,49],[92,50],[98,51],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[7,1],[37,1],[33,1],[34,1],[35,1],[36,1],[1,1],[38,1],[40,52],[39,1],[41,1]],"exportedModulesMap":[[42,1],[96,2],[97,1],[95,1],[43,3],[44,3],[46,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,13],[57,14],[58,15],[59,16],[60,17],[45,18],[93,1],[61,19],[62,20],[63,21],[94,22],[64,23],[65,24],[66,25],[67,26],[68,27],[69,28],[70,29],[71,30],[72,31],[73,32],[74,33],[75,34],[77,35],[76,36],[78,37],[79,38],[80,1],[81,39],[82,40],[83,41],[84,42],[85,43],[86,44],[87,45],[88,46],[89,47],[90,48],[91,49],[92,50],[98,51],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[7,1],[37,1],[33,1],[34,1],[35,1],[36,1],[1,1],[38,1],[40,52],[39,1],[41,1]],"semanticDiagnosticsPerFile":[42,96,97,95,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,45,93,61,62,63,94,64,65,66,67,68,69,70,71,72,73,74,75,77,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,98,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,6,29,30,31,32,7,37,33,34,35,36,1,38,40,39,41]},"version":"4.6.0-dev.20211126"}
|
|
@@ -3,17 +3,17 @@ export interface Options {
|
|
|
3
3
|
connAttemptGap?: number;
|
|
4
4
|
}
|
|
5
5
|
declare type Start = {
|
|
6
|
-
type:
|
|
6
|
+
type: 'start';
|
|
7
7
|
ingestPoint: string;
|
|
8
8
|
pageNo: number;
|
|
9
9
|
timestamp: number;
|
|
10
10
|
} & Options;
|
|
11
11
|
declare type Auth = {
|
|
12
|
-
type:
|
|
12
|
+
type: 'auth';
|
|
13
13
|
token: string;
|
|
14
14
|
beaconSizeLimit?: number;
|
|
15
15
|
};
|
|
16
|
-
export declare type WorkerMessageData = null |
|
|
16
|
+
export declare type WorkerMessageData = null | 'stop' | Start | Auth | Array<{
|
|
17
17
|
_id: number;
|
|
18
18
|
}>;
|
|
19
19
|
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import App from
|
|
1
|
+
import App from './app/index.js';
|
|
2
2
|
export { default as App } from './app/index.js';
|
|
3
|
-
import * as _Messages from
|
|
3
|
+
import * as _Messages from './common/messages.js';
|
|
4
4
|
export declare const Messages: typeof _Messages;
|
|
5
|
-
import type { Options as AppOptions } from
|
|
6
|
-
import type { Options as ConsoleOptions } from
|
|
7
|
-
import type { Options as ExceptionOptions } from
|
|
8
|
-
import type { Options as InputOptions } from
|
|
9
|
-
import type { Options as PerformanceOptions } from
|
|
10
|
-
import type { Options as TimingOptions } from
|
|
5
|
+
import type { Options as AppOptions } from './app/index.js';
|
|
6
|
+
import type { Options as ConsoleOptions } from './modules/console.js';
|
|
7
|
+
import type { Options as ExceptionOptions } from './modules/exception.js';
|
|
8
|
+
import type { Options as InputOptions } from './modules/input.js';
|
|
9
|
+
import type { Options as PerformanceOptions } from './modules/performance.js';
|
|
10
|
+
import type { Options as TimingOptions } from './modules/timing.js';
|
|
11
11
|
import type { StartOptions } from './app/index.js';
|
|
12
12
|
import type { StartPromiseReturn } from './app/index.js';
|
|
13
13
|
export declare type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
|
package/lib/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import App, { DEFAULT_INGEST_POINT } from
|
|
1
|
+
import App, { DEFAULT_INGEST_POINT } from './app/index.js';
|
|
2
2
|
export { default as App } from './app/index.js';
|
|
3
|
-
import { UserAnonymousID, RawCustomEvent, CustomIssue } from
|
|
4
|
-
import * as _Messages from
|
|
3
|
+
import { UserAnonymousID, RawCustomEvent, CustomIssue, } from './common/messages.js';
|
|
4
|
+
import * as _Messages from './common/messages.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 CSSRules from
|
|
17
|
-
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 CSSRules from './modules/cssrules.js';
|
|
17
|
+
import { IN_BROWSER, deprecationWarn, DOCS_HOST } from './utils.js';
|
|
18
18
|
const DOCS_SETUP = '/installation/setup-or';
|
|
19
19
|
function processOptions(obj) {
|
|
20
20
|
if (obj == null) {
|
|
@@ -23,17 +23,18 @@ function processOptions(obj) {
|
|
|
23
23
|
}
|
|
24
24
|
if (typeof obj.projectKey !== 'string') {
|
|
25
25
|
if (typeof obj.projectKey !== 'number') {
|
|
26
|
-
if (typeof obj.projectID !== 'number') {
|
|
26
|
+
if (typeof obj.projectID !== 'number') {
|
|
27
|
+
// Back compatability
|
|
27
28
|
console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${DOCS_HOST}${DOCS_SETUP} for more information.`);
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
31
|
else {
|
|
31
32
|
obj.projectKey = obj.projectID.toString();
|
|
32
|
-
deprecationWarn(
|
|
33
|
+
deprecationWarn('`projectID` option', '`projectKey` option', DOCS_SETUP);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
console.warn(
|
|
37
|
+
console.warn('OpenReplay: projectKey is expected to have a string type.');
|
|
37
38
|
obj.projectKey = obj.projectKey.toString();
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -65,28 +66,29 @@ export default class API {
|
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
68
|
if (window.__OPENREPLAY__) {
|
|
68
|
-
console.error(
|
|
69
|
+
console.error('OpenReplay: one tracker instance has been initialised already');
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
72
|
if (!options.__DISABLE_SECURE_MODE && location.protocol !== 'https:') {
|
|
72
|
-
console.error(
|
|
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.');
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
76
|
const doNotTrack = options.respectDoNotTrack &&
|
|
76
|
-
(navigator.doNotTrack == '1'
|
|
77
|
+
(navigator.doNotTrack == '1' ||
|
|
77
78
|
// @ts-ignore
|
|
78
|
-
|
|
79
|
-
const app = this.app =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
window.doNotTrack == '1');
|
|
80
|
+
const app = (this.app =
|
|
81
|
+
doNotTrack ||
|
|
82
|
+
!('Map' in window) ||
|
|
83
|
+
!('Set' in window) ||
|
|
84
|
+
!('MutationObserver' in window) ||
|
|
85
|
+
!('performance' in window) ||
|
|
86
|
+
!('timing' in performance) ||
|
|
87
|
+
!('startsWith' in String.prototype) ||
|
|
88
|
+
!('Blob' in window) ||
|
|
89
|
+
!('Worker' in window)
|
|
90
|
+
? null
|
|
91
|
+
: new App(options.projectKey, options.sessionToken, options));
|
|
90
92
|
if (app !== null) {
|
|
91
93
|
Viewport(app);
|
|
92
94
|
CSSRules(app);
|
|
@@ -119,7 +121,7 @@ export default class API {
|
|
|
119
121
|
console.log("OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1.");
|
|
120
122
|
const req = new XMLHttpRequest();
|
|
121
123
|
const orig = options.ingestPoint || DEFAULT_INGEST_POINT;
|
|
122
|
-
req.open(
|
|
124
|
+
req.open('POST', orig + '/v1/web/not-started');
|
|
123
125
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
124
126
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
125
127
|
req.send(JSON.stringify({
|
|
@@ -142,7 +144,7 @@ export default class API {
|
|
|
142
144
|
start(startOpts) {
|
|
143
145
|
if (!IN_BROWSER) {
|
|
144
146
|
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}`);
|
|
145
|
-
return Promise.reject(
|
|
147
|
+
return Promise.reject('Trying to start not in browser.');
|
|
146
148
|
}
|
|
147
149
|
if (this.app === null) {
|
|
148
150
|
return Promise.reject("Browser doesn't support required api, or doNotTrack is active.");
|
|
@@ -169,7 +171,7 @@ export default class API {
|
|
|
169
171
|
return this.app.getSessionID();
|
|
170
172
|
}
|
|
171
173
|
sessionID() {
|
|
172
|
-
deprecationWarn("'sessionID' method", "'getSessionID' method",
|
|
174
|
+
deprecationWarn("'sessionID' method", "'getSessionID' method", '/');
|
|
173
175
|
return this.getSessionID();
|
|
174
176
|
}
|
|
175
177
|
setUserID(id) {
|
|
@@ -178,7 +180,7 @@ export default class API {
|
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
userID(id) {
|
|
181
|
-
deprecationWarn("'userID' method", "'setUserID' method",
|
|
183
|
+
deprecationWarn("'userID' method", "'setUserID' method", '/');
|
|
182
184
|
this.setUserID(id);
|
|
183
185
|
}
|
|
184
186
|
setUserAnonymousID(id) {
|
|
@@ -187,18 +189,16 @@ export default class API {
|
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
userAnonymousID(id) {
|
|
190
|
-
deprecationWarn("'userAnonymousID' method", "'setUserAnonymousID' method",
|
|
192
|
+
deprecationWarn("'userAnonymousID' method", "'setUserAnonymousID' method", '/');
|
|
191
193
|
this.setUserAnonymousID(id);
|
|
192
194
|
}
|
|
193
195
|
setMetadata(key, value) {
|
|
194
|
-
if (typeof key === 'string' &&
|
|
195
|
-
typeof value === 'string' &&
|
|
196
|
-
this.app !== null) {
|
|
196
|
+
if (typeof key === 'string' && typeof value === 'string' && this.app !== null) {
|
|
197
197
|
this.app.session.setMetadata(key, value);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
metadata(key, value) {
|
|
201
|
-
deprecationWarn("'metadata' method", "'setMetadata' method",
|
|
201
|
+
deprecationWarn("'metadata' method", "'setMetadata' method", '/');
|
|
202
202
|
this.setMetadata(key, value);
|
|
203
203
|
}
|
|
204
204
|
event(key, payload, issue = false) {
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import { hasTag } from
|
|
2
|
-
import { IN_BROWSER } from
|
|
3
|
-
import { ConsoleLog } from
|
|
1
|
+
import { hasTag } from '../app/guards.js';
|
|
2
|
+
import { IN_BROWSER } from '../utils.js';
|
|
3
|
+
import { ConsoleLog } from '../common/messages.js';
|
|
4
4
|
const printError = IN_BROWSER && 'InstallTrigger' in window // detect Firefox
|
|
5
5
|
? (e) => e.message + '\n' + e.stack
|
|
6
6
|
: (e) => e.stack || e.message;
|
|
@@ -87,8 +87,7 @@ export default function (app, opts) {
|
|
|
87
87
|
consoleMethods,
|
|
88
88
|
consoleThrottling: 30,
|
|
89
89
|
}, opts);
|
|
90
|
-
if (!Array.isArray(options.consoleMethods) ||
|
|
91
|
-
options.consoleMethods.length === 0) {
|
|
90
|
+
if (!Array.isArray(options.consoleMethods) || options.consoleMethods.length === 0) {
|
|
92
91
|
return;
|
|
93
92
|
}
|
|
94
93
|
const sendConsoleLog = app.safe((level, args) => app.send(new ConsoleLog(level, printf(args))));
|
|
@@ -113,13 +112,14 @@ export default function (app, opts) {
|
|
|
113
112
|
};
|
|
114
113
|
});
|
|
115
114
|
patchConsole(window.console);
|
|
116
|
-
app.nodes.attachNodeCallback(app.safe(node => {
|
|
117
|
-
if (hasTag(node,
|
|
115
|
+
app.nodes.attachNodeCallback(app.safe((node) => {
|
|
116
|
+
if (hasTag(node, 'IFRAME')) {
|
|
117
|
+
// TODO: newContextCallback
|
|
118
118
|
let context = node.contentWindow;
|
|
119
119
|
if (context) {
|
|
120
120
|
patchConsole(context.console);
|
|
121
121
|
}
|
|
122
|
-
app.attachEventListener(node,
|
|
122
|
+
app.attachEventListener(node, 'load', () => {
|
|
123
123
|
if (node.contentWindow !== context) {
|
|
124
124
|
context = node.contentWindow;
|
|
125
125
|
patchConsole(context.console);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type App from
|
|
1
|
+
import type App from '../app/index.js';
|
|
2
2
|
export default function (app: App | null): void;
|
package/lib/modules/cssrules.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CSSInsertRuleURLBased, CSSDeleteRule, TechnicalInfo } from
|
|
2
|
-
import { hasTag } from
|
|
1
|
+
import { CSSInsertRuleURLBased, CSSDeleteRule, TechnicalInfo } from '../common/messages.js';
|
|
2
|
+
import { hasTag } from '../app/guards.js';
|
|
3
3
|
export default function (app) {
|
|
4
4
|
if (app === null) {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
if (!window.CSSStyleSheet) {
|
|
8
|
-
app.send(new TechnicalInfo(
|
|
8
|
+
app.send(new TechnicalInfo('no_stylesheet_prototype_in_window', ''));
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
const processOperation = app.safe((stylesheet, index, rule) => {
|
|
@@ -14,7 +14,7 @@ export default function (app) {
|
|
|
14
14
|
: (nodeID) => app.send(new CSSDeleteRule(nodeID, index));
|
|
15
15
|
// TODO: Extend messages to maintain nested rules (CSSGroupingRule prototype, as well as CSSKeyframesRule)
|
|
16
16
|
if (stylesheet.ownerNode == null) {
|
|
17
|
-
throw new Error(
|
|
17
|
+
throw new Error('Owner Node not found');
|
|
18
18
|
}
|
|
19
19
|
const nodeID = app.nodes.getID(stylesheet.ownerNode);
|
|
20
20
|
if (nodeID !== undefined) {
|
|
@@ -31,7 +31,7 @@ export default function (app) {
|
|
|
31
31
|
return deleteRule.call(this, index);
|
|
32
32
|
};
|
|
33
33
|
app.nodes.attachNodeCallback((node) => {
|
|
34
|
-
if (!hasTag(node,
|
|
34
|
+
if (!hasTag(node, 'STYLE') || !node.sheet) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
if (node.textContent !== null && node.textContent.trim().length > 0) {
|
package/lib/modules/exception.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { JSException } from
|
|
1
|
+
import { JSException } from '../common/messages.js';
|
|
2
2
|
import ErrorStackParser from 'error-stack-parser';
|
|
3
3
|
function getDefaultStack(e) {
|
|
4
|
-
return [
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
5
6
|
columnNumber: e.colno,
|
|
6
7
|
lineNumber: e.lineno,
|
|
7
8
|
fileName: e.filename,
|
|
8
|
-
functionName:
|
|
9
|
-
source:
|
|
10
|
-
}
|
|
9
|
+
functionName: '',
|
|
10
|
+
source: '',
|
|
11
|
+
},
|
|
12
|
+
];
|
|
11
13
|
}
|
|
12
14
|
export function getExceptionMessage(error, fallbackStack) {
|
|
13
15
|
let stack = fallbackStack;
|
|
14
16
|
try {
|
|
15
17
|
stack = ErrorStackParser.parse(error);
|
|
16
18
|
}
|
|
17
|
-
catch (e) {
|
|
18
|
-
}
|
|
19
|
+
catch (e) { }
|
|
19
20
|
return new JSException(error.name, error.message, JSON.stringify(stack));
|
|
20
21
|
}
|
|
21
22
|
export function getExceptionMessageFromEvent(e) {
|
package/lib/modules/img.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type App from
|
|
1
|
+
import type App from '../app/index.js';
|
|
2
2
|
export default function (app: App): void;
|
package/lib/modules/img.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { timestamp, isURL } from
|
|
2
|
-
import { ResourceTiming, SetNodeAttributeURLBased, SetNodeAttribute } from
|
|
3
|
-
import { hasTag } from
|
|
1
|
+
import { timestamp, isURL } from '../utils.js';
|
|
2
|
+
import { ResourceTiming, SetNodeAttributeURLBased, SetNodeAttribute, } from '../common/messages.js';
|
|
3
|
+
import { hasTag } from '../app/guards.js';
|
|
4
4
|
function resolveURL(url, location = document.location) {
|
|
5
5
|
url = url.trim();
|
|
6
6
|
if (url.startsWith('/')) {
|
|
@@ -16,16 +16,16 @@ function resolveURL(url, location = document.location) {
|
|
|
16
16
|
return location.origin + location.pathname + url;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
const PLACEHOLDER_SRC =
|
|
19
|
+
const PLACEHOLDER_SRC = 'https://static.openreplay.com/tracker/placeholder.jpeg';
|
|
20
20
|
export default function (app) {
|
|
21
21
|
function sendPlaceholder(id, node) {
|
|
22
|
-
app.send(new SetNodeAttribute(id,
|
|
22
|
+
app.send(new SetNodeAttribute(id, 'src', PLACEHOLDER_SRC));
|
|
23
23
|
const { width, height } = node.getBoundingClientRect();
|
|
24
|
-
if (!node.hasAttribute(
|
|
25
|
-
app.send(new SetNodeAttribute(id,
|
|
24
|
+
if (!node.hasAttribute('width')) {
|
|
25
|
+
app.send(new SetNodeAttribute(id, 'width', String(width)));
|
|
26
26
|
}
|
|
27
|
-
if (!node.hasAttribute(
|
|
28
|
-
app.send(new SetNodeAttribute(id,
|
|
27
|
+
if (!node.hasAttribute('height')) {
|
|
28
|
+
app.send(new SetNodeAttribute(id, 'height', String(height)));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
const sendImgSrc = app.safe(function () {
|
|
@@ -49,24 +49,27 @@ export default function (app) {
|
|
|
49
49
|
else {
|
|
50
50
|
app.send(new SetNodeAttribute(id, 'src', resolvedSrc));
|
|
51
51
|
if (srcset) {
|
|
52
|
-
const resolvedSrcset = srcset
|
|
52
|
+
const resolvedSrcset = srcset
|
|
53
|
+
.split(',')
|
|
54
|
+
.map((str) => resolveURL(str))
|
|
55
|
+
.join(',');
|
|
53
56
|
app.send(new SetNodeAttribute(id, 'srcset', resolvedSrcset));
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
});
|
|
57
60
|
const observer = new MutationObserver((mutations) => {
|
|
58
61
|
for (const mutation of mutations) {
|
|
59
|
-
if (mutation.type ===
|
|
62
|
+
if (mutation.type === 'attributes') {
|
|
60
63
|
const target = mutation.target;
|
|
61
64
|
const id = app.nodes.getID(target);
|
|
62
65
|
if (id === undefined) {
|
|
63
66
|
return;
|
|
64
67
|
}
|
|
65
|
-
if (mutation.attributeName ===
|
|
68
|
+
if (mutation.attributeName === 'src') {
|
|
66
69
|
const src = target.src;
|
|
67
70
|
app.send(new SetNodeAttributeURLBased(id, 'src', src, app.getBaseHref()));
|
|
68
71
|
}
|
|
69
|
-
if (mutation.attributeName ===
|
|
72
|
+
if (mutation.attributeName === 'srcset') {
|
|
70
73
|
const srcset = target.srcset;
|
|
71
74
|
app.send(new SetNodeAttribute(id, 'srcset', srcset));
|
|
72
75
|
}
|
|
@@ -74,12 +77,12 @@ export default function (app) {
|
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
79
|
app.nodes.attachNodeCallback((node) => {
|
|
77
|
-
if (!hasTag(node,
|
|
80
|
+
if (!hasTag(node, 'IMG')) {
|
|
78
81
|
return;
|
|
79
82
|
}
|
|
80
83
|
app.nodes.attachElementListener('error', node, sendImgSrc);
|
|
81
84
|
app.nodes.attachElementListener('load', node, sendImgSrc);
|
|
82
85
|
sendImgSrc.call(node);
|
|
83
|
-
observer.observe(node, { attributes: true, attributeFilter: [
|
|
86
|
+
observer.observe(node, { attributes: true, attributeFilter: ['src', 'srcset'] });
|
|
84
87
|
});
|
|
85
88
|
}
|
package/lib/modules/input.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type App from
|
|
1
|
+
import type App from '../app/index.js';
|
|
2
2
|
declare type TextEditableElement = HTMLInputElement | HTMLTextAreaElement;
|
|
3
3
|
export declare function getInputLabel(node: TextEditableElement): string;
|
|
4
4
|
export declare const enum InputMode {
|