autotel-adapters 2.0.20 → 2.0.22
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/cloudflare.cjs +1 -1
- package/dist/cloudflare.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/elysia.cjs +1 -1
- package/dist/elysia.js +1 -1
- package/dist/express.cjs +1 -1
- package/dist/express.js +1 -1
- package/dist/fastify.cjs +1 -1
- package/dist/fastify.js +1 -1
- package/dist/hono.cjs +1 -1
- package/dist/hono.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{integration-pKawIXb6.cjs → integration-DfduKDZQ.cjs} +6 -3
- package/dist/{integration-CfkaoVmE.js → integration-jKj-jgtX.js} +6 -3
- package/dist/nestjs.cjs +7 -5
- package/dist/nestjs.js +7 -5
- package/dist/next.cjs +1 -1
- package/dist/next.js +1 -1
- package/dist/nitro.cjs +1 -1
- package/dist/nitro.js +1 -1
- package/dist/sveltekit.cjs +1 -1
- package/dist/sveltekit.js +1 -1
- package/dist/toolkit/index.cjs +1 -1
- package/dist/toolkit/index.js +1 -1
- package/package.json +2 -2
package/dist/cloudflare.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_core = require('./core.cjs');
|
|
4
4
|
let autotel = require("autotel");
|
|
5
5
|
|
package/dist/cloudflare.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, n as buildTracedOptions, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, n as buildTracedOptions, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createUseLogger, getHeader } from "./core.js";
|
|
3
3
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
|
4
4
|
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
let autotel = require("autotel");
|
|
4
4
|
let autotel_edge = require("autotel-edge");
|
|
5
5
|
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as mergeRequestLoggerOptions, f as shouldInstrumentPath, o as toRouteAdapterOptions } from "./integration-
|
|
1
|
+
import { d as mergeRequestLoggerOptions, f as shouldInstrumentPath, o as toRouteAdapterOptions } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { getRequestLogger, trace } from "autotel";
|
|
3
3
|
|
|
4
4
|
//#region src/core.ts
|
package/dist/elysia.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./toolkit/storage.cjs');
|
|
4
4
|
const require_core = require('./core.cjs');
|
|
5
5
|
let autotel = require("autotel");
|
package/dist/elysia.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage } from "./toolkit/storage.js";
|
|
3
3
|
import { getHeader } from "./core.js";
|
|
4
4
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
package/dist/express.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_core = require('./core.cjs');
|
|
4
4
|
let autotel = require("autotel");
|
|
5
5
|
let node_async_hooks = require("node:async_hooks");
|
package/dist/express.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as toRouteAdapterOptions } from "./integration-
|
|
1
|
+
import { o as toRouteAdapterOptions } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createRequestRunner, createUseLogger } from "./core.js";
|
|
3
3
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
package/dist/fastify.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_core = require('./core.cjs');
|
|
4
4
|
let autotel = require("autotel");
|
|
5
5
|
let node_async_hooks = require("node:async_hooks");
|
package/dist/fastify.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as toRouteAdapterOptions } from "./integration-
|
|
1
|
+
import { o as toRouteAdapterOptions } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createRequestRunner, createUseLogger } from "./core.js";
|
|
3
3
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
package/dist/hono.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./toolkit/storage.cjs');
|
|
4
4
|
const require_core = require('./core.cjs');
|
|
5
5
|
let autotel = require("autotel");
|
package/dist/hono.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage } from "./toolkit/storage.js";
|
|
3
3
|
import { createUseLogger } from "./core.js";
|
|
4
4
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_core = require('./core.cjs');
|
|
4
4
|
const require_next = require('./next.cjs');
|
|
5
5
|
const require_nitro = require('./nitro.cjs');
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as toRouteAdapterOptions } from "./integration-
|
|
1
|
+
import { o as toRouteAdapterOptions } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createRequestRunner, createUseLogger, getHeader, resolveAdapterConfig, shouldProbeRuntime } from "./core.js";
|
|
3
3
|
import { withAutotel } from "./next.js";
|
|
4
4
|
import { withAutotelEventHandler } from "./nitro.js";
|
|
@@ -118,7 +118,8 @@ function mergeRequestLoggerOptions(base, waitUntil) {
|
|
|
118
118
|
return {
|
|
119
119
|
...base,
|
|
120
120
|
onEmit: (snapshot) => {
|
|
121
|
-
|
|
121
|
+
const drain = userOnEmit ? Promise.resolve(userOnEmit(snapshot)) : Promise.resolve();
|
|
122
|
+
extendDeferredDrain(drain, waitUntil);
|
|
122
123
|
}
|
|
123
124
|
};
|
|
124
125
|
}
|
|
@@ -231,8 +232,10 @@ async function runWithIntegratedHandle(handle, options, fn) {
|
|
|
231
232
|
try {
|
|
232
233
|
return completeIntegratedRequest(handle, options, await handle.runWith(fn));
|
|
233
234
|
} catch (error) {
|
|
234
|
-
if (options?.autoEmit !== false)
|
|
235
|
-
|
|
235
|
+
if (options?.autoEmit !== false) {
|
|
236
|
+
if (options?.isError?.(error) === false) await handle.finish({});
|
|
237
|
+
else await handle.finish({ error: error instanceof Error ? error : new Error(String(error)) });
|
|
238
|
+
}
|
|
236
239
|
throw error;
|
|
237
240
|
}
|
|
238
241
|
}
|
|
@@ -118,7 +118,8 @@ function mergeRequestLoggerOptions(base, waitUntil) {
|
|
|
118
118
|
return {
|
|
119
119
|
...base,
|
|
120
120
|
onEmit: (snapshot) => {
|
|
121
|
-
|
|
121
|
+
const drain = userOnEmit ? Promise.resolve(userOnEmit(snapshot)) : Promise.resolve();
|
|
122
|
+
extendDeferredDrain(drain, waitUntil);
|
|
122
123
|
}
|
|
123
124
|
};
|
|
124
125
|
}
|
|
@@ -231,8 +232,10 @@ async function runWithIntegratedHandle(handle, options, fn) {
|
|
|
231
232
|
try {
|
|
232
233
|
return completeIntegratedRequest(handle, options, await handle.runWith(fn));
|
|
233
234
|
} catch (error) {
|
|
234
|
-
if (options?.autoEmit !== false)
|
|
235
|
-
|
|
235
|
+
if (options?.autoEmit !== false) {
|
|
236
|
+
if (options?.isError?.(error) === false) await handle.finish({});
|
|
237
|
+
else await handle.finish({ error: error instanceof Error ? error : new Error(String(error)) });
|
|
238
|
+
}
|
|
236
239
|
throw error;
|
|
237
240
|
}
|
|
238
241
|
}
|
package/dist/nestjs.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./toolkit/storage.cjs');
|
|
4
4
|
let autotel = require("autotel");
|
|
5
5
|
let rxjs = require("rxjs");
|
|
@@ -58,10 +58,12 @@ var AutotelInterceptor = class {
|
|
|
58
58
|
if (settled) return;
|
|
59
59
|
settled = true;
|
|
60
60
|
try {
|
|
61
|
-
if (!handle.skipped && this.options.autoEmit !== false)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
if (!handle.skipped && this.options.autoEmit !== false) {
|
|
62
|
+
if (error !== void 0) await handle.finish({ error: error instanceof Error ? error : new Error(String(error)) });
|
|
63
|
+
else {
|
|
64
|
+
const response = executionCtx.switchToHttp().getResponse();
|
|
65
|
+
await handle.finish({ status: response.statusCode });
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
} catch (finishError) {
|
|
67
69
|
reject(finishError);
|
package/dist/nestjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage } from "./toolkit/storage.js";
|
|
3
3
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
|
4
4
|
import { Observable, from, isObservable } from "rxjs";
|
|
@@ -57,10 +57,12 @@ var AutotelInterceptor = class {
|
|
|
57
57
|
if (settled) return;
|
|
58
58
|
settled = true;
|
|
59
59
|
try {
|
|
60
|
-
if (!handle.skipped && this.options.autoEmit !== false)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
if (!handle.skipped && this.options.autoEmit !== false) {
|
|
61
|
+
if (error !== void 0) await handle.finish({ error: error instanceof Error ? error : new Error(String(error)) });
|
|
62
|
+
else {
|
|
63
|
+
const response = executionCtx.switchToHttp().getResponse();
|
|
64
|
+
await handle.finish({ status: response.statusCode });
|
|
65
|
+
}
|
|
64
66
|
}
|
|
65
67
|
} catch (finishError) {
|
|
66
68
|
reject(finishError);
|
package/dist/next.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./toolkit/storage.cjs');
|
|
4
4
|
const require_core = require('./core.cjs');
|
|
5
5
|
let autotel = require("autotel");
|
package/dist/next.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, n as buildTracedOptions, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, n as buildTracedOptions, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage } from "./toolkit/storage.js";
|
|
3
3
|
import { createUseLogger, getHeader } from "./core.js";
|
|
4
4
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
package/dist/nitro.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./toolkit/storage.cjs');
|
|
4
4
|
const require_core = require('./core.cjs');
|
|
5
5
|
let autotel = require("autotel");
|
package/dist/nitro.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, n as buildTracedOptions, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, n as buildTracedOptions, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage } from "./toolkit/storage.js";
|
|
3
3
|
import { createUseLogger } from "./core.js";
|
|
4
4
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
package/dist/sveltekit.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('./integration-
|
|
2
|
+
const require_integration = require('./integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./toolkit/storage.cjs');
|
|
4
4
|
let autotel = require("autotel");
|
|
5
5
|
|
package/dist/sveltekit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-
|
|
1
|
+
import { a as runWithIntegratedHandle, i as defineFrameworkIntegration, t as applyLoggerEnrichment } from "./integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage } from "./toolkit/storage.js";
|
|
3
3
|
import { createDrainPipeline, createStructuredError, parseError } from "autotel";
|
|
4
4
|
|
package/dist/toolkit/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_integration = require('../integration-
|
|
2
|
+
const require_integration = require('../integration-DfduKDZQ.cjs');
|
|
3
3
|
const require_toolkit_storage = require('./storage.cjs');
|
|
4
4
|
let autotel_edge = require("autotel-edge");
|
|
5
5
|
|
package/dist/toolkit/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as runWithIntegratedHandle, c as createMiddlewareLogger, d as mergeRequestLoggerOptions, f as shouldInstrumentPath, g as extendDeferredDrain, h as shouldDeferEmitForResponse, i as defineFrameworkIntegration, l as getServiceForPath, m as isStreamingResponse, n as buildTracedOptions, o as toRouteAdapterOptions, p as bindStreamingResponseLifecycle, r as completeIntegratedRequest, s as attachForkToLogger, t as applyLoggerEnrichment, u as matchesRoutePattern } from "../integration-
|
|
1
|
+
import { a as runWithIntegratedHandle, c as createMiddlewareLogger, d as mergeRequestLoggerOptions, f as shouldInstrumentPath, g as extendDeferredDrain, h as shouldDeferEmitForResponse, i as defineFrameworkIntegration, l as getServiceForPath, m as isStreamingResponse, n as buildTracedOptions, o as toRouteAdapterOptions, p as bindStreamingResponseLifecycle, r as completeIntegratedRequest, s as attachForkToLogger, t as applyLoggerEnrichment, u as matchesRoutePattern } from "../integration-jKj-jgtX.js";
|
|
2
2
|
import { createLoggerStorage, createStorageForkLifecycle } from "./storage.js";
|
|
3
3
|
|
|
4
4
|
export { applyLoggerEnrichment, attachForkToLogger, bindStreamingResponseLifecycle, buildTracedOptions, completeIntegratedRequest, createLoggerStorage, createMiddlewareLogger, createStorageForkLifecycle, defineFrameworkIntegration, extendDeferredDrain, getServiceForPath, isStreamingResponse, matchesRoutePattern, mergeRequestLoggerOptions, runWithIntegratedHandle, shouldDeferEmitForResponse, shouldInstrumentPath, toRouteAdapterOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-adapters",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.22",
|
|
4
4
|
"description": "Framework adapters and composable DX helpers for autotel",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"NOTICE"
|
|
87
87
|
],
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"autotel": "7.
|
|
89
|
+
"autotel": "7.9.0",
|
|
90
90
|
"autotel-edge": "5.1.1"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|