Socket
Socket
Sign inDemoInstall

node-scp

Package Overview
Dependencies
20
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.16 to 0.0.17

7

lib/index.d.ts

@@ -5,2 +5,3 @@ /// <reference types="node" />

import { Stats } from 'ssh2-streams';
import { TransferOptions, InputAttributes } from 'ssh2-streams';
export declare type TScpOptions = ConnectConfig & {

@@ -16,4 +17,4 @@ remoteOsType?: 'posix' | 'win32';

constructor(options: TScpOptions);
uploadFile(localPath: string, remotePath: string): Promise<void>;
downloadFile(remotePath: string, localPath: string): Promise<void>;
uploadFile(localPath: string, remotePath: string, options?: TransferOptions): Promise<void>;
downloadFile(remotePath: string, localPath: string, options?: TransferOptions): Promise<void>;
emptyDir(dir: string): Promise<void>;

@@ -26,3 +27,3 @@ uploadDir(src: string, dest: string): Promise<void>;

rmdir(remotePath: string): Promise<void>;
mkdir(remotePath: string): Promise<void>;
mkdir(remotePath: string, attributes?: InputAttributes): Promise<void>;
exists(remotePath: string): Promise<string | boolean>;

@@ -29,0 +30,0 @@ close(): void;

@@ -131,3 +131,4 @@ "use strict";

}
ScpClient.prototype.uploadFile = function (localPath, remotePath) {
ScpClient.prototype.uploadFile = function (localPath, remotePath, options) {
if (options === void 0) { options = {}; }
return __awaiter(this, void 0, void 0, function () {

@@ -138,3 +139,4 @@ var _this = this;

return [2 /*return*/, new Promise(function (resolve, reject) {
_this.sftpWrapper.fastPut(localPath, remotePath, function (err) {
console.log('......', options)
_this.sftpWrapper.fastPut(localPath, remotePath, options, function (err) {
if (err) {

@@ -151,3 +153,4 @@ reject(err);

};
ScpClient.prototype.downloadFile = function (remotePath, localPath) {
ScpClient.prototype.downloadFile = function (remotePath, localPath, options) {
if (options === void 0) { options = {}; }
return __awaiter(this, void 0, void 0, function () {

@@ -158,3 +161,3 @@ var _this = this;

return [2 /*return*/, new Promise(function (resolve, reject) {
_this.sftpWrapper.fastGet(remotePath, localPath, function (err) {
_this.sftpWrapper.fastGet(remotePath, localPath, options, function (err) {
if (err) {

@@ -415,3 +418,4 @@ reject(err);

};
ScpClient.prototype.mkdir = function (remotePath) {
ScpClient.prototype.mkdir = function (remotePath, attributes) {
if (attributes === void 0) { attributes = {}; }
return __awaiter(this, void 0, void 0, function () {

@@ -422,3 +426,3 @@ var _this = this;

return [2 /*return*/, new Promise(function (resolve, reject) {
_this.sftpWrapper.mkdir(remotePath, function (err) {
_this.sftpWrapper.mkdir(remotePath, attributes, function (err) {
if (err) {

@@ -425,0 +429,0 @@ reject(err);

@@ -5,3 +5,3 @@ {

"description": "Lightweight, fast and secure SCP function for NodeJS",
"version": "0.0.16",
"version": "0.0.17",
"main": "lib/index.js",

@@ -39,3 +39,3 @@ "types": "lib/index.d.ts",

"dependencies": {
"ssh2": "^1.4.0"
"ssh2": "^1.6.0"
},

@@ -46,3 +46,3 @@ "devDependencies": {

"@types/node": "^16.0.1",
"@types/ssh2": "^0.5.47",
"@types/ssh2": "^0.5.51",
"husky": "^7.0.1",

@@ -49,0 +49,0 @@ "standard-version": "^9.3.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc