@bring-it/sftp
Version:
SFTP deployment tool for frontend
1 lines • 767 B
JavaScript
export const __webpack_id__=497;export const __webpack_ids__=[497];export const __webpack_modules__={7497:(e,o,n)=>{n.d(o,{SSH:()=>c});var t=n(4562),s=n(5605);function c({user:e,hostname:o,port:n,key:c},i){const r=new t.H;return r.connect({host:o,port:n,username:e,tryKeyboard:!1,keepaliveInterval:3e4,...c.startsWith("-----BEGIN RSA PRIVATE KEY-----")?{privateKey:c}:{privateKeyPath:c}}).then(()=>{s.v.info("Connection:","start"),r.connection.on("error",e=>{process.exitCode=1,s.v.fail(e.message),r.dispose()}),r.connection.on("end",()=>{s.v.info("Connection:","end")}),r.connection.on("close",()=>{s.v.info("Connection:","close"),process.exit()})}).then(()=>i(r)).catch(e=>{process.exitCode=1,setTimeout(()=>{s.v.fail(e.message)},0)}).finally(()=>{r.dispose()})}}};