npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ficsysfr/nestjs_module_factorydrive-sftp

v2.0.1

Published

SFTP driver for @ficsysfr/nestjs_module_factorydrive

Readme

SFTP driver for Factory drive module

SFTP driver for Factory drive module from NestJS framework

Installation

Install both packages with your favorite package manager.

# npm
npm install @ficsysfr/nestjs_module_factorydrive @ficsysfr/nestjs_module_factorydrive-sftp
# yarn
yarn add @ficsysfr/nestjs_module_factorydrive @ficsysfr/nestjs_module_factorydrive-sftp
# pnpm
pnpm add @ficsysfr/nestjs_module_factorydrive @ficsysfr/nestjs_module_factorydrive-sftp
# bun
bun add @ficsysfr/nestjs_module_factorydrive @ficsysfr/nestjs_module_factorydrive-sftp

Configure a disk and register the driver

Declare the SFTP disk in FactorydriveModule.forRoot() (or forRootAsync()), then register the sftp driver key in the module constructor. Disks are connected during onModuleInit, after the driver has been registered.

import { Module } from '@nestjs/common'
import { FactorydriveModule, FactorydriveService } from '@ficsysfr/nestjs_module_factorydrive'
import { SFTPStorage } from '@ficsysfr/nestjs_module_factorydrive-sftp'

@Module({
  imports: [
    FactorydriveModule.forRoot({
      default: 'remote',
      disks: {
        remote: {
          driver: 'sftp',
          config: {
            root: '/var/www/storage',
            options: {
              host: 'sftp.example.com',
              port: 22,
              username: 'my-user',
              password: process.env.SFTP_PASSWORD,
            },
          },
        },
      },
    }),
  ],
})
export class AppModule {
  public constructor(storage: FactorydriveService) {
    storage.registerDriver('sftp', SFTPStorage)
  }
}

Example operations

const disk = this.storage.getDisk('remote')

// A string is written as file content.
await disk.put('documents/report.txt', 'Hello from SFTP storage')
const exists = await disk.exists('documents/report.txt')
const content = await disk.get('documents/report.txt')

console.log({ exists: exists.exists, content: content.content })

Errors

SFTP failures are mapped to the Factorydrive exceptions: a missing file (SFTP status 2 / ENOENT) raises FileNotFoundException, a denied access (SFTP status 3 / EACCES) raises PermissionMissingException, and anything else raises UnknownException with the original code. getStream() reports these errors on the returned stream.

Development

This repository uses Yarn 1.22.22, Biome, Vitest, and TypeScript:

yarn install --frozen-lockfile
yarn lint
yarn typecheck
yarn test
yarn test:coverage
yarn build
yarn package:check

Use make check for every local quality gate, yarn package or make package for the audited tarball under .artifacts/npm/, make release VERSION=2.0.1 CHANNEL=latest to prepare the manifest and CHANGELOG locally, and make release-ci VERSION=2.0.1 CHANNEL=latest WATCH=1 to dispatch the release workflow.

License

Apache-2.0, see LICENSE. Copyright 2026 FicSys.

Versions up to and including 2.0.0 were published under the MIT License and remain available under those terms.