@ycmd/commands
Version:
LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials
8 lines (6 loc) • 1.13 kB
JavaScript
import { Err } from '@lsk4/err';
import { getShortPath } from '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"),z=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]",getShortPath(r),"~>",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(s,{code:n,cmd:o});t&&t.info("[copy]",getShortPath(r),"~>",getShortPath(e));})},"rsync");
export { z as rsync, x as rsyncExcludes };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=_rsync.js.map