File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export class CliCodecRaw implements CliCodec<'raw'> {
66
77 encode ( value : unknown ) : Uint8Array {
88 if ( value instanceof Uint8Array ) return value ;
9- const str = String ( value ) ;
9+ const str = String ( value ) + '\n' ;
1010 return new TextEncoder ( ) . encode ( str ) ;
1111 }
1212
Original file line number Diff line number Diff line change @@ -23,5 +23,19 @@ export const defineBuiltinRoutes = <Routes extends ObjectType<any>>(r: ObjectVal
2323 return ( ctx as CliContext ) . cli . types . exportTypes ( ) ;
2424 } ,
2525 ) ,
26+
27+ r (
28+ '.info' ,
29+ t . Function ( t . undef , t . any ) . options ( {
30+ title : 'CLI information' ,
31+ description : 'Returns whole information about this CLI.' ,
32+ } ) ,
33+ async ( request , ctx ) => {
34+ return {
35+ version : ( ctx as CliContext ) . cli . options . version ,
36+ cmd : ( ctx as CliContext ) . cli . options . cmd ,
37+ } ;
38+ } ,
39+ ) ,
2640 ] ) ;
2741} ;
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ the "--stdout" or "--out" option.
3939Usage:
4040
4141 ${ cmd } <method> '<json>'
42- echo '<json>' | ${ cmd } <method>
4342 ${ cmd } <method> --<type><pointer>=<value>
43+ echo '<json>' | ${ cmd } <method>
4444
4545Examples:
4646
You can’t perform that action at this time.
0 commit comments