UNPKG

@ycmd/commands

Version:

LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials

11 lines (8 loc) 1.16 kB
'use strict'; var err = require('@lsk4/err'); var ycmd = require('ycmd'); var d=Object.defineProperty;var i=(r,e)=>d(r,"name",{value:e,configurable:!0});var y=i(r=>r.default||r,"undefault"),h={a:!0,E:!0,z:!0,v:!0,progress:!1,"delete-after":!0,perms:!0},x=i(({excludeNodeModules:r=!0,excludeGit:e=!0}={})=>{let t=[".DS_Store",r?null:"node_modules",e?null:".git"];return r&&t.push("node_modules"),e&&t.push(".git"),t},"rsyncExcludes"),g=i(async(r,e,{log:t,...f}={})=>{let a=x(),p=y(await import('rsync')),l={...h,...f},c=new p().flags(l).source(r).destination(e).exclude(a);return t&&t.trace("[copy]",ycmd.getShortPath(r),"~>",ycmd.getShortPath(e)),t&&t.trace("[copy]",c.command()),c.output(s=>{let n=s.toString().trim();n.includes("total size is ")||n.startsWith("building file list")||n.startsWith("done")||t&&t.trace("[copy]","[progress]",s.toString().trim());},()=>{}),c.execute((s,n,o)=>{if(s)throw t&&t.error({code:n,err:s,cmd:o}),new err.Err(s,{code:n,cmd:o});t&&t.info("[copy]",ycmd.getShortPath(r),"~>",ycmd.getShortPath(e));})},"rsync"); exports.rsync = g; exports.rsyncExcludes = x; //# sourceMappingURL=out.js.map //# sourceMappingURL=_rsync.js.map