import execa from "execa" ; export const createExecaCommand = ( command , config ) => async ( params ) => execa ( command , params , config ) ; export const checkDumpNameForTag = ( name ) => { return /^[a-z_-]+@(\d+.)?.?(\d+.)?.?(\d+)$/i . test ( name ) ; } ; export const parseFlagFromGitOutput = ( str ? ) => { if ( ! str ) return "" ; const gitOutRegex = /^ (?<flag>[\!\+\*\=t]) (\[(?<summary>[a-z ]+)\])?/im ; const match = str . match ( gitOutRegex ) ; if ( ! match || ! match . groups ) return "" ; return match . groups . flag ; } ; export const GIT_FLAGS = { UP_TO_DATE : "=" , ADD : "*" , REJECT : "!" , FORCE_ADD : "+" , TAG_FORCE_ADD : "t" , REMOVE : "-" , } ;