@getvision/adapter-express 0.0.7-d4ccf5d-develop → 0.0.9-22facf0-develop
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/CHANGELOG.md +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/package.json +1 -1
- package/src/index.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @getvision/adapter-express
|
|
2
2
|
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [2635948]
|
|
8
|
+
- @getvision/core@0.0.8
|
|
9
|
+
|
|
10
|
+
## 0.0.7
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- d4ccf5d: Expose `apiUrl` in adapter and server options and pass it to VisionCore so the dashboard can target the backend API.
|
|
15
|
+
|
|
3
16
|
## 0.0.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,EACL,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,EACL,UAAU,EAIX,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAiB,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAK7F,UAAU,aAAa;IACrB,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAMhD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,KAInB,CAAC,EACP,MAAM,MAAM,EACZ,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAK,EACpC,IAAI,MAAM,CAAC,KACV,CAAC,CAqCL;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,oBAAyB,SAIlD,OAAO,OAAO,QAAQ,QAAQ,YAAY,UAkM1D;AAuFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAAE,GAAG,IAAI,CA+FxG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,GAAG,IAAI,CAErD;AAGD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VisionCore, autoDetectPackageInfo, autoDetectIntegrations, } from '@getvision/core';
|
|
1
|
+
import { VisionCore, autoDetectPackageInfo, autoDetectIntegrations, runInTraceContext, } from '@getvision/core';
|
|
2
2
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
3
3
|
import { generateZodTemplate } from './zod-utils';
|
|
4
4
|
const visionContext = new AsyncLocalStorage();
|
|
@@ -213,7 +213,10 @@ export function visionMiddleware(options = {}) {
|
|
|
213
213
|
try {
|
|
214
214
|
// Run handler in AsyncLocalStorage context with rootSpanId
|
|
215
215
|
visionContext.run({ vision, traceId: trace.id, rootSpanId: rootSpan.id }, () => {
|
|
216
|
-
|
|
216
|
+
// Also set the core trace context so ConsoleInterceptor can pick it up
|
|
217
|
+
runInTraceContext(trace.id, () => {
|
|
218
|
+
next();
|
|
219
|
+
});
|
|
217
220
|
});
|
|
218
221
|
}
|
|
219
222
|
catch (error) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
VisionCore,
|
|
4
4
|
autoDetectPackageInfo,
|
|
5
5
|
autoDetectIntegrations,
|
|
6
|
+
runInTraceContext,
|
|
6
7
|
} from '@getvision/core'
|
|
7
8
|
import type { RouteMetadata, VisionExpressOptions, ServiceDefinition } from '@getvision/core'
|
|
8
9
|
import { AsyncLocalStorage } from 'async_hooks'
|
|
@@ -267,7 +268,10 @@ export function visionMiddleware(options: VisionExpressOptions = {}) {
|
|
|
267
268
|
try {
|
|
268
269
|
// Run handler in AsyncLocalStorage context with rootSpanId
|
|
269
270
|
visionContext.run({ vision, traceId: trace.id, rootSpanId: rootSpan.id }, () => {
|
|
270
|
-
|
|
271
|
+
// Also set the core trace context so ConsoleInterceptor can pick it up
|
|
272
|
+
runInTraceContext(trace.id, () => {
|
|
273
|
+
next()
|
|
274
|
+
})
|
|
271
275
|
})
|
|
272
276
|
} catch (error) {
|
|
273
277
|
// Track error in span
|