File tree Expand file tree Collapse file tree
packages/devframe/src/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -861,6 +861,17 @@ export function createInstanceShell<TContext extends DevframeNodeContext>(
861861 }
862862 }
863863
864+ function addLocalMethodHints ( meta : ConnectionMeta ) : void {
865+ if ( tier === 'external' || meta . backend === 'none' )
866+ return
867+ // Routes retain this descriptor. Read the registry on discovery so it
868+ // includes methods registered after startup.
869+ Object . defineProperty ( meta , 'jsonSerializableMethods' , {
870+ enumerable : true ,
871+ get : ( ) => getJsonSerializableMethods ( ctx . rpc ) ,
872+ } )
873+ }
874+
864875 async function init ( ) : Promise < void > {
865876 const result = await options . init ( api )
866877 ctx = result . context
@@ -913,14 +924,7 @@ export function createInstanceShell<TContext extends DevframeNodeContext>(
913924 : { } ) ,
914925 }
915926
916- // Routes retain this descriptor. Read the registry on discovery so it
917- // includes methods registered after startup. External relays own theirs.
918- if ( tier !== 'external' && ( wsAvailable || sseEnabled ) ) {
919- Object . defineProperty ( meta , 'jsonSerializableMethods' , {
920- enumerable : true ,
921- get : ( ) => getJsonSerializableMethods ( ctx . rpc ) ,
922- } )
923- }
927+ addLocalMethodHints ( meta )
924928
925929 // Whatever `setup(ctx)` wrote to `ctx.staticConfig` during
926930 // `options.init(api)` (e.g. a hub aggregating each installed devframe's
You can’t perform that action at this time.
0 commit comments