Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@types/jsftp
Advanced tools
Readme
npm install --save @types/jsftp
This package contains type definitions for jsftp (https://github.com/sergi/jsftp).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsftp.
/// <reference types="node" />
import { EventEmitter } from "events";
import { Socket } from "net";
export interface JsftpOpts {
host?: string | undefined;
port?: number | undefined;
user?: string | undefined;
pass?: string | undefined;
createSocket?: (({ port, host }: { port: number; host: string }, firstAction: () => {}) => Socket) | undefined;
useList?: boolean | undefined;
}
export type ErrorCallback = (err: Error) => void;
export type RawCallback = (err: Error, data: { code: number; text: string }) => void;
export type ListCallback = (err: Error, dirContents: string) => void;
export type GetCallback = (err: Error, socket: Socket) => void;
export type LsCallback = (err: Error, res: [{ name: string }]) => void;
export default class Ftp extends EventEmitter {
constructor(opts: JsftpOpts);
ls(filePath: string, callback: LsCallback): void;
list(filePath: string, callback: ListCallback): void;
get(remotePath: string, callback: GetCallback): void;
get(remotePath: string, localPath: string, callback: ErrorCallback): void;
put(source: string | Buffer | NodeJS.ReadableStream, remotePath: string, callback: ErrorCallback): void;
rename(from: string, to: string, callback: ErrorCallback): void;
// Ftp.raw(command, params, callback)
raw(command: string, callback: RawCallback): void;
raw(command: string, arg1: any, callback: RawCallback): void;
raw(command: string, arg1: any, arg2: any, callback: RawCallback): void;
raw(command: string, arg1: any, arg2: any, arg3: any, callback: RawCallback): void;
raw(command: string, arg1: any, arg2: any, arg3: any, arg4: any, callback: RawCallback): void;
auth(user: string, pass: string, callback: RawCallback): void;
keepAlive(timeInMs?: number): void;
destroy(): void;
}
These definitions were written by Konrad Księski.
FAQs
TypeScript definitions for jsftp
The npm package @types/jsftp receives a total of 212,339 weekly downloads. As such, @types/jsftp popularity was classified as popular.
We found that @types/jsftp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.