qusly-core
TypeScript icon, indicating that this package has built-in type declarations

4.0.4 • Public • Published

Qusly-Core


Travis NPM NPM Codecov Discord Github

Qusly-Core is a powerful multi-protocol library for file transfer. Created for Qusly.

Features

Example

import { Client } from 'qusly-core';

async function main() {
  const client = new Client({ pool: 2 });

  await client.connect({
    protocol: 'ftp',
    host: 'www.example.com',
    user: 'root',
    password: 'password',
  });

  // It will handle all methods at once.
  const [documents, videos] = await Promise.all([
    client.list('/documents'),
    client.list('/videos'),
  ]);

  console.log(document, videos);

  await client.disconnect();
}

main();

Installation

$ npm install qusly-core

Documentation

Roadmap

Components

We use ssh2 and basic-ftp under the hood.

Task queue

Certain protocols such as ftp don't support handling many request at the same time. When app calls API many times from many places, handling manually these cases is very hard - you can't use await in the most cases.

What if you want to use many connections to speed up transfering files?

That's where we come in. This library supports it all thanks to the powerful task manager.

Connection pool

Allows you to:

  • Use all connections for every method
  • Use one connection to generic methods e.g. listing files and the rest for transfering files

Package Sidebar

Install

npm i qusly-core

Weekly Downloads

672

Version

4.0.4

License

MIT

Unpacked Size

1.96 MB

Total Files

21

Last publish

Collaborators

  • xnerhu