@keploy/capture-sdk 3.0.1 → 3.1.0-rc.2
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/README.md +1617 -130
- package/body-redact/package.json +6 -0
- package/body-worker-start/package.json +6 -0
- package/dist/body-jobs.d.ts +134 -0
- package/dist/body-redact.d.ts +23 -0
- package/dist/body-redact.js +1 -0
- package/dist/body-redact.js.map +1 -0
- package/dist/body-redact.mjs +1 -0
- package/dist/body-redact.mjs.map +1 -0
- package/dist/body-worker-none.d.ts +3 -0
- package/dist/body-worker-none.js +1 -0
- package/dist/body-worker-none.js.map +1 -0
- package/dist/body-worker-none.mjs +1 -0
- package/dist/body-worker-none.mjs.map +1 -0
- package/dist/body-worker-start.d.ts +3 -0
- package/dist/body-worker-start.js +1 -0
- package/dist/body-worker-start.js.map +1 -0
- package/dist/body-worker-start.mjs +1 -0
- package/dist/body-worker-start.mjs.map +1 -0
- package/dist/body-worker-unbundled.d.ts +1 -0
- package/dist/body-worker-unbundled.mjs +1 -0
- package/dist/body-worker-unbundled.mjs.map +1 -0
- package/dist/body-worker.d.ts +1 -0
- package/dist/body-worker.js +1 -0
- package/dist/body-worker.js.map +1 -0
- package/dist/errors.d.ts +224 -28
- package/dist/index.bundler.mjs +1 -0
- package/dist/index.bundler.mjs.map +1 -0
- package/dist/index.d.ts +23 -28
- package/dist/index.js +1 -2354
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -2297
- package/dist/index.mjs.map +1 -0
- package/dist/leave.d.ts +67 -0
- package/dist/module-of.d.ts +58 -0
- package/dist/network.d.ts +163 -4
- package/dist/privacy.d.ts +387 -12
- package/dist/recorder.d.ts +304 -64
- package/dist/redact.d.ts +48 -6
- package/dist/request-term.d.ts +23 -0
- package/dist/request-term.js +1 -0
- package/dist/request-term.js.map +1 -0
- package/dist/request-term.mjs +1 -0
- package/dist/request-term.mjs.map +1 -0
- package/dist/strict-attributes.d.ts +9 -0
- package/dist/strict-attributes.js +1 -0
- package/dist/strict-attributes.js.map +1 -0
- package/dist/strict-attributes.mjs +1 -0
- package/dist/strict-attributes.mjs.map +1 -0
- package/dist/term-candidate.d.ts +16 -0
- package/dist/transport.d.ts +269 -130
- package/dist/types.d.ts +152 -9
- package/package.json +37 -4
- package/request-term/package.json +6 -0
- package/strict-attributes/package.json +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export type { CaptureConfig, SessionEvent, SessionEventType, NetworkEvent, Netwo
|
|
|
2
2
|
export { PrivacyEngine, defaultPrivacyConfig } from "./privacy";
|
|
3
3
|
export { NetworkInterceptor } from "./network";
|
|
4
4
|
export { Transport } from "./transport";
|
|
5
|
-
export { CaptureError, IngestRejection, SessionIdRefusal, SDK_ERRORS, SDK_WARNINGS, codeForStatus, describeValue, parseServerError, } from "./errors";
|
|
6
|
-
export type { AnyCaptureError, CaptureErrorCode, CaptureWarningCode, CaptureWarningEvidence, CaptureEvidence, CaptureRemedy, IngestEvidence, ServerAnsweredCode, ServerError, ServerIssue, SessionIdEvidence, } from "./errors";
|
|
5
|
+
export { CaptureDeclined, CaptureError, DomRecorderRefusal, IngestRejection, PrivacyConflict, PrivacyRouteRefusal, SessionIdRefusal, StrictAttributesRefusal, SDK_ERRORS, SDK_WARNINGS, codeForStatus, describeValue, parseServerError, } from "./errors";
|
|
6
|
+
export type { AnyCaptureError, CaptureDeclinedEvidence, CaptureErrorCode, CaptureWarningCode, CaptureWarningEvidence, CaptureEvidence, CaptureRemedy, DomRecorderEvidence, PrivacyRouteEvidence, IngestEvidence, ServerAnsweredCode, ServerError, PrivacyConflictEvidence, PrivacySignal, ServerIssue, SessionIdEvidence, } from "./errors";
|
|
7
7
|
export { SESSION_ID_MAX_LENGTH, SESSION_ID_PATTERN, SESSION_ID_RULE, isValidSessionId, } from "./session-id";
|
|
8
8
|
export type { TransportConfig } from "./transport";
|
|
9
9
|
export { KeployCaptureRecorder } from "./recorder";
|
|
@@ -30,6 +30,7 @@ export declare class KeployCapture {
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
static init(config: CaptureConfig): Promise<KeployCapture>;
|
|
33
|
+
private static begin;
|
|
33
34
|
/**
|
|
34
35
|
* Stop all recording and flush remaining events.
|
|
35
36
|
*
|
|
@@ -37,9 +38,12 @@ export declare class KeployCapture {
|
|
|
37
38
|
*/
|
|
38
39
|
static stop(): Promise<void>;
|
|
39
40
|
/**
|
|
40
|
-
* Pause recording:
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* Pause recording: nothing more is recorded until {@link resume}. No
|
|
42
|
+
* DOM event, and no network exchange that starts or is answered while
|
|
43
|
+
* paused; an exchange still reading its body is recorded at once with
|
|
44
|
+
* what had arrived, cut and marked, and nothing of it after, resume()
|
|
45
|
+
* included. The tab going hidden and visible in between does not end
|
|
46
|
+
* the pause.
|
|
43
47
|
*/
|
|
44
48
|
static pause(): void;
|
|
45
49
|
/** Resume recording after {@link pause}. A hidden tab stays paused until it is visible. */
|
|
@@ -73,32 +77,23 @@ export declare class KeployCapture {
|
|
|
73
77
|
private start;
|
|
74
78
|
private stop;
|
|
75
79
|
/**
|
|
76
|
-
* The
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* init() again gets a fresh capture, not this dead one.
|
|
80
|
+
* The capture was declined by a privacy signal: the capture ended,
|
|
81
|
+
* then onError -- on EVERY declined init(), so each handler learns its
|
|
82
|
+
* capture did not start (a silent init() looks like success) -- and
|
|
83
|
+
* the console line ONCE PER PAGE, since the signal does not change and
|
|
84
|
+
* a page that re-inits (React StrictMode's double effect, a re-init per
|
|
85
|
+
* route) would otherwise repeat it. Logged as information: nothing
|
|
86
|
+
* failed.
|
|
84
87
|
*/
|
|
88
|
+
private decline;
|
|
85
89
|
private refuse;
|
|
86
|
-
/**
|
|
87
|
-
* A subsystem ended this capture on its own. ONE path, two callers:
|
|
88
|
-
*
|
|
89
|
-
* - the recorder, when `maxSessionDuration` elapses;
|
|
90
|
-
* - the transport, when the server answers a batch with a terminal
|
|
91
|
-
* 4xx — a revoked key, a key for another app, or a second run
|
|
92
|
-
* claiming a live session id. That one used to stop the transport
|
|
93
|
-
* alone, so rrweb kept recording, fetch and XHR stayed patched and
|
|
94
|
-
* the session timer stayed armed for a capture that could never
|
|
95
|
-
* post another byte.
|
|
96
|
-
*
|
|
97
|
-
* The singleton is released either way, so a later init() starts a
|
|
98
|
-
* NEW session rather than handing back a finished or dead one — which
|
|
99
|
-
* is the whole recovery path after a key is rotated.
|
|
100
|
-
*/
|
|
101
90
|
private endCapture;
|
|
91
|
+
/** Cancels a continuous capture's wait for the visitor's next interaction. */
|
|
92
|
+
private static cancelNextSession;
|
|
93
|
+
private static nextSessionPaused;
|
|
94
|
+
private static ending;
|
|
95
|
+
private static restartPending;
|
|
96
|
+
private endSession;
|
|
102
97
|
private pause;
|
|
103
98
|
private resume;
|
|
104
99
|
}
|