File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 "./service-worker" : " ./dist/_entries/service-worker.mjs" ,
2424 "./node" : " ./dist/_entries/node.mjs" ,
2525 "./generic" : " ./dist/_entries/generic.mjs" ,
26- "./tracing" : {
27- "types" : " ./dist/tracing.d.mts" ,
28- "default" : " ./dist/tracing.mjs"
29- }
26+ "./tracing" : " ./dist/tracing.mjs"
3027 },
3128 "types" : " ./dist/_entries/generic.d.mts" ,
3229 "files" : [
Original file line number Diff line number Diff line change 11import type { H3Event } from "./event.ts" ;
2+ import type { H3 } from "./h3.ts" ;
23import {
3- definePlugin ,
44 type H3Plugin ,
55 type H3Route ,
66 type MiddlewareOptions ,
@@ -35,8 +35,9 @@ export interface TracingPluginOptions {
3535/**
3636 * Enables tracing for H3 apps.
3737 */
38- export const tracingPlugin : ( traceOpts ?: TracingPluginOptions ) => H3Plugin =
39- definePlugin ( ( h3 , traceOpts ?: TracingPluginOptions ) => {
38+ export function tracingPlugin ( traceOpts ?: TracingPluginOptions ) : H3Plugin {
39+ // TODO: Support H3Core (Nitro)
40+ return ( h3 : H3 ) => {
4041 const { tracingChannel } =
4142 globalThis . process . getBuiltinModule ?.( "diagnostics_channel" ) ?? { } ;
4243
@@ -149,4 +150,5 @@ export const tracingPlugin: (traceOpts?: TracingPluginOptions) => H3Plugin =
149150 } ;
150151
151152 return h3 ;
152- } ) ;
153+ } ;
154+ }
You can’t perform that action at this time.
0 commit comments