import { getToken } from './user' ; import { loggerError , loggerSuccess , getDirPath } from '@/util' ; import { loadFile , writeFile } from '@/util/file' ; description param { string } gitUrl param { string } username param { string } password return { * } const gitLabInit = async ( gitUrl , username , password ) => { if ( username && password ) { try { const { access_token } = await getToken ( gitUrl , username , password ) ; writeFile ( '.girConfig' , '.default.gitlab.config.json' , { "GIT_Lab_URL" : gitUrl , "GIT_Lab_TOKEN" : access_token } ) ; loggerSuccess ( 'Login Successful!' ) ; } catch ( error ) { loggerError ( error ) ; } } } ; export { gitLabInit , } ;