@reproapp/node-sdk 0.0.45 → 0.0.47
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/index.d.ts +11 -2
- package/dist/index.js +269 -126
- package/dist/ingest/client.js +11 -0
- package/dist/privacy.d.ts +1 -0
- package/dist/privacy.js +306 -7
- package/package.json +3 -3
- package/src/index.ts +396 -111
- package/src/ingest/client.ts +13 -0
- package/src/privacy.ts +409 -7
- package/test/ingest-high-priority-fairness.test.js +76 -0
- package/test/policy-capture-attestation.test.js +234 -0
- package/test/policy-session-completion.testcontainers.test.js +271 -0
- package/test/privacy-policy-index.test.js +194 -0
- package/test/sdk-background-timeout-isolation.test.js +39 -0
- package/test/trace-batch-size.test.js +4 -0
- package/test/trace-source-exclude.test.js +222 -0
- package/tracer/cjs-hook.js +56 -37
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export type TraceEventForFilter = {
|
|
|
52
52
|
fn?: string;
|
|
53
53
|
wrapperClass?: string | null;
|
|
54
54
|
file?: string | null;
|
|
55
|
+
sourceFile?: string | null;
|
|
55
56
|
line?: number | null;
|
|
56
57
|
depth?: number;
|
|
57
58
|
library?: string | null;
|
|
@@ -86,7 +87,7 @@ type PendingTraceEventRecord = TraceEventRecord & {
|
|
|
86
87
|
__reproTraceValueEntries?: TraceValueBatchEntry[];
|
|
87
88
|
};
|
|
88
89
|
type TraceValueCaptureRef = {
|
|
89
|
-
status: 'stored' | 'truncated-for-storage' | 'skipped-non-meaningful';
|
|
90
|
+
status: 'stored' | 'truncated-for-storage' | 'skipped-non-meaningful' | 'failed-policy';
|
|
90
91
|
valueId?: string;
|
|
91
92
|
projectedKind?: string;
|
|
92
93
|
};
|
|
@@ -286,6 +287,14 @@ type RequestCaptureScopeState = {
|
|
|
286
287
|
traceBatchCount: number;
|
|
287
288
|
dbChangeCount: number;
|
|
288
289
|
emailEventCount: number;
|
|
290
|
+
captureFailures: Array<{
|
|
291
|
+
stage: string;
|
|
292
|
+
target: string;
|
|
293
|
+
reason: string;
|
|
294
|
+
}>;
|
|
295
|
+
privacyMode: 'policy' | 'fallback' | 'raw';
|
|
296
|
+
privacyPolicyFingerprint?: string;
|
|
297
|
+
privacyStatementCount: number;
|
|
289
298
|
};
|
|
290
299
|
type BackendLiveTimingConfig = {
|
|
291
300
|
sessionMaxDurationMs: number;
|
|
@@ -323,7 +332,7 @@ type InlinePrivacyMaterializationResult = {
|
|
|
323
332
|
limit?: number;
|
|
324
333
|
};
|
|
325
334
|
};
|
|
326
|
-
declare function materializeInlinePrivacyValueAsync(target: RuntimePrivacySurface, value: any, cfg: ReproMiddlewareConfig, req: MaskRequestContext, trace: TraceEventForFilter | null, masking: NormalizedMaskingConfig | null, privacy: NormalizedRuntimePrivacyPolicy | null, db?: RuntimePrivacyDbContext | null): Promise<InlinePrivacyMaterializationResult>;
|
|
335
|
+
declare function materializeInlinePrivacyValueAsync(target: RuntimePrivacySurface, value: any, cfg: ReproMiddlewareConfig, req: MaskRequestContext, trace: TraceEventForFilter | null, masking: NormalizedMaskingConfig | null, privacy: NormalizedRuntimePrivacyPolicy | null, db?: RuntimePrivacyDbContext | null, captureScope?: RequestCaptureScopeState | null): Promise<InlinePrivacyMaterializationResult>;
|
|
327
336
|
declare function getEventTraceValueEntries(event: TraceEventRecord | PendingTraceEventRecord): TraceValueBatchEntry[] | undefined;
|
|
328
337
|
declare function estimateTraceBatchSerializedBytes(batch: TraceEventRecord[], requestRid: string, actionId: string | null | undefined, batchIndex: number): number;
|
|
329
338
|
declare function chunkTraceEventsForTransport(events: TraceEventRecord[], requestRid: string, actionId: string | null | undefined): TraceEventRecord[][];
|