@@ -70,7 +70,7 @@ export const rolldownGetModuleInfo = defineRpcFunction({
7070 setup : ( { cwd } ) => {
7171 return {
7272 handler : async ( { session, module } : { session : string , module : string } ) => {
73- const reader = RolldownEventsReader . get ( join ( cwd , '.rolldown' , session , 'log .json' ) )
73+ const reader = RolldownEventsReader . get ( join ( cwd , '.rolldown' , session , 'logs .json' ) )
7474 await reader . read ( )
7575 const events = reader . manager . events . filter ( event => 'module_id' in event && event . module_id === module )
7676
@@ -87,9 +87,9 @@ export const rolldownGetModuleInfo = defineRpcFunction({
8787 }
8888
8989 for ( const event of events ) {
90- if ( event . kind === 'HookLoadCallEnd' ) {
90+ if ( event . action === 'HookLoadCallEnd' ) {
9191 // TODO: use ID to pair start and end
92- const start = events . find ( e => e . kind === 'HookLoadCallStart' && e . module_id === event . module_id && e . plugin_index === event . plugin_index )
92+ const start = events . find ( e => e . action === 'HookLoadCallStart' && e . module_id === event . module_id && e . plugin_index === event . plugin_index )
9393 if ( ! start ) {
9494 console . error ( `[rolldown] Load call start not found for ${ event . event_id } ` )
9595 continue
@@ -111,10 +111,10 @@ export const rolldownGetModuleInfo = defineRpcFunction({
111111 }
112112
113113 for ( const event of events ) {
114- if ( event . kind === 'HookTransformCallEnd' ) {
114+ if ( event . action === 'HookTransformCallEnd' ) {
115115 // TODO: use ID to pair start and end
116- const start = events . find ( e => e . kind === 'HookTransformCallStart' && e . module_id === event . module_id && e . plugin_index === event . plugin_index )
117- if ( ! start || start . kind !== 'HookTransformCallStart' ) {
116+ const start = events . find ( e => e . action === 'HookTransformCallStart' && e . module_id === event . module_id && e . plugin_index === event . plugin_index )
117+ if ( ! start || start . action !== 'HookTransformCallStart' ) {
118118 console . error ( `[rolldown] Transform call start not found for ${ event . event_id } ` )
119119 continue
120120 }
@@ -147,10 +147,10 @@ export const rolldownGetModuleInfo = defineRpcFunction({
147147 }
148148
149149 for ( const event of events ) {
150- if ( event . kind === 'HookResolveIdCallEnd' ) {
150+ if ( event . action === 'HookResolveIdCallEnd' ) {
151151 // TODO: use ID to pair start and end
152- const start = events . find ( e => e . kind === 'HookResolveIdCallStart' && e . plugin_index === event . plugin_index )
153- if ( ! start || start . kind !== 'HookResolveIdCallStart' ) {
152+ const start = events . find ( e => e . action === 'HookResolveIdCallStart' && e . plugin_index === event . plugin_index )
153+ if ( ! start || start . action !== 'HookResolveIdCallStart' ) {
154154 console . error ( `[rolldown] resolveId call start not found for ${ event . event_id } ` )
155155 continue
156156 }
0 commit comments