@reproapp/node-sdk 0.0.39 → 0.0.42
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 +4 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +592 -2
- package/dist/ingest/client.d.ts +1 -1
- package/dist/ingest/client.js +156 -8
- package/dist/ingest/mapper.js +2 -0
- package/dist/ingest/types.d.ts +1 -0
- package/package.json +10 -4
- package/src/index.ts +651 -1
- package/src/ingest/client.ts +187 -10
- package/src/ingest/mapper.ts +1 -0
- package/src/ingest/types.ts +1 -0
- package/test/backend-live-mode.test.js +20 -2
- package/test/client-performance-regression.test.js +5 -0
- package/test/ingest-batching.test.js +67 -0
- package/test/postgresql-integration.test.js +302 -0
- package/test/postgresql-integrations.testcontainers.test.js +261 -0
- package/test/request-capture-background.test.js +6 -1
- package/test/request-manifest-priority.test.js +6 -0
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@ Requirements:
|
|
|
17
17
|
- Node.js 18+
|
|
18
18
|
- Express or NestJS on the Express adapter for HTTP capture
|
|
19
19
|
- Optional integrations are patched when their packages are installed: `mongoose`,
|
|
20
|
-
`mongodb`, `
|
|
20
|
+
`mongodb`, `pg`, `postgres`, TypeORM (standalone or NestJS), `kafkajs`,
|
|
21
|
+
`amqplib`, `redis`, and `@sendgrid/mail`
|
|
21
22
|
|
|
22
23
|
## Quickstart
|
|
23
24
|
|
|
@@ -142,6 +143,7 @@ import {
|
|
|
142
143
|
initReproTracing,
|
|
143
144
|
patchKafkaJs,
|
|
144
145
|
patchMongoDb,
|
|
146
|
+
patchPostgreSql,
|
|
145
147
|
patchRedis,
|
|
146
148
|
patchSendgridMail,
|
|
147
149
|
reproMiddleware,
|
|
@@ -160,6 +162,7 @@ initReproTracing({ disableFunctionTypes: ["constructor"] });
|
|
|
160
162
|
mongoose.plugin(reproMongoosePlugin(reproConfig));
|
|
161
163
|
patchKafkaJs(reproConfig);
|
|
162
164
|
patchMongoDb(reproConfig);
|
|
165
|
+
patchPostgreSql(reproConfig);
|
|
163
166
|
patchRedis(reproConfig);
|
|
164
167
|
patchSendgridMail(reproConfig);
|
|
165
168
|
|
package/dist/index.d.ts
CHANGED
|
@@ -417,6 +417,16 @@ export type RedisPatchConfig = ReproMiddlewareConfig & {
|
|
|
417
417
|
} | undefined;
|
|
418
418
|
};
|
|
419
419
|
export declare function patchRedis(cfg: RedisPatchConfig): void;
|
|
420
|
+
export type PostgreSqlPatchConfig = ReproMiddlewareConfig & {
|
|
421
|
+
resolveContext?: () => {
|
|
422
|
+
sid?: string;
|
|
423
|
+
aid?: string;
|
|
424
|
+
} | undefined;
|
|
425
|
+
};
|
|
426
|
+
declare function patchPgFromModuleExports(pgModule: any): void;
|
|
427
|
+
declare function patchPostgresJsFromModuleExports(postgresModule: any): void;
|
|
428
|
+
declare function patchTypeOrmFromModuleExports(typeOrmModule: any): void;
|
|
429
|
+
export declare function patchPostgreSql(cfg: PostgreSqlPatchConfig): void;
|
|
420
430
|
export type MongoDbPatchConfig = ReproMiddlewareConfig & {
|
|
421
431
|
resolveContext?: () => {
|
|
422
432
|
sid?: string;
|
|
@@ -461,6 +471,9 @@ export declare const __reproTestHooks: {
|
|
|
461
471
|
patchAmqplibConnectionForTest: typeof patchAmqplibConnection;
|
|
462
472
|
patchAmqplibChannelForTest: typeof patchAmqplibChannel;
|
|
463
473
|
wrapAmqplibConsumeHandlerForTest: typeof wrapAmqplibConsumeHandler;
|
|
474
|
+
patchPgModuleForTest: typeof patchPgFromModuleExports;
|
|
475
|
+
patchPostgresJsModuleForTest: typeof patchPostgresJsFromModuleExports;
|
|
476
|
+
patchTypeOrmModuleForTest: typeof patchTypeOrmFromModuleExports;
|
|
464
477
|
patchMongoDbModuleForTest: typeof patchMongoDbFromModuleExports;
|
|
465
478
|
patchMongoCollectionPrototypeForTest: typeof patchMongoCollectionPrototype;
|
|
466
479
|
chunkTraceEventsForTransportForTest: typeof chunkTraceEventsForTransport;
|