@reproapp/node-sdk 0.0.55 → 0.0.56
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/capture-work-budget.js +1 -2
- package/dist/index.d.ts +1 -26
- package/dist/index.js +19 -19
- package/dist/ingest/client.d.ts +2 -2
- package/dist/integrations/sendgrid.js +2 -2
- package/dist/live-capture-limits.js +4 -4
- package/dist/privacy-fallback.js +1 -2
- package/dist/privacy-redaction.js +3 -4
- package/dist/privacy.js +7 -8
- package/dist/semantic-serialization.js +2 -3
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.yieldCaptureWork =
|
|
3
|
+
exports.yieldCaptureWork = yieldCaptureWork;
|
|
4
4
|
// Promise-only recursion never yields to HTTP sockets. Share a small time slice
|
|
5
5
|
// across asynchronous capture walkers, including the worker-unavailable fallback.
|
|
6
6
|
let deadline = 0;
|
|
@@ -22,4 +22,3 @@ function yieldCaptureWork() {
|
|
|
22
22
|
}));
|
|
23
23
|
return pendingYield;
|
|
24
24
|
}
|
|
25
|
-
exports.yieldCaptureWork = yieldCaptureWork;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
1
|
import type { Request, Response, NextFunction } from 'express';
|
|
27
2
|
import type { Schema } from 'mongoose';
|
|
28
3
|
import { type IngestClientConfig } from './ingest/client';
|
|
@@ -485,7 +460,7 @@ export declare const __reproTestHooks: {
|
|
|
485
460
|
shareRuntimePrivacyStateForTest: typeof shareRuntimePrivacyState;
|
|
486
461
|
setFullValueCaptureEnabledForTest(enabled: boolean): void;
|
|
487
462
|
scheduleSdkBackgroundWorkForTest(work: () => Promise<void> | void, options?: {
|
|
488
|
-
priority?:
|
|
463
|
+
priority?: "high" | "normal";
|
|
489
464
|
}): void;
|
|
490
465
|
drainSdkBackgroundQueueForTest(): Promise<void>;
|
|
491
466
|
resetSdkBackgroundQueuesForTest(): void;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.__reproTestHooks =
|
|
3
|
+
exports.__reproTestHooks = void 0;
|
|
4
|
+
exports.setDisabledFunctionTraces = setDisabledFunctionTraces;
|
|
5
|
+
exports.setDisabledFunctionTypes = setDisabledFunctionTypes;
|
|
6
|
+
exports.setDisabledTraceFiles = setDisabledTraceFiles;
|
|
7
|
+
exports.setReproTraceLogsEnabled = setReproTraceLogsEnabled;
|
|
8
|
+
exports.enableReproTraceLogs = enableReproTraceLogs;
|
|
9
|
+
exports.disableReproTraceLogs = disableReproTraceLogs;
|
|
10
|
+
exports.initReproTracing = initReproTracing;
|
|
11
|
+
exports.isReproTracingEnabled = isReproTracingEnabled;
|
|
12
|
+
exports.__materializePendingTraceEventsForWorker = __materializePendingTraceEventsForWorker;
|
|
13
|
+
exports.reproMiddleware = reproMiddleware;
|
|
14
|
+
exports.reproMongoosePlugin = reproMongoosePlugin;
|
|
15
|
+
exports.patchKafkaJs = patchKafkaJs;
|
|
16
|
+
exports.patchAmqplib = patchAmqplib;
|
|
17
|
+
exports.patchRedis = patchRedis;
|
|
18
|
+
exports.patchPostgreSql = patchPostgreSql;
|
|
19
|
+
exports.patchMongoDb = patchMongoDb;
|
|
20
|
+
exports.patchSendgridMail = patchSendgridMail;
|
|
21
|
+
exports.initRepro = initRepro;
|
|
4
22
|
const mongoose = require("mongoose");
|
|
5
23
|
const async_hooks_1 = require("async_hooks");
|
|
6
24
|
const crypto_1 = require("crypto");
|
|
@@ -514,11 +532,9 @@ function setDisabledFunctionTraces(rules) {
|
|
|
514
532
|
}
|
|
515
533
|
refreshDisabledFunctionTraceRules();
|
|
516
534
|
}
|
|
517
|
-
exports.setDisabledFunctionTraces = setDisabledFunctionTraces;
|
|
518
535
|
function setDisabledFunctionTypes(patterns) {
|
|
519
536
|
disabledFunctionTypePatterns = normalizePatternArray(patterns);
|
|
520
537
|
}
|
|
521
|
-
exports.setDisabledFunctionTypes = setDisabledFunctionTypes;
|
|
522
538
|
function flattenTraceFilePatterns(config) {
|
|
523
539
|
if (config === null || config === undefined)
|
|
524
540
|
return [];
|
|
@@ -541,7 +557,6 @@ function setDisabledTraceFiles(config) {
|
|
|
541
557
|
const items = Array.isArray(config) ? config : [config];
|
|
542
558
|
disabledTraceFilePatterns = items.flatMap(entry => flattenTraceFilePatterns(entry)).filter(Boolean);
|
|
543
559
|
}
|
|
544
|
-
exports.setDisabledTraceFiles = setDisabledTraceFiles;
|
|
545
560
|
function applyTraceLogPreference(tracer) {
|
|
546
561
|
if (__TRACE_LOG_PREF === null)
|
|
547
562
|
return;
|
|
@@ -554,11 +569,8 @@ function setReproTraceLogsEnabled(enabled) {
|
|
|
554
569
|
__TRACE_LOG_PREF = !!enabled;
|
|
555
570
|
applyTraceLogPreference(__TRACER__);
|
|
556
571
|
}
|
|
557
|
-
exports.setReproTraceLogsEnabled = setReproTraceLogsEnabled;
|
|
558
572
|
function enableReproTraceLogs() { setReproTraceLogsEnabled(true); }
|
|
559
|
-
exports.enableReproTraceLogs = enableReproTraceLogs;
|
|
560
573
|
function disableReproTraceLogs() { setReproTraceLogsEnabled(false); }
|
|
561
|
-
exports.disableReproTraceLogs = disableReproTraceLogs;
|
|
562
574
|
function summarizeEndpointFromEvents(events) {
|
|
563
575
|
let endpointTrace = null;
|
|
564
576
|
let preferredAppTrace = null;
|
|
@@ -665,10 +677,8 @@ function initReproTracing(opts) {
|
|
|
665
677
|
}
|
|
666
678
|
return __TRACER__;
|
|
667
679
|
}
|
|
668
|
-
exports.initReproTracing = initReproTracing;
|
|
669
680
|
/** Optional helper if users want to check it. */
|
|
670
681
|
function isReproTracingEnabled() { return __TRACER_READY; }
|
|
671
|
-
exports.isReproTracingEnabled = isReproTracingEnabled;
|
|
672
682
|
function captureSpanContextFromTracer(source) {
|
|
673
683
|
try {
|
|
674
684
|
// Prefer a preserved store captured at the call-site for thenables (e.g., Mongoose Query),
|
|
@@ -3127,7 +3137,6 @@ async function __materializePendingTraceEventsForWorker(payload) {
|
|
|
3127
3137
|
__FULL_VALUE_CAPTURE_ENABLED = prevFullValueCapture;
|
|
3128
3138
|
}
|
|
3129
3139
|
}
|
|
3130
|
-
exports.__materializePendingTraceEventsForWorker = __materializePendingTraceEventsForWorker;
|
|
3131
3140
|
function sanitizeRequestSnapshot(value) {
|
|
3132
3141
|
if (value === undefined)
|
|
3133
3142
|
return undefined;
|
|
@@ -5527,7 +5536,6 @@ function reproMiddleware(cfg) {
|
|
|
5527
5536
|
}));
|
|
5528
5537
|
};
|
|
5529
5538
|
}
|
|
5530
|
-
exports.reproMiddleware = reproMiddleware;
|
|
5531
5539
|
// ===================================================================
|
|
5532
5540
|
// reproMongoosePlugin — stable + NON-intrusive query logs
|
|
5533
5541
|
// - NO prototype monkey-patching of Mongoose
|
|
@@ -5937,7 +5945,6 @@ function reproMongoosePlugin(cfg) {
|
|
|
5937
5945
|
});
|
|
5938
5946
|
};
|
|
5939
5947
|
}
|
|
5940
|
-
exports.reproMongoosePlugin = reproMongoosePlugin;
|
|
5941
5948
|
function summarizeQueryResult(op, res) {
|
|
5942
5949
|
const resultPreview = sanitizeResultForMeta(res, { preserveLongStrings: true });
|
|
5943
5950
|
if (op === 'find' ||
|
|
@@ -7504,7 +7511,6 @@ function patchKafkaJs(cfg) {
|
|
|
7504
7511
|
}
|
|
7505
7512
|
}
|
|
7506
7513
|
}
|
|
7507
|
-
exports.patchKafkaJs = patchKafkaJs;
|
|
7508
7514
|
const AMQP_INTERNAL_PUBLISH_DEPTH = Symbol.for('repro.amqplib.internalPublishDepth');
|
|
7509
7515
|
function decodeAmqpHeaderValue(value) {
|
|
7510
7516
|
if (value === null || value === undefined)
|
|
@@ -8310,7 +8316,6 @@ function patchAmqplib(cfg) {
|
|
|
8310
8316
|
patchAmqplibModule(amqpModule, cfg);
|
|
8311
8317
|
}
|
|
8312
8318
|
}
|
|
8313
|
-
exports.patchAmqplib = patchAmqplib;
|
|
8314
8319
|
const redisPatchConfigs = [];
|
|
8315
8320
|
let redisRequireHookInstalled = false;
|
|
8316
8321
|
const REDIS_KEYLESS_COMMANDS = new Set([
|
|
@@ -8600,7 +8605,6 @@ function patchRedis(cfg) {
|
|
|
8600
8605
|
patchRedisFromModuleExports(redisModule, cfg);
|
|
8601
8606
|
}
|
|
8602
8607
|
}
|
|
8603
|
-
exports.patchRedis = patchRedis;
|
|
8604
8608
|
const postgresSqlPatchConfigs = [];
|
|
8605
8609
|
const postgresSqlSourceAls = new async_hooks_1.AsyncLocalStorage();
|
|
8606
8610
|
const pgPoolQueryAls = new async_hooks_1.AsyncLocalStorage();
|
|
@@ -9158,7 +9162,6 @@ function patchPostgreSql(cfg) {
|
|
|
9158
9162
|
for (const loaded of typeOrmModules)
|
|
9159
9163
|
patchTypeOrmFromModuleExports(loaded);
|
|
9160
9164
|
}
|
|
9161
|
-
exports.patchPostgreSql = patchPostgreSql;
|
|
9162
9165
|
const mongoDbPatchConfigs = [];
|
|
9163
9166
|
let mongoDbRequireHookInstalled = false;
|
|
9164
9167
|
let mongoDbImportHookInstalled = false;
|
|
@@ -9741,7 +9744,6 @@ function patchMongoDb(cfg) {
|
|
|
9741
9744
|
patchMongoDbFromModuleExports(mongoModule, cfg);
|
|
9742
9745
|
}
|
|
9743
9746
|
}
|
|
9744
|
-
exports.patchMongoDb = patchMongoDb;
|
|
9745
9747
|
// ===================================================================
|
|
9746
9748
|
// Auto init helpers
|
|
9747
9749
|
// ===================================================================
|
|
@@ -10209,7 +10211,6 @@ function patchSendgridMail(cfg) {
|
|
|
10209
10211
|
}
|
|
10210
10212
|
}
|
|
10211
10213
|
}
|
|
10212
|
-
exports.patchSendgridMail = patchSendgridMail;
|
|
10213
10214
|
/**
|
|
10214
10215
|
* Datadog-style one-time init.
|
|
10215
10216
|
* Enables tracing, auto-patches integrations, auto-registers mongoose plugin,
|
|
@@ -10257,7 +10258,6 @@ async function initRepro(cfg) {
|
|
|
10257
10258
|
enqueueRuntimeServiceRegistration(reproAutoMiddlewareConfig);
|
|
10258
10259
|
await initializeRuntimePrivacyPolicyAtStartup(reproAutoMiddlewareConfig);
|
|
10259
10260
|
}
|
|
10260
|
-
exports.initRepro = initRepro;
|
|
10261
10261
|
/** @internal Test hooks for runtime privacy policy wiring. */
|
|
10262
10262
|
exports.__reproTestHooks = {
|
|
10263
10263
|
shareRuntimePrivacyStateForTest: shareRuntimePrivacyState,
|
package/dist/ingest/client.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export type EnqueueIngestOptions = {
|
|
|
3
3
|
priority?: 'normal' | 'high' | 'critical';
|
|
4
4
|
};
|
|
5
5
|
export declare const configureIngestQueueDrain: (options: {
|
|
6
|
-
shouldDefer?: ((enqueuedAt?: number) => boolean) | null
|
|
7
|
-
deferMs?: number
|
|
6
|
+
shouldDefer?: ((enqueuedAt?: number) => boolean) | null;
|
|
7
|
+
deferMs?: number;
|
|
8
8
|
}) => void;
|
|
9
9
|
export declare const kickIngestQueueDrain: () => void;
|
|
10
10
|
export declare const postIngestEntries: (config: IngestClientConfig, sessionId: string, entries: LegacyEntry[]) => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getCtx = void 0;
|
|
4
|
+
exports.patchSendgridMail = patchSendgridMail;
|
|
4
5
|
// repro-node/src/integrations/sendgrid.ts
|
|
5
6
|
const async_hooks_1 = require("async_hooks");
|
|
6
7
|
const client_1 = require("../ingest/client");
|
|
@@ -164,4 +165,3 @@ function patchSendgridMail(cfg) {
|
|
|
164
165
|
return undefined;
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
|
-
exports.patchSendgridMail = patchSendgridMail;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.LIVE_CAPTURE_LIMITS = void 0;
|
|
4
|
+
exports.limitLiveCapture = limitLiveCapture;
|
|
5
|
+
exports.collectCaptureOmissions = collectCaptureOmissions;
|
|
6
|
+
exports.limitLiveArguments = limitLiveArguments;
|
|
4
7
|
const http_1 = require("http");
|
|
5
8
|
const semantic_serialization_1 = require("./semantic-serialization");
|
|
6
9
|
exports.LIVE_CAPTURE_LIMITS = Object.freeze({ maxDepth: 10, maxKeys: 100, maxEntries: 100 });
|
|
@@ -170,7 +173,6 @@ function limitLiveCapture(value, rootPath = '$') {
|
|
|
170
173
|
return { value: omit({ reason: 'uninspectable', path: rootPath, capturedCount: 0 }), omissions };
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
|
-
exports.limitLiveCapture = limitLiveCapture;
|
|
174
176
|
function collectCaptureOmissions(value) {
|
|
175
177
|
const result = [];
|
|
176
178
|
const seen = new WeakSet();
|
|
@@ -193,7 +195,6 @@ function collectCaptureOmissions(value) {
|
|
|
193
195
|
}
|
|
194
196
|
return result;
|
|
195
197
|
}
|
|
196
|
-
exports.collectCaptureOmissions = collectCaptureOmissions;
|
|
197
198
|
function limitLiveArguments(args) {
|
|
198
199
|
const values = args.slice(0, 100).map((arg, index) => limitLiveCapture(arg, `$[${index}]`).value);
|
|
199
200
|
if (args.length > 100) {
|
|
@@ -204,4 +205,3 @@ function limitLiveArguments(args) {
|
|
|
204
205
|
}
|
|
205
206
|
return values;
|
|
206
207
|
}
|
|
207
|
-
exports.limitLiveArguments = limitLiveArguments;
|
package/dist/privacy-fallback.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sanitizeUnknownBoundaryTextWithDetectors =
|
|
3
|
+
exports.sanitizeUnknownBoundaryTextWithDetectors = sanitizeUnknownBoundaryTextWithDetectors;
|
|
4
4
|
const SANITIZED_TEXT_CACHE = new Map();
|
|
5
5
|
const SANITIZED_TEXT_CACHE_MAX = 500;
|
|
6
6
|
async function sanitizeUnknownBoundaryTextWithDetectors(value) {
|
|
@@ -14,7 +14,6 @@ async function sanitizeUnknownBoundaryTextWithDetectors(value) {
|
|
|
14
14
|
rememberSanitizedText(value, value);
|
|
15
15
|
return value;
|
|
16
16
|
}
|
|
17
|
-
exports.sanitizeUnknownBoundaryTextWithDetectors = sanitizeUnknownBoundaryTextWithDetectors;
|
|
18
17
|
function rememberSanitizedText(input, output) {
|
|
19
18
|
SANITIZED_TEXT_CACHE.set(input, output);
|
|
20
19
|
if (SANITIZED_TEXT_CACHE.size <= SANITIZED_TEXT_CACHE_MAX) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.redactEmailDeterministic = redactEmailDeterministic;
|
|
4
|
+
exports.redactEmailsInText = redactEmailsInText;
|
|
5
|
+
exports.collectEmailsInText = collectEmailsInText;
|
|
4
6
|
const crypto_1 = require("crypto");
|
|
5
7
|
const EMAIL_PATTERN = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi;
|
|
6
8
|
const EMAIL_TOKEN_PREFIX = 'email_tok_';
|
|
@@ -13,14 +15,12 @@ function redactEmailDeterministic(value) {
|
|
|
13
15
|
const token = (0, crypto_1.createHash)('sha256').update(normalized).digest('hex').slice(0, EMAIL_TOKEN_LENGTH);
|
|
14
16
|
return `${EMAIL_TOKEN_PREFIX}${token}`;
|
|
15
17
|
}
|
|
16
|
-
exports.redactEmailDeterministic = redactEmailDeterministic;
|
|
17
18
|
function redactEmailsInText(value) {
|
|
18
19
|
if (!value) {
|
|
19
20
|
return value;
|
|
20
21
|
}
|
|
21
22
|
return value.replace(EMAIL_PATTERN, (match) => isAlreadyMaskedEmail(match) ? match : redactEmailDeterministic(match));
|
|
22
23
|
}
|
|
23
|
-
exports.redactEmailsInText = redactEmailsInText;
|
|
24
24
|
function collectEmailsInText(value) {
|
|
25
25
|
if (!value) {
|
|
26
26
|
return [];
|
|
@@ -28,7 +28,6 @@ function collectEmailsInText(value) {
|
|
|
28
28
|
const matches = value.match(EMAIL_PATTERN);
|
|
29
29
|
return Array.isArray(matches) ? matches : [];
|
|
30
30
|
}
|
|
31
|
-
exports.collectEmailsInText = collectEmailsInText;
|
|
32
31
|
function isAlreadyMaskedEmail(value) {
|
|
33
32
|
if (/^email_tok_[a-z0-9]+$/i.test(value)) {
|
|
34
33
|
return true;
|
package/dist/privacy.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.clearRuntimePrivacyProvenance = clearRuntimePrivacyProvenance;
|
|
4
|
+
exports.normalizePrivacyEnvironment = normalizePrivacyEnvironment;
|
|
5
|
+
exports.resolvePrivacyApiBase = resolvePrivacyApiBase;
|
|
6
|
+
exports.fetchApprovedRuntimePrivacyPolicy = fetchApprovedRuntimePrivacyPolicy;
|
|
7
|
+
exports.normalizeRuntimePrivacyPolicy = normalizeRuntimePrivacyPolicy;
|
|
8
|
+
exports.applyRuntimePrivacyPolicy = applyRuntimePrivacyPolicy;
|
|
9
|
+
exports.applyRuntimePrivacyPolicyAsync = applyRuntimePrivacyPolicyAsync;
|
|
4
10
|
const crypto_1 = require("crypto");
|
|
5
11
|
const capture_work_budget_1 = require("./capture-work-budget");
|
|
6
12
|
const privacy_fallback_1 = require("./privacy-fallback");
|
|
@@ -21,7 +27,6 @@ function clearRuntimePrivacyProvenance() {
|
|
|
21
27
|
objectRuntimePrivacyProvenance = new WeakMap();
|
|
22
28
|
serializedRuntimePrivacyProvenance.clear();
|
|
23
29
|
}
|
|
24
|
-
exports.clearRuntimePrivacyProvenance = clearRuntimePrivacyProvenance;
|
|
25
30
|
const ALL_SURFACES = [
|
|
26
31
|
'db.pk',
|
|
27
32
|
'db.before',
|
|
@@ -79,7 +84,6 @@ function normalizePrivacyEnvironment(input) {
|
|
|
79
84
|
return 'qa';
|
|
80
85
|
return normalized || 'dev';
|
|
81
86
|
}
|
|
82
|
-
exports.normalizePrivacyEnvironment = normalizePrivacyEnvironment;
|
|
83
87
|
function resolvePrivacyApiBase(cfg) {
|
|
84
88
|
const value = cfg?.apiBase ||
|
|
85
89
|
process.env.REPRO_PRIVACY_API_BASE ||
|
|
@@ -90,7 +94,6 @@ function resolvePrivacyApiBase(cfg) {
|
|
|
90
94
|
}
|
|
91
95
|
return String(value).replace(/\/+$/, '');
|
|
92
96
|
}
|
|
93
|
-
exports.resolvePrivacyApiBase = resolvePrivacyApiBase;
|
|
94
97
|
const DEFAULT_RUNTIME_PRIVACY_FETCH_TIMEOUT_MS = 10000;
|
|
95
98
|
function resolveRuntimePrivacyFetchTimeoutMs(value) {
|
|
96
99
|
if (!Number.isFinite(value)) {
|
|
@@ -162,7 +165,6 @@ async function fetchApprovedRuntimePrivacyPolicy(params) {
|
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
|
-
exports.fetchApprovedRuntimePrivacyPolicy = fetchApprovedRuntimePrivacyPolicy;
|
|
166
168
|
function normalizeRuntimePrivacyPolicy(raw) {
|
|
167
169
|
if (!raw || typeof raw !== 'object') {
|
|
168
170
|
return null;
|
|
@@ -189,21 +191,18 @@ function normalizeRuntimePrivacyPolicy(raw) {
|
|
|
189
191
|
runtimePrivacyStatementIndexes.set(normalizedPolicy, buildRuntimePrivacyStatementIndex(statements));
|
|
190
192
|
return normalizedPolicy;
|
|
191
193
|
}
|
|
192
|
-
exports.normalizeRuntimePrivacyPolicy = normalizeRuntimePrivacyPolicy;
|
|
193
194
|
function applyRuntimePrivacyPolicy(policy, surface, value, context) {
|
|
194
195
|
if (value === undefined) {
|
|
195
196
|
return value;
|
|
196
197
|
}
|
|
197
198
|
return transformValue(policy ?? EMPTY_RUNTIME_PRIVACY_POLICY, surface, value, context, []);
|
|
198
199
|
}
|
|
199
|
-
exports.applyRuntimePrivacyPolicy = applyRuntimePrivacyPolicy;
|
|
200
200
|
async function applyRuntimePrivacyPolicyAsync(policy, surface, value, context) {
|
|
201
201
|
if (value === undefined) {
|
|
202
202
|
return value;
|
|
203
203
|
}
|
|
204
204
|
return transformValueAsync(policy ?? EMPTY_RUNTIME_PRIVACY_POLICY, surface, value, context, []);
|
|
205
205
|
}
|
|
206
|
-
exports.applyRuntimePrivacyPolicyAsync = applyRuntimePrivacyPolicyAsync;
|
|
207
206
|
function flattenStatements(policy) {
|
|
208
207
|
const fromGroups = Array.isArray(policy.groups)
|
|
209
208
|
? policy.groups.flatMap((group) => Array.isArray(group?.statements) ? group.statements : [])
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mongooseDocumentData = mongooseDocumentData;
|
|
4
|
+
exports.projectSemanticInfrastructureValue = projectSemanticInfrastructureValue;
|
|
4
5
|
function constructorName(value) {
|
|
5
6
|
if (!value || typeof value !== 'object')
|
|
6
7
|
return '';
|
|
@@ -55,7 +56,6 @@ function mongooseDocumentData(value) {
|
|
|
55
56
|
return null;
|
|
56
57
|
return method(value, '$__init') && method(value, '$toObject') ? doc : null;
|
|
57
58
|
}
|
|
58
|
-
exports.mongooseDocumentData = mongooseDocumentData;
|
|
59
59
|
function primitiveStateValue(value) {
|
|
60
60
|
if (value === null)
|
|
61
61
|
return null;
|
|
@@ -200,4 +200,3 @@ function projectSemanticInfrastructureValue(value) {
|
|
|
200
200
|
projectPostgres(value, className) ||
|
|
201
201
|
projectTypeOrm(value, className));
|
|
202
202
|
}
|
|
203
|
-
exports.projectSemanticInfrastructureValue = projectSemanticInfrastructureValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reproapp/node-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
4
4
|
"description": "Repro Nest SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"mongoose": ">=6"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
+
"typescript": "^5.7.3",
|
|
28
29
|
"@nestjs/typeorm": "^11.0.0",
|
|
29
30
|
"@testcontainers/kafka": "^11.8.1",
|
|
30
31
|
"@types/express": "^5.0.3",
|