File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @macalinao/coda " : patch
3+ ---
4+
5+ Add coda idl command for printing the underlying codama IDL
Original file line number Diff line number Diff line change @@ -130,4 +130,23 @@ program
130130 }
131131 } ) ;
132132
133+ program
134+ . command ( "idl" )
135+ . description ( "Print the Codama IDL to stdout" )
136+ . option (
137+ "-c, --config <path>" ,
138+ "Path to coda.config.mjs file" ,
139+ "./coda.config.mjs" ,
140+ )
141+ . action ( async ( options : { config : string } ) => {
142+ try {
143+ const { codama } = await processIdls ( options ) ;
144+ const root = codama . getRoot ( ) ;
145+ console . log ( JSON . stringify ( root , null , 2 ) ) ;
146+ } catch ( error ) {
147+ console . error ( "Error printing IDL:" , error ) ;
148+ process . exit ( 1 ) ;
149+ }
150+ } ) ;
151+
133152program . parse ( ) ;
You can’t perform that action at this time.
0 commit comments