Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@activepieces/piece-sftp

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@activepieces/piece-sftp - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

11

package.json
{
"name": "@activepieces/piece-sftp",
"version": "0.1.5",
"version": "0.2.0",
"dependencies": {

@@ -10,8 +10,9 @@ "@sinclair/typebox": "^0.26.3",

"nanoid": "^3.3.4",
"semver": "7.5.3",
"object-sizeof": "^2.6.3",
"semver": "7.5.4",
"ssh2-sftp-client": "^9.1.0",
"@activepieces/pieces-common": "0.2.2",
"@activepieces/pieces-framework": "0.6.10",
"@activepieces/shared": "0.6.4",
"tslib": "1.14.1"
"@activepieces/pieces-framework": "0.6.12",
"@activepieces/shared": "0.7.2",
"tslib": "2.6.1"
},

@@ -18,0 +19,0 @@ "main": "./src/index.js",

@@ -8,3 +8,2 @@ export declare const readFileContent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<true, {

filePath: import("@activepieces/pieces-framework").ShortTextProperty<true>;
outputFormat: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
}>;

@@ -17,22 +17,6 @@ "use strict";

required: true
}),
outputFormat: pieces_framework_1.Property.StaticDropdown({
displayName: 'Output Format',
required: true,
defaultValue: 'base64',
options: {
options: [
{
value: 'Text',
label: 'utf8'
},
{
value: 'base64',
label: 'Base64'
}
]
}
})
},
run(context) {
var _a;
return tslib_1.__awaiter(this, void 0, void 0, function* () {

@@ -50,5 +34,9 @@ const { host, port, username, password } = context.auth;

const fileContent = yield sftp.get(filePath);
const fileName = (_a = filePath.split('/').pop()) !== null && _a !== void 0 ? _a : filePath;
yield sftp.end();
return {
base64: fileContent.toString(context.propsValue.outputFormat === 'base64' ? 'base64' : 'utf8')
file: yield context.files.write({
fileName: fileName,
data: fileContent,
})
};

@@ -55,0 +43,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc