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

@jalsoedesign/dockline-sftp-client

v1.0.2

Published

SFTP transfer client and host trust utilities for Dockline

Readme

Read the documentation

@jalsoedesign/dockline-sftp-client

SFTP, SSH authentication and explicit host trust for Dockline, backed by ssh2-sftp-client. Use this client directly or alongside @jalsoedesign/dockline-core for the common Dockline API and local file helpers.

The client depends on @jalsoedesign/dockline-abstract and its own SSH/SFTP transport stack. It does not require core, the FTP client or basic-ftp.

Installation

For a source build, follow the compiler guide.

Choose the installation matching your API:

npm install @jalsoedesign/dockline-core @jalsoedesign/dockline-sftp-client

For only the direct client:

npm install @jalsoedesign/dockline-sftp-client

Use the client directly

Obtain the server's OpenSSH SHA256:… fingerprint from your administrator or another trusted source, then supply it through SFTP_SHA256:

import {createConnector} from '@jalsoedesign/dockline-sftp-client';

const fingerprint = process.env.SFTP_SHA256;

if (!fingerprint) {
    throw new Error('Supply the independently verified SFTP_SHA256 fingerprint');
}

const connector = createConnector({
    protocol: 'sftp',
    host: 'sftp.example.com',
    username: 'deploy',
    password: process.env.SFTP_PASSWORD,
    root: '/uploads',
    requireTrustPolicy: true,
    hasTrustPolicy: challenge => challenge.fingerprint === fingerprint,
    acceptTrustPolicy: () => false,
});

try {
    await connector.connect();

    for await (const entry of connector.list('.', {deep: false})) {
        console.log(entry.path, entry.type);
    }
} finally {
    await connector.disconnect();
}

Supply your actual server settings and credentials. Port 22 is the default. This fixed-host example rejects unfamiliar or changed keys. When requireTrustPolicy is true, both hooks are required. Shared lookups for multiple destinations should compare host and port as well as the key.

The established new SftpConnector(SftpConnectorConfig) constructor remains available with low-level port and initialPath fields. Direct paths retain their low-level semantics. Core supplies the relative-path convenience layer and uploadFile()/downloadFile().

Authentication and remembered trust

The client supports passwords, private keys, selected SSH agents, application credential providers and keyboard-interactive responses. It does not choose a CLI, UI or vault. Host policy callbacks decide whether to accept an identity; KnownHostsStore can remember only explicitly approved decisions.

import {KnownHostsStore} from '@jalsoedesign/dockline-sftp-client';

KnownHostsStore is owned by this client and is not re-exported from core. See host trust for persisted approval and changed-key handling.

Size is unlimited by default; configure maxBytes when a transfer needs a cap. Timeouts, cancellation, streams, progress, retry controls and explicit publication guarantees share the abstract contracts. Consume returned streams before closing the session.

See Quick start SFTP for connection, downloads, uploads and everyday operations through core. Read SSH options, API and errors for direct-client details.

PuTTY key files

PuTTY PPK v3 keys are accepted directly through privateKeyPath, privateKey or a credential provider, with passphrase for encrypted keys. RSA, DSA, Ed25519 and ECDSA keys are supported, including Argon2d/i/id encryption. Conversion and integrity verification happen in memory; no decrypted key file is written. See key formats and resource limits.

Concurrent directory creation

createDirectory() creates missing parents and tolerates another session creating the same directory concurrently. When mkdir reports a collision, Dockline rechecks that exact path and proceeds only if it is a directory. Files, symbolic-link collisions, unverified results and genuine permission failures still fail. The complete parent chain shares one operation timeout and cancellation signal. createDirectoryExclusive() still requires a newly created directory and does not accept an existing one.