Socket
Socket
Sign inDemoInstall

@vighnesh153/ftp-server

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vighnesh153/ftp-server - npm Package Compare versions

Comparing version 0.4.5-alpha01 to 0.4.5-alpha02

2

dist/cli.js

@@ -12,2 +12,2 @@ #!/usr/bin/env node

var p="__vighnesh153-ftp-client__",d=7878,A=".",g=s.join(p,"index.html");function o(e){return !e}var H={$:"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)",\u00AA:"a","\xAE":"(r)",\u00BA:"o",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00C6:"AE",\u00C7:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00DD:"Y",\u00DE:"TH",\u00DF:"ss",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00E6:"ae",\u00E7:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00FD:"y",\u00FE:"th",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u010C:"C",\u010D:"c",\u010E:"D",\u010F:"d",\u0110:"DJ",\u0111:"dj",\u0112:"E",\u0113:"e",\u0116:"E",\u0117:"e",\u0118:"e",\u0119:"e",\u011A:"E",\u011B:"e",\u011E:"G",\u011F:"g",\u0122:"G",\u0123:"g",\u0128:"I",\u0129:"i",\u012A:"i",\u012B:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0136:"k",\u0137:"k",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u0141:"L",\u0142:"l",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u014C:"O",\u014D:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",\u0154:"R",\u0155:"r",\u0158:"R",\u0159:"r",\u015A:"S",\u015B:"s",\u015E:"S",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u0164:"T",\u0165:"t",\u0168:"U",\u0169:"u",\u016A:"u",\u016B:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u018F:"E",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01C8:"LJ",\u01C9:"lj",\u01CB:"NJ",\u01CC:"nj",\u0218:"S",\u0219:"s",\u021A:"T",\u021B:"t",\u0259:"e","\u02DA":"o",\u0386:"A",\u0388:"E",\u0389:"H",\u038A:"I",\u038C:"O",\u038E:"Y",\u038F:"W",\u0390:"i",\u0391:"A",\u0392:"B",\u0393:"G",\u0394:"D",\u0395:"E",\u0396:"Z",\u0397:"H",\u0398:"8",\u0399:"I",\u039A:"K",\u039B:"L",\u039C:"M",\u039D:"N",\u039E:"3",\u039F:"O",\u03A0:"P",\u03A1:"R",\u03A3:"S",\u03A4:"T",\u03A5:"Y",\u03A6:"F",\u03A7:"X",\u03A8:"PS",\u03A9:"W",\u03AA:"I",\u03AB:"Y",\u03AC:"a",\u03AD:"e",\u03AE:"h",\u03AF:"i",\u03B0:"y",\u03B1:"a",\u03B2:"b",\u03B3:"g",\u03B4:"d",\u03B5:"e",\u03B6:"z",\u03B7:"h",\u03B8:"8",\u03B9:"i",\u03BA:"k",\u03BB:"l",\u03BC:"m",\u03BD:"n",\u03BE:"3",\u03BF:"o",\u03C0:"p",\u03C1:"r",\u03C2:"s",\u03C3:"s",\u03C4:"t",\u03C5:"y",\u03C6:"f",\u03C7:"x",\u03C8:"ps",\u03C9:"w",\u03CA:"i",\u03CB:"y",\u03CC:"o",\u03CD:"y",\u03CE:"w",\u0401:"Yo",\u0402:"DJ",\u0404:"Ye",\u0406:"I",\u0407:"Yi",\u0408:"J",\u0409:"LJ",\u040A:"NJ",\u040B:"C",\u040F:"DZ",\u0410:"A",\u0411:"B",\u0412:"V",\u0413:"G",\u0414:"D",\u0415:"E",\u0416:"Zh",\u0417:"Z",\u0418:"I",\u0419:"J",\u041A:"K",\u041B:"L",\u041C:"M",\u041D:"N",\u041E:"O",\u041F:"P",\u0420:"R",\u0421:"S",\u0422:"T",\u0423:"U",\u0424:"F",\u0425:"H",\u0426:"C",\u0427:"Ch",\u0428:"Sh",\u0429:"Sh",\u042A:"U",\u042B:"Y",\u042C:"",\u042D:"E",\u042E:"Yu",\u042F:"Ya",\u0430:"a",\u0431:"b",\u0432:"v",\u0433:"g",\u0434:"d",\u0435:"e",\u0436:"zh",\u0437:"z",\u0438:"i",\u0439:"j",\u043A:"k",\u043B:"l",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"p",\u0440:"r",\u0441:"s",\u0442:"t",\u0443:"u",\u0444:"f",\u0445:"h",\u0446:"c",\u0447:"ch",\u0448:"sh",\u0449:"sh",\u044A:"u",\u044B:"y",\u044C:"",\u044D:"e",\u044E:"yu",\u044F:"ya",\u0451:"yo",\u0452:"dj",\u0454:"ye",\u0456:"i",\u0457:"yi",\u0458:"j",\u0459:"lj",\u045A:"nj",\u045B:"c",\u045D:"u",\u045F:"dz",\u0490:"G",\u0491:"g",\u0492:"GH",\u0493:"gh",\u049A:"KH",\u049B:"kh",\u04A2:"NG",\u04A3:"ng",\u04AE:"UE",\u04AF:"ue",\u04B0:"U",\u04B1:"u",\u04BA:"H",\u04BB:"h",\u04D8:"AE",\u04D9:"ae",\u04E8:"OE",\u04E9:"oe",\u0531:"A",\u0532:"B",\u0533:"G",\u0534:"D",\u0535:"E",\u0536:"Z",\u0537:"E'",\u0538:"Y'",\u0539:"T'",\u053A:"JH",\u053B:"I",\u053C:"L",\u053D:"X",\u053E:"C'",\u053F:"K",\u0540:"H",\u0541:"D'",\u0542:"GH",\u0543:"TW",\u0544:"M",\u0545:"Y",\u0546:"N",\u0547:"SH",\u0549:"CH",\u054A:"P",\u054B:"J",\u054C:"R'",\u054D:"S",\u054E:"V",\u054F:"T",\u0550:"R",\u0551:"C",\u0553:"P'",\u0554:"Q'",\u0555:"O''",\u0556:"F",\u0587:"EV",\u0621:"a",\u0622:"aa",\u0623:"a",\u0624:"u",\u0625:"i",\u0626:"e",\u0627:"a",\u0628:"b",\u0629:"h",\u062A:"t",\u062B:"th",\u062C:"j",\u062D:"h",\u062E:"kh",\u062F:"d",\u0630:"th",\u0631:"r",\u0632:"z",\u0633:"s",\u0634:"sh",\u0635:"s",\u0636:"dh",\u0637:"t",\u0638:"z",\u0639:"a",\u063A:"gh",\u0641:"f",\u0642:"q",\u0643:"k",\u0644:"l",\u0645:"m",\u0646:"n",\u0647:"h",\u0648:"w",\u0649:"a",\u064A:"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9",\u067E:"p",\u0686:"ch",\u0698:"zh",\u06A9:"k",\u06AF:"g",\u06CC:"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht",\u10D0:"a",\u10D1:"b",\u10D2:"g",\u10D3:"d",\u10D4:"e",\u10D5:"v",\u10D6:"z",\u10D7:"t",\u10D8:"i",\u10D9:"k",\u10DA:"l",\u10DB:"m",\u10DC:"n",\u10DD:"o",\u10DE:"p",\u10DF:"zh",\u10E0:"r",\u10E1:"s",\u10E2:"t",\u10E3:"u",\u10E4:"f",\u10E5:"k",\u10E6:"gh",\u10E7:"q",\u10E8:"sh",\u10E9:"ch",\u10EA:"ts",\u10EB:"dz",\u10EC:"ts",\u10ED:"ch",\u10EE:"kh",\u10EF:"j",\u10F0:"h",\u1E62:"S",\u1E63:"s",\u1E80:"W",\u1E81:"w",\u1E82:"W",\u1E83:"w",\u1E84:"W",\u1E85:"w","\u1E9E":"SS",\u1EA0:"A",\u1EA1:"a",\u1EA2:"A",\u1EA3:"a",\u1EA4:"A",\u1EA5:"a",\u1EA6:"A",\u1EA7:"a",\u1EA8:"A",\u1EA9:"a",\u1EAA:"A",\u1EAB:"a",\u1EAC:"A",\u1EAD:"a",\u1EAE:"A",\u1EAF:"a",\u1EB0:"A",\u1EB1:"a",\u1EB2:"A",\u1EB3:"a",\u1EB4:"A",\u1EB5:"a",\u1EB6:"A",\u1EB7:"a",\u1EB8:"E",\u1EB9:"e",\u1EBA:"E",\u1EBB:"e",\u1EBC:"E",\u1EBD:"e",\u1EBE:"E",\u1EBF:"e",\u1EC0:"E",\u1EC1:"e",\u1EC2:"E",\u1EC3:"e",\u1EC4:"E",\u1EC5:"e",\u1EC6:"E",\u1EC7:"e",\u1EC8:"I",\u1EC9:"i",\u1ECA:"I",\u1ECB:"i",\u1ECC:"O",\u1ECD:"o",\u1ECE:"O",\u1ECF:"o",\u1ED0:"O",\u1ED1:"o",\u1ED2:"O",\u1ED3:"o",\u1ED4:"O",\u1ED5:"o",\u1ED6:"O",\u1ED7:"o",\u1ED8:"O",\u1ED9:"o",\u1EDA:"O",\u1EDB:"o",\u1EDC:"O",\u1EDD:"o",\u1EDE:"O",\u1EDF:"o",\u1EE0:"O",\u1EE1:"o",\u1EE2:"O",\u1EE3:"o",\u1EE4:"U",\u1EE5:"u",\u1EE6:"U",\u1EE7:"u",\u1EE8:"U",\u1EE9:"u",\u1EEA:"U",\u1EEB:"u",\u1EEC:"U",\u1EED:"u",\u1EEE:"U",\u1EEF:"u",\u1EF0:"U",\u1EF1:"u",\u1EF2:"Y",\u1EF3:"y",\u1EF4:"Y",\u1EF5:"y",\u1EF6:"Y",\u1EF7:"y",\u1EF8:"Y",\u1EF9:"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":'\\"',"\u201D":'\\"',"\u201E":'\\"',"\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love",\u5143:"yuan",\u5186:"yen","\uFDFC":"rial",\uFEF5:"laa",\uFEF7:"laa",\uFEF9:"lai",\uFEFB:"la"};new Set(Object.keys(H));function m(){return s.dirname(fileURLToPath(import.meta.url))}function D(e){return l.existsSync(e)}function h(e){return l.existsSync(e)&&l.lstatSync(e).isDirectory()}function C(e){return o(h(e))?[]:l.readdirSync(e).map(t=>{let r=s.resolve(e,t);return {name:t,type:h(r)?"directory":"file"}})}function F(e){let{directoryPath:u,port:t}=e;return ()=>{console.log(`Directory: ${s.resolve(u)}`),console.log(`Server is listening on port ${t}`),console.log(`On this machine: http://localhost:${t}/`),console.log(`On local network: http://${j.address()}:${t}/`);}}function v(e){let{port:u}=e;return t=>{if(t.code==="EADDRINUSE"){console.log(),console.log(t),console.log(),console.log(w.red(`Port ${u} already in use!`)),console.log("Please try with a different port. eg. --port=4200"),process.exit(1);return}throw t}}function b(){return B.static(m(),{immutable:!0,maxAge:"30000"})}function T(e){return (u,t,r)=>{let n=s.resolve(e,u.path.slice(1));if(D(n)){r();return}t.status(404).json({message:`This path is invalid: ${n}`});}}function S(e){return (u,t)=>{let r=s.resolve(e,`${u.query.path}`.slice(1)),n=s.basename(r),i=M("zip");i.on("end",()=>{console.log(w.green(`${i.pointer()} total bytes`));}),i.on("error",E=>{t.status(500).send({error:E});}),t.attachment(`${n}.zip`),i.pipe(t),i.directory(r,n),i.finalize().then(()=>{console.log(w.yellow("/zip: Configuration complete"));});}}function I(e){return (u,t,r)=>{let n=s.resolve(e,u.path.slice(1));if(o(h(n))){r();return}let E=l.readFileSync(s.resolve(m(),g),{encoding:"utf-8"}).replace("__REPLACEMENT__",JSON.stringify(C(n)));t.send(E);}}function O(){return (e,u)=>{u.status(405).json({message:`Method "${e.method}" is not allowed. Supported method is "GET"`});}}function x(e){return B.static(e,{dotfiles:"allow",setHeaders:u=>{u.setHeader("content-type","application/octet-stream");}})}function P(e){let{port:u,directoryPath:t}=e,r=B();r.use(G("tiny")),r.get(`/${p}*`,b()),r.get("/zip",S(t)),r.get("*",T(t)),r.get("*",I(t)),r.get("*",x(t)),r.use(O()),r.listen(u,F({directoryPath:t,port:u})).on("error",v({directoryPath:t,port:u}));}var c={name:"@vighnesh153/ftp-server",version:"0.4.4",description:"A simple ftp server cli tool for your local files",license:"MIT",type:"module",bin:"./dist/cli.js",private:!1,author:{name:"Vighnesh Raut",url:"https://vighnesh153.com",email:"me@vighnesh153.com"},publishConfig:{access:"public"},repository:{type:"git",url:"git@github.com:vighnesh153/vighnesh153-turbo.git"},scripts:{dev:"npm-run-all --parallel dev:*","dev:backend":"tsup --watch","dev:frontend":"vite",copy:"cpy --cwd=./src/client/dist . ../../../dist/__vighnesh153-ftp-client__/",build:"tsup && vite build && npm run copy"},files:["dist","README.md"],dependencies:{archiver:"^5.3.1",chalk:"^5.2.0",commander:"^10.0.1",ejs:"^3.1.9",express:"^4.18.2",ip:"^2.0.0",morgan:"^1.10.0"},devDependencies:{"@emotion/react":"^11.11.0","@emotion/styled":"^11.11.0","@mui/material":"^5.13.3","@types/archiver":"^5.3.2","@types/express":"^4.17.17","@types/ip":"^1.1.0","@types/morgan":"^1.9.4","@types/node":"*","@types/react":"^18.2.8","@types/react-dom":"^18.2.4","@vighnesh153/tsconfig":"*","@vighnesh153/utils":"*","@vitejs/plugin-react":"^4.0.0","cpy-cli":"^4.2.0","eslint-config-vighnesh153":"*","npm-run-all":"^4.1.5",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^5.1.3",vite:"^4.3.9"},keywords:["ftp","file-transfer-protocol","server","serve","directory","local","localhost","network","vighnesh153","file","transfer","protocol"]};var R=new Command;R.name(c.name).description(c.description).version(c.version).option("-p, --port <port>","port number for the ftp server",`${d}`).option("-d, --directory <path-to-directory>","directory to be served",`${A}`).parse();var Z=R.opts(),{port:V,directory:Q}=Z,X=parseInt(`${V}`,10);P({port:X,directoryPath:Q});
var p="__vighnesh153-ftp-client__",d=7878,A=".",g=s.join(p,"index.html");function o(e){return !e}var H={$:"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)",\u00AA:"a","\xAE":"(r)",\u00BA:"o",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00C6:"AE",\u00C7:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00DD:"Y",\u00DE:"TH",\u00DF:"ss",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00E6:"ae",\u00E7:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00FD:"y",\u00FE:"th",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u010C:"C",\u010D:"c",\u010E:"D",\u010F:"d",\u0110:"DJ",\u0111:"dj",\u0112:"E",\u0113:"e",\u0116:"E",\u0117:"e",\u0118:"e",\u0119:"e",\u011A:"E",\u011B:"e",\u011E:"G",\u011F:"g",\u0122:"G",\u0123:"g",\u0128:"I",\u0129:"i",\u012A:"i",\u012B:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0136:"k",\u0137:"k",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u0141:"L",\u0142:"l",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u014C:"O",\u014D:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",\u0154:"R",\u0155:"r",\u0158:"R",\u0159:"r",\u015A:"S",\u015B:"s",\u015E:"S",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u0164:"T",\u0165:"t",\u0168:"U",\u0169:"u",\u016A:"u",\u016B:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u018F:"E",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01C8:"LJ",\u01C9:"lj",\u01CB:"NJ",\u01CC:"nj",\u0218:"S",\u0219:"s",\u021A:"T",\u021B:"t",\u0259:"e","\u02DA":"o",\u0386:"A",\u0388:"E",\u0389:"H",\u038A:"I",\u038C:"O",\u038E:"Y",\u038F:"W",\u0390:"i",\u0391:"A",\u0392:"B",\u0393:"G",\u0394:"D",\u0395:"E",\u0396:"Z",\u0397:"H",\u0398:"8",\u0399:"I",\u039A:"K",\u039B:"L",\u039C:"M",\u039D:"N",\u039E:"3",\u039F:"O",\u03A0:"P",\u03A1:"R",\u03A3:"S",\u03A4:"T",\u03A5:"Y",\u03A6:"F",\u03A7:"X",\u03A8:"PS",\u03A9:"W",\u03AA:"I",\u03AB:"Y",\u03AC:"a",\u03AD:"e",\u03AE:"h",\u03AF:"i",\u03B0:"y",\u03B1:"a",\u03B2:"b",\u03B3:"g",\u03B4:"d",\u03B5:"e",\u03B6:"z",\u03B7:"h",\u03B8:"8",\u03B9:"i",\u03BA:"k",\u03BB:"l",\u03BC:"m",\u03BD:"n",\u03BE:"3",\u03BF:"o",\u03C0:"p",\u03C1:"r",\u03C2:"s",\u03C3:"s",\u03C4:"t",\u03C5:"y",\u03C6:"f",\u03C7:"x",\u03C8:"ps",\u03C9:"w",\u03CA:"i",\u03CB:"y",\u03CC:"o",\u03CD:"y",\u03CE:"w",\u0401:"Yo",\u0402:"DJ",\u0404:"Ye",\u0406:"I",\u0407:"Yi",\u0408:"J",\u0409:"LJ",\u040A:"NJ",\u040B:"C",\u040F:"DZ",\u0410:"A",\u0411:"B",\u0412:"V",\u0413:"G",\u0414:"D",\u0415:"E",\u0416:"Zh",\u0417:"Z",\u0418:"I",\u0419:"J",\u041A:"K",\u041B:"L",\u041C:"M",\u041D:"N",\u041E:"O",\u041F:"P",\u0420:"R",\u0421:"S",\u0422:"T",\u0423:"U",\u0424:"F",\u0425:"H",\u0426:"C",\u0427:"Ch",\u0428:"Sh",\u0429:"Sh",\u042A:"U",\u042B:"Y",\u042C:"",\u042D:"E",\u042E:"Yu",\u042F:"Ya",\u0430:"a",\u0431:"b",\u0432:"v",\u0433:"g",\u0434:"d",\u0435:"e",\u0436:"zh",\u0437:"z",\u0438:"i",\u0439:"j",\u043A:"k",\u043B:"l",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"p",\u0440:"r",\u0441:"s",\u0442:"t",\u0443:"u",\u0444:"f",\u0445:"h",\u0446:"c",\u0447:"ch",\u0448:"sh",\u0449:"sh",\u044A:"u",\u044B:"y",\u044C:"",\u044D:"e",\u044E:"yu",\u044F:"ya",\u0451:"yo",\u0452:"dj",\u0454:"ye",\u0456:"i",\u0457:"yi",\u0458:"j",\u0459:"lj",\u045A:"nj",\u045B:"c",\u045D:"u",\u045F:"dz",\u0490:"G",\u0491:"g",\u0492:"GH",\u0493:"gh",\u049A:"KH",\u049B:"kh",\u04A2:"NG",\u04A3:"ng",\u04AE:"UE",\u04AF:"ue",\u04B0:"U",\u04B1:"u",\u04BA:"H",\u04BB:"h",\u04D8:"AE",\u04D9:"ae",\u04E8:"OE",\u04E9:"oe",\u0531:"A",\u0532:"B",\u0533:"G",\u0534:"D",\u0535:"E",\u0536:"Z",\u0537:"E'",\u0538:"Y'",\u0539:"T'",\u053A:"JH",\u053B:"I",\u053C:"L",\u053D:"X",\u053E:"C'",\u053F:"K",\u0540:"H",\u0541:"D'",\u0542:"GH",\u0543:"TW",\u0544:"M",\u0545:"Y",\u0546:"N",\u0547:"SH",\u0549:"CH",\u054A:"P",\u054B:"J",\u054C:"R'",\u054D:"S",\u054E:"V",\u054F:"T",\u0550:"R",\u0551:"C",\u0553:"P'",\u0554:"Q'",\u0555:"O''",\u0556:"F",\u0587:"EV",\u0621:"a",\u0622:"aa",\u0623:"a",\u0624:"u",\u0625:"i",\u0626:"e",\u0627:"a",\u0628:"b",\u0629:"h",\u062A:"t",\u062B:"th",\u062C:"j",\u062D:"h",\u062E:"kh",\u062F:"d",\u0630:"th",\u0631:"r",\u0632:"z",\u0633:"s",\u0634:"sh",\u0635:"s",\u0636:"dh",\u0637:"t",\u0638:"z",\u0639:"a",\u063A:"gh",\u0641:"f",\u0642:"q",\u0643:"k",\u0644:"l",\u0645:"m",\u0646:"n",\u0647:"h",\u0648:"w",\u0649:"a",\u064A:"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9",\u067E:"p",\u0686:"ch",\u0698:"zh",\u06A9:"k",\u06AF:"g",\u06CC:"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht",\u10D0:"a",\u10D1:"b",\u10D2:"g",\u10D3:"d",\u10D4:"e",\u10D5:"v",\u10D6:"z",\u10D7:"t",\u10D8:"i",\u10D9:"k",\u10DA:"l",\u10DB:"m",\u10DC:"n",\u10DD:"o",\u10DE:"p",\u10DF:"zh",\u10E0:"r",\u10E1:"s",\u10E2:"t",\u10E3:"u",\u10E4:"f",\u10E5:"k",\u10E6:"gh",\u10E7:"q",\u10E8:"sh",\u10E9:"ch",\u10EA:"ts",\u10EB:"dz",\u10EC:"ts",\u10ED:"ch",\u10EE:"kh",\u10EF:"j",\u10F0:"h",\u1E62:"S",\u1E63:"s",\u1E80:"W",\u1E81:"w",\u1E82:"W",\u1E83:"w",\u1E84:"W",\u1E85:"w","\u1E9E":"SS",\u1EA0:"A",\u1EA1:"a",\u1EA2:"A",\u1EA3:"a",\u1EA4:"A",\u1EA5:"a",\u1EA6:"A",\u1EA7:"a",\u1EA8:"A",\u1EA9:"a",\u1EAA:"A",\u1EAB:"a",\u1EAC:"A",\u1EAD:"a",\u1EAE:"A",\u1EAF:"a",\u1EB0:"A",\u1EB1:"a",\u1EB2:"A",\u1EB3:"a",\u1EB4:"A",\u1EB5:"a",\u1EB6:"A",\u1EB7:"a",\u1EB8:"E",\u1EB9:"e",\u1EBA:"E",\u1EBB:"e",\u1EBC:"E",\u1EBD:"e",\u1EBE:"E",\u1EBF:"e",\u1EC0:"E",\u1EC1:"e",\u1EC2:"E",\u1EC3:"e",\u1EC4:"E",\u1EC5:"e",\u1EC6:"E",\u1EC7:"e",\u1EC8:"I",\u1EC9:"i",\u1ECA:"I",\u1ECB:"i",\u1ECC:"O",\u1ECD:"o",\u1ECE:"O",\u1ECF:"o",\u1ED0:"O",\u1ED1:"o",\u1ED2:"O",\u1ED3:"o",\u1ED4:"O",\u1ED5:"o",\u1ED6:"O",\u1ED7:"o",\u1ED8:"O",\u1ED9:"o",\u1EDA:"O",\u1EDB:"o",\u1EDC:"O",\u1EDD:"o",\u1EDE:"O",\u1EDF:"o",\u1EE0:"O",\u1EE1:"o",\u1EE2:"O",\u1EE3:"o",\u1EE4:"U",\u1EE5:"u",\u1EE6:"U",\u1EE7:"u",\u1EE8:"U",\u1EE9:"u",\u1EEA:"U",\u1EEB:"u",\u1EEC:"U",\u1EED:"u",\u1EEE:"U",\u1EEF:"u",\u1EF0:"U",\u1EF1:"u",\u1EF2:"Y",\u1EF3:"y",\u1EF4:"Y",\u1EF5:"y",\u1EF6:"Y",\u1EF7:"y",\u1EF8:"Y",\u1EF9:"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":'\\"',"\u201D":'\\"',"\u201E":'\\"',"\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love",\u5143:"yuan",\u5186:"yen","\uFDFC":"rial",\uFEF5:"laa",\uFEF7:"laa",\uFEF9:"lai",\uFEFB:"la"};new Set(Object.keys(H));function m(){return s.dirname(fileURLToPath(import.meta.url))}function D(e){return l.existsSync(e)}function h(e){return l.existsSync(e)&&l.lstatSync(e).isDirectory()}function C(e){return o(h(e))?[]:l.readdirSync(e).map(t=>{let r=s.resolve(e,t);return {name:t,type:h(r)?"directory":"file"}})}function F(e){let{directoryPath:u,port:t}=e;return ()=>{console.log(`Directory: ${s.resolve(u)}`),console.log(`Server is listening on port ${t}`),console.log(`On this machine: http://localhost:${t}/`),console.log(`On local network: http://${j.address()}:${t}/`);}}function v(e){let{port:u}=e;return t=>{if(t.code==="EADDRINUSE"){console.log(),console.log(t),console.log(),console.log(w.red(`Port ${u} already in use!`)),console.log("Please try with a different port. eg. --port=4200"),process.exit(1);return}throw t}}function b(){return B.static(m(),{immutable:!0,maxAge:"30000"})}function T(e){return (u,t,r)=>{let n=s.resolve(e,u.path.slice(1));if(D(n)){r();return}t.status(404).json({message:`This path is invalid: ${n}`});}}function S(e){return (u,t)=>{let r=s.resolve(e,`${u.query.path}`.slice(1)),n=s.basename(r),i=M("zip");i.on("end",()=>{console.log(w.green(`${i.pointer()} total bytes`));}),i.on("error",E=>{t.status(500).send({error:E});}),t.attachment(`${n}.zip`),i.pipe(t),i.directory(r,n),i.finalize().then(()=>{console.log(w.yellow("/zip: Configuration complete"));});}}function I(e){return (u,t,r)=>{let n=s.resolve(e,u.path.slice(1));if(o(h(n))){r();return}let E=l.readFileSync(s.resolve(m(),g),{encoding:"utf-8"}).replace("__REPLACEMENT__",JSON.stringify(C(n)));t.send(E);}}function O(){return (e,u)=>{u.status(405).json({message:`Method "${e.method}" is not allowed. Supported method is "GET"`});}}function x(e){return B.static(e,{dotfiles:"allow",setHeaders:u=>{u.setHeader("content-type","application/octet-stream");}})}function P(e){let{port:u,directoryPath:t}=e,r=B();r.use(G("tiny")),r.get(`/${p}*`,b()),r.get("/zip",S(t)),r.get("*",T(t)),r.get("*",I(t)),r.get("*",x(t)),r.use(O()),r.listen(u,F({directoryPath:t,port:u})).on("error",v({directoryPath:t,port:u}));}var c={name:"@vighnesh153/ftp-server",version:"0.4.5-alpha01",description:"A simple ftp server cli tool for your local files",license:"MIT",type:"module",bin:"./dist/cli.js",private:!1,author:{name:"Vighnesh Raut",url:"https://vighnesh153.com",email:"me@vighnesh153.com"},publishConfig:{access:"public"},repository:{type:"git",url:"git@github.com:vighnesh153/vighnesh153-turbo.git"},scripts:{dev:"npm-run-all --parallel dev:*","dev:backend":"tsup --watch","dev:frontend":"vite",copy:"cpy --cwd=./src/client/dist . ../../../dist/__vighnesh153-ftp-client__/",build:"tsup && vite build && npm run copy"},files:["dist","README.md"],dependencies:{archiver:"^5.3.1",chalk:"^5.2.0",commander:"^10.0.1",ejs:"^3.1.9",express:"^4.18.2",ip:"^2.0.0",morgan:"^1.10.0"},devDependencies:{"@emotion/react":"^11.11.0","@emotion/styled":"^11.11.0","@mui/material":"^5.13.3","@types/archiver":"^5.3.2","@types/express":"^4.17.17","@types/ip":"^1.1.0","@types/morgan":"^1.9.4","@types/node":"*","@types/react":"^18.2.8","@types/react-dom":"^18.2.4","@vighnesh153/tsconfig":"*","@vighnesh153/utils":"*","@vitejs/plugin-react":"^4.0.0","cpy-cli":"^4.2.0","eslint-config-vighnesh153":"*","npm-run-all":"^4.1.5",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^5.1.3",vite:"^4.3.9"},keywords:["ftp","file-transfer-protocol","server","serve","directory","local","localhost","network","vighnesh153","file","transfer","protocol"]};var R=new Command;R.name(c.name).description(c.description).version(c.version).option("-p, --port <port>","port number for the ftp server",`${d}`).option("-d, --directory <path-to-directory>","directory to be served",`${A}`).parse();var Z=R.opts(),{port:V,directory:Q}=Z,X=parseInt(`${V}`,10);P({port:X,directoryPath:Q});
{
"name": "@vighnesh153/ftp-server",
"version": "0.4.5-alpha01",
"version": "0.4.5-alpha02",
"description": "A simple ftp server cli tool for your local files",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc