@reproapp/node-sdk 0.0.39 → 0.0.41

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 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`, `kafkajs`, `amqplib`, `redis`, and `@sendgrid/mail`
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;