file copyright author Vivek M. Chawla <@VivekMChawla>
 *  requires summary description version license import { SfdxFalconDebug } from '../sfdx-falcon-debug' ; const dbgNs = 'VALIDATOR:git:' ; const gitUriRegEx = /(^(git|ssh|http(s)?)|(git@[\w\.]+))(:(\/\/)?)([\w\.@\:\/\-~]+)(\.git)(\/)?$/ ; function param { string } gitRemoteUri returns { boolean } version description export function isGitUriValid ( gitRemoteUri , acceptedProtocols ? ) { SfdxFalconDebug . obj ( `${ dbgNs }isGitUriValid:` , arguments , `isGitUriValid:arguments: ` ) ; if ( typeof gitRemoteUri !== 'string' ) { throw new TypeError ( 'ERROR_UNEXPECTED_TYPE' ) ; } if ( gitUriRegEx . test ( gitRemoteUri ) ) { if ( acceptedProtocols ) { return ( acceptedProtocols . test ( gitRemoteUri ) ) ; } else { return true ; } } return false ; }