@corbado/observe 1.7.2 → 1.9.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/dist/analysis/client.mjs +1877 -0
- package/dist/analysis/config-manager.mjs +108 -0
- package/dist/analysis/config.mjs +216 -0
- package/dist/analysis/device-info-manager.mjs +168 -0
- package/dist/analysis/device.mjs +640 -0
- package/dist/analysis/handoff.mjs +7 -0
- package/dist/analysis/index.mjs +118 -0
- package/dist/analysis/logger.mjs +50 -0
- package/dist/analysis/low-events/capture-sequence.mjs +11 -0
- package/dist/analysis/low-events/ceremony-initiator.mjs +26 -0
- package/dist/analysis/low-events/form-input-binding.mjs +46 -0
- package/dist/analysis/low-events/grouped-input-tracker.mjs +248 -0
- package/dist/analysis/low-events/input-change-recorder.mjs +200 -0
- package/dist/analysis/low-events/input-tracker.mjs +302 -0
- package/dist/analysis/low-events/otp-input-binding.mjs +67 -0
- package/dist/analysis/low-events/shared-window-observer.mjs +296 -0
- package/dist/analysis/low-events/sink.mjs +0 -0
- package/dist/analysis/low-events/viewport-batcher.mjs +42 -0
- package/dist/analysis/low-events/window-tracker.mjs +40 -0
- package/dist/analysis/queue.mjs +954 -0
- package/dist/analysis/readers/device.mjs +73 -0
- package/dist/analysis/readers/input-paste.mjs +91 -0
- package/dist/analysis/readers/input.mjs +61 -0
- package/dist/analysis/readers/loader-global.mjs +15 -0
- package/dist/analysis/readers/meta.mjs +18 -0
- package/dist/analysis/readers/network.mjs +14 -0
- package/dist/analysis/readers/page.mjs +30 -0
- package/dist/analysis/readers/password-manager-dom.mjs +112 -0
- package/dist/analysis/readers/password-manager-extensions.mjs +247 -0
- package/dist/analysis/readers/private-mode.mjs +9 -0
- package/dist/analysis/readers/storage.mjs +28 -0
- package/dist/analysis/readers/web-lock.mjs +56 -0
- package/dist/analysis/readers/window-events.mjs +48 -0
- package/dist/analysis/storage/index.mjs +249 -0
- package/dist/analysis/storage/migration.mjs +56 -0
- package/dist/analysis/store/event-store.mjs +132 -0
- package/dist/analysis/transport.mjs +0 -0
- package/dist/analysis/transports/fetch.mjs +150 -0
- package/dist/analysis/types.mjs +25 -0
- package/dist/analysis/utils/appconfirmation-operation-full.mjs +19 -0
- package/dist/analysis/utils/blocked-user-agents.mjs +37 -0
- package/dist/analysis/utils/captcha-operation-full.mjs +17 -0
- package/dist/analysis/utils/email-link-continuity.mjs +50 -0
- package/dist/analysis/utils/email-link-operation-full.mjs +162 -0
- package/dist/analysis/utils/email-otp-operation-full.mjs +38 -0
- package/dist/analysis/utils/form-operation-full.mjs +80 -0
- package/dist/analysis/utils/key-operation-full.mjs +38 -0
- package/dist/analysis/utils/normalize-error.mjs +29 -0
- package/dist/analysis/utils/operation-full-provide-identifier-with-cui.mjs +46 -0
- package/dist/analysis/utils/operation-full.mjs +235 -0
- package/dist/analysis/utils/passkey-deletion-operation-full.mjs +17 -0
- package/dist/analysis/utils/passkey-enrollment-operation-full.mjs +35 -0
- package/dist/analysis/utils/passkey-login-operation-full.mjs +39 -0
- package/dist/analysis/utils/password-enrollment-operation-full.mjs +27 -0
- package/dist/analysis/utils/password-login-operation-full.mjs +65 -0
- package/dist/analysis/utils/password-manager-sampler.mjs +170 -0
- package/dist/analysis/utils/provide-data-operation-full.mjs +28 -0
- package/dist/analysis/utils/serialize-raw-error.mjs +205 -0
- package/dist/analysis/utils/sms-otp-operation-full.mjs +38 -0
- package/dist/analysis/utils/social-operation-login.mjs +17 -0
- package/dist/analysis/utils/source-path.mjs +39 -0
- package/dist/analysis/utils/sso-operation-login.mjs +37 -0
- package/dist/analysis/utils/totp-operation-full.mjs +34 -0
- package/dist/analysis/utils/trusted-device-operation-full.mjs +100 -0
- package/dist/analysis/utils/webauthn-payloads.mjs +101 -0
- package/dist/analysis/version.mjs +7 -0
- package/dist/cdn/script.global.js +4 -4
- package/dist/index.d.mts +285 -21
- package/dist/index.d.ts +285 -21
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +10 -3
- package/tools/reader-meta-text.d.mts +2 -0
- package/tools/reader-meta-text.mjs +26 -0
- package/tools/strip-reader-meta.d.mts +33 -0
- package/tools/strip-reader-meta.mjs +131 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/low-events/viewport-batcher.ts
|
|
2
|
+
var VIEWPORT_BATCH_TIMEOUT_MS = 150;
|
|
3
|
+
var createViewportBatcher = (pushLow, eventType, reserveCaptureSeq) => {
|
|
4
|
+
let active = false;
|
|
5
|
+
let captureSeq;
|
|
6
|
+
let startTimestamp = null;
|
|
7
|
+
let timeout = null;
|
|
8
|
+
const flush = () => {
|
|
9
|
+
if (timeout !== null) {
|
|
10
|
+
clearTimeout(timeout);
|
|
11
|
+
timeout = null;
|
|
12
|
+
}
|
|
13
|
+
const ts = startTimestamp;
|
|
14
|
+
active = false;
|
|
15
|
+
startTimestamp = null;
|
|
16
|
+
if (ts === null) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
pushLow({
|
|
20
|
+
...captureSeq === void 0 ? {} : { captureSeq },
|
|
21
|
+
lowType: eventType,
|
|
22
|
+
ts,
|
|
23
|
+
durationMs: Date.now() - ts
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const extend = () => {
|
|
27
|
+
if (!active) {
|
|
28
|
+
const sequence = reserveCaptureSeq?.();
|
|
29
|
+
active = true;
|
|
30
|
+
startTimestamp = Date.now();
|
|
31
|
+
captureSeq = sequence;
|
|
32
|
+
}
|
|
33
|
+
if (timeout !== null) {
|
|
34
|
+
clearTimeout(timeout);
|
|
35
|
+
}
|
|
36
|
+
timeout = setTimeout(flush, VIEWPORT_BATCH_TIMEOUT_MS);
|
|
37
|
+
};
|
|
38
|
+
return { extend, flush };
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
createViewportBatcher
|
|
42
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/low-events/window-tracker.ts
|
|
2
|
+
var LowEventWindowTracker = class {
|
|
3
|
+
constructor(logger, sink) {
|
|
4
|
+
this.logger = logger;
|
|
5
|
+
this.sink = sink;
|
|
6
|
+
}
|
|
7
|
+
lease;
|
|
8
|
+
destroyed = false;
|
|
9
|
+
arm(initiator, conditional = false) {
|
|
10
|
+
this.disarm();
|
|
11
|
+
if (this.destroyed || conditional) return;
|
|
12
|
+
try {
|
|
13
|
+
this.lease = this.sink.beginCeremony?.(initiator);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
this.logger.error("Failed to register ceremony low-event context", error);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
scheduleDisarm(delayMs) {
|
|
19
|
+
try {
|
|
20
|
+
this.lease?.settle(delayMs);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
this.logger.error("Failed to settle ceremony low-event context", error);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
disarm() {
|
|
26
|
+
try {
|
|
27
|
+
this.lease?.destroy();
|
|
28
|
+
} catch (error) {
|
|
29
|
+
this.logger.error("Failed to release ceremony low-event context", error);
|
|
30
|
+
}
|
|
31
|
+
this.lease = void 0;
|
|
32
|
+
}
|
|
33
|
+
destroy() {
|
|
34
|
+
this.disarm();
|
|
35
|
+
this.destroyed = true;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
LowEventWindowTracker
|
|
40
|
+
};
|