import * as tr from "text-runner" ; export default function textrunnerCommand ( action ) { const documented = action . region . text ( ) . replace ( "text-run " , "" ) ; action . name ( `Text-Runner command: ${ documented }` ) ; const existing = Object . keys ( tr . commands ) . map ( s => s . toLowerCase ( ) ) ; if ( ! existing . includes ( documented ) ) { throw new tr . UserError ( `No text-run command: ${ documented }` , `Commands are: ${ existing . join ( ", " ) }` , action . location ) ; } }