repro-nest 0.0.220 → 0.0.221
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 +0 -3
- package/dist/index.js +0 -1
- package/dist/integrations/sendgrid.d.ts +0 -1
- package/dist/integrations/sendgrid.js +0 -1
- package/docs/tracing.md +0 -1
- package/package.json +1 -1
- package/src/index.ts +2 -5
- package/src/integrations/sendgrid.ts +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -195,7 +195,6 @@ export declare function initReproTracing(opts?: ReproTracingInitOptions): Tracer
|
|
|
195
195
|
export declare function isReproTracingEnabled(): boolean;
|
|
196
196
|
export type ReproMiddlewareConfig = {
|
|
197
197
|
appId: string;
|
|
198
|
-
tenantId: string;
|
|
199
198
|
appSecret: string;
|
|
200
199
|
/** Configure header capture/masking. Defaults to capturing with sensitive headers masked. */
|
|
201
200
|
captureHeaders?: boolean | HeaderCaptureOptions;
|
|
@@ -205,12 +204,10 @@ export type ReproMiddlewareConfig = {
|
|
|
205
204
|
export declare function reproMiddleware(cfg: ReproMiddlewareConfig): (req: Request, res: Response, next: NextFunction) => void;
|
|
206
205
|
export declare function reproMongoosePlugin(cfg: {
|
|
207
206
|
appId: string;
|
|
208
|
-
tenantId: string;
|
|
209
207
|
appSecret: string;
|
|
210
208
|
}): (schema: Schema) => void;
|
|
211
209
|
export type SendgridPatchConfig = {
|
|
212
210
|
appId: string;
|
|
213
|
-
tenantId: string;
|
|
214
211
|
appSecret: string;
|
|
215
212
|
resolveContext?: () => {
|
|
216
213
|
sid?: string;
|
package/dist/index.js
CHANGED
package/docs/tracing.md
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1123,7 +1123,7 @@ function resolveCollectionOrWarn(source: any, type: 'doc' | 'query'): string {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
1125
|
async function post(
|
|
1126
|
-
cfg: {
|
|
1126
|
+
cfg: { appId: string; appSecret: string; apiBase?: string },
|
|
1127
1127
|
sessionId: string,
|
|
1128
1128
|
body: any,
|
|
1129
1129
|
) {
|
|
@@ -1137,7 +1137,6 @@ async function post(
|
|
|
1137
1137
|
'Content-Type': 'application/json',
|
|
1138
1138
|
'X-App-Id': cfg.appId,
|
|
1139
1139
|
'X-App-Secret': cfg.appSecret,
|
|
1140
|
-
'X-Tenant-Id': cfg.tenantId,
|
|
1141
1140
|
},
|
|
1142
1141
|
body: JSON.stringify(body),
|
|
1143
1142
|
});
|
|
@@ -1784,7 +1783,6 @@ function applyMasking(
|
|
|
1784
1783
|
// ===================================================================
|
|
1785
1784
|
export type ReproMiddlewareConfig = {
|
|
1786
1785
|
appId: string;
|
|
1787
|
-
tenantId: string;
|
|
1788
1786
|
appSecret: string;
|
|
1789
1787
|
/** Configure header capture/masking. Defaults to capturing with sensitive headers masked. */
|
|
1790
1788
|
captureHeaders?: boolean | HeaderCaptureOptions;
|
|
@@ -2228,7 +2226,7 @@ export function reproMiddleware(cfg: ReproMiddlewareConfig) {
|
|
|
2228
2226
|
// - ONLY schema middleware (pre/post) for specific ops
|
|
2229
2227
|
// - keeps your existing doc-diff hooks
|
|
2230
2228
|
// ===================================================================
|
|
2231
|
-
export function reproMongoosePlugin(cfg: { appId: string;
|
|
2229
|
+
export function reproMongoosePlugin(cfg: { appId: string; appSecret: string }) {
|
|
2232
2230
|
return function (schema: Schema) {
|
|
2233
2231
|
// -------- pre/post save (unchanged) --------
|
|
2234
2232
|
schema.pre('save', { document: true }, async function (next) {
|
|
@@ -2723,7 +2721,6 @@ function buildMinimalUpdate(before: any, after: any) {
|
|
|
2723
2721
|
// ===================================================================
|
|
2724
2722
|
export type SendgridPatchConfig = {
|
|
2725
2723
|
appId: string;
|
|
2726
|
-
tenantId: string;
|
|
2727
2724
|
appSecret: string;
|
|
2728
2725
|
resolveContext?: () => { sid?: string; aid?: string } | undefined;
|
|
2729
2726
|
};
|
|
@@ -8,7 +8,7 @@ export const getCtx = () => als.getStore() || {};
|
|
|
8
8
|
// If you already export als/getCtx from repro-node, reuse that instead of re-declaring.
|
|
9
9
|
|
|
10
10
|
async function post(
|
|
11
|
-
cfg: {
|
|
11
|
+
cfg: { appId: string; appSecret: string; apiBase?: string },
|
|
12
12
|
sessionId: string,
|
|
13
13
|
body: any,
|
|
14
14
|
) {
|
|
@@ -22,7 +22,6 @@ async function post(
|
|
|
22
22
|
'Content-Type': 'application/json',
|
|
23
23
|
'X-App-Id': cfg.appId,
|
|
24
24
|
'X-App-Secret': cfg.appSecret,
|
|
25
|
-
'X-Tenant-Id': cfg.tenantId,
|
|
26
25
|
},
|
|
27
26
|
body: JSON.stringify(body),
|
|
28
27
|
});
|
|
@@ -31,7 +30,6 @@ async function post(
|
|
|
31
30
|
|
|
32
31
|
export type SendgridPatchConfig = {
|
|
33
32
|
appId: string;
|
|
34
|
-
tenantId: string;
|
|
35
33
|
appSecret: string;
|
|
36
34
|
// Optional: provide a function to resolve sid/aid if AsyncLocalStorage is not set
|
|
37
35
|
resolveContext?: () => { sid?: string; aid?: string } | undefined;
|