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

ftp-service

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftp-service

A simple wrapper for a simpler FTP client surface API with pool and retry management.

  • 6.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ftp-service

A simple wrapper for a simpler FTP client surface API with pool and retry management.

GitHub license

This wrapper is directly usable with Knifecycle.

API

initFTPService(services) ⇒ Promise.<FTPService>

Instantiate the FTP service

Kind: global function
Returns: Promise.<FTPService> - A promise of the FTP service

ParamTypeDescription
servicesObjectThe services to inject
[services.ENV]ObjectAn environment object
services.FTPfunctionThe configuration object as given to basic-ftp client access method
services.FTP_CONFIGfunctionThe FTP service configuration object
[services.FTP_POOL]functionThe FTP pool configuration object as given to generic-pool.
[services.FTP_TIMEOUT]functionThe FTP service timeout as given to basic-ftp client constructor
[services.FTP_PASSWORD_ENV_NAME]functionThe environment variable name in which to pick-up the FTP password
services.logfunctionA logging function
[services.delay]functionA service to manage delays

Example

import initFTPService from 'ftp-service';
import { initDelayService } from 'common-services';

const delay = await initDelayService({
  log: console.log.bind(console),
})
const fpt = await initFTPService({
  FTP: {
    host: 'localhost',
    user: 'user',
    pasword: 'pwd',
  },
  FTP_CONFIG: { base: '' },
  ENV: process.env,
  delay,
  log: console.log.bind(console),
});

const files = await ftp.list('/');

Authors

License

MIT

Keywords

FAQs

Package last updated on 28 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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