Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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.1 to 0.4.2

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}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.1-alpha-01",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.0",ejs:"^3.1.9",express:"^4.18.2",ip:"^2.0.0",morgan:"^1.10.0"},devDependencies:{"@emotion/react":"^11.10.6","@emotion/styled":"^11.10.6","@mui/material":"^5.11.15","@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.0.31","@types/react-dom":"^18.0.11","@vighnesh153/tsconfig":"*","@vighnesh153/utils":"*","@vitejs/plugin-react":"^3.1.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.0.3",vite:"^4.2.1"},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}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.2",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.0",ejs:"^3.1.9",express:"^4.18.2",ip:"^2.0.0",morgan:"^1.10.0"},devDependencies:{"@emotion/react":"^11.10.6","@emotion/styled":"^11.10.6","@mui/material":"^5.11.15","@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.0.31","@types/react-dom":"^18.0.11","@vighnesh153/tsconfig":"*","@vighnesh153/utils":"*","@vitejs/plugin-react":"^3.1.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.0.3",vite:"^4.2.1"},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.1",
"version": "0.4.2",
"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