UNPKG

@bring-it/sftp

Version:
1 lines 3.33 kB
import{createRequire as e}from"node:module";import*as r from"globby";var t,o,s={181:r=>{r.exports=e(import.meta.url)("buffer")},406:r=>{r.exports=e(import.meta.url)("./crypto/build/Release/sshcrypto.node")},857:r=>{r.exports=e(import.meta.url)("os")},1086:(e,r,t)=>{t.d(r,{I:()=>o});const o={cwd:".bring-it",conf:".ssh/config"}},1455:r=>{r.exports=e(import.meta.url)("node:fs/promises")},1708:r=>{r.exports=e(import.meta.url)("node:process")},2203:r=>{r.exports=e(import.meta.url)("stream")},2250:r=>{r.exports=e(import.meta.url)("dns")},2613:r=>{r.exports=e(import.meta.url)("assert")},3024:r=>{r.exports=e(import.meta.url)("node:fs")},3106:r=>{r.exports=e(import.meta.url)("zlib")},4434:r=>{r.exports=e(import.meta.url)("events")},4573:r=>{r.exports=e(import.meta.url)("cpu-features")},4756:r=>{r.exports=e(import.meta.url)("tls")},5317:r=>{r.exports=e(import.meta.url)("child_process")},5692:r=>{r.exports=e(import.meta.url)("https")},6760:r=>{r.exports=e(import.meta.url)("node:path")},6928:r=>{r.exports=e(import.meta.url)("path")},6982:r=>{r.exports=e(import.meta.url)("crypto")},7066:r=>{r.exports=e(import.meta.url)("node:tty")},8161:r=>{r.exports=e(import.meta.url)("node:os")},8373:(e,t,o)=>{var s,p;e.exports=(s={globby:()=>r.globby},p={},o.d(p,s),p)},8611:r=>{r.exports=e(import.meta.url)("http")},9023:r=>{r.exports=e(import.meta.url)("util")},9278:r=>{r.exports=e(import.meta.url)("net")},9896:r=>{r.exports=e(import.meta.url)("fs")}},p={};function i(e){var r=p[e];if(void 0!==r)return r.exports;var t=p[e]={id:e,loaded:!1,exports:{}};return s[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}i.m=s,i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((r,t)=>(i.f[t](e,r),r),[])),i.u=e=>e+".mjs",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t={599:0},o=e=>{var r,o,{__webpack_ids__:s,__webpack_modules__:p,__webpack_runtime__:a}=e,m=0;for(r in p)i.o(p,r)&&(i.m[r]=p[r]);for(a&&a(i);m<s.length;m++)o=s[m],i.o(t,o)&&t[o]&&t[o][0](),t[s[m]]=0},i.f.j=(e,r)=>{var s=i.o(t,e)?t[e]:void 0;if(0!==s)if(s)r.push(s[1]);else{var p=import("./"+i.u(e)).then(o,r=>{throw 0!==t[e]&&(t[e]=void 0),r});p=Promise.race([p,new Promise(r=>s=t[e]=[r])]),r.push(s[1]=p)}};var a={};i.d(a,{G5:()=>n,RL:()=>_,cL:()=>f,q0:()=>l});var m=i(1086);const n="sftp [server]",l="SFTP deployment command",{SSH_PRIVATE_KEY_PATH:u,ssh_private_key_path:d=u,SSH_PRIVATE_KEY:c,ssh_private_key:x=c||d}=process.env;function f(e){e.positional("server",{description:["URI as user@hostname[:port][/path]",`or Host section in '${m.I.conf}'`].join("\r\n")}).options({key:{alias:"k",description:"example: .ssh/id_*",requiresArg:!0,demand:!x}})}function _({key:e=x.trim(),server:r}){if(!r)throw new Error("Missing required positional: server");if(!e)throw new Error("Missing required argument: key");Promise.all([i.e(488),i.e(93)]).then(i.bind(i,7093)).then(({action:t})=>t({server:r,key:e})).catch(e=>{process.exitCode=1,console.error(e)})}const h=a.cL,b=a.G5,v=a.q0,y=a.RL;export{h as builder,b as command,v as describe,y as handler};