Socket
Socket
Sign inDemoInstall

@cardstack/sftp

Package Overview
Dependencies
Maintainers
5
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardstack/sftp

The default blueprint for ember-cli addons.


Version published
Weekly downloads
4
increased by33.33%
Maintainers
5
Weekly downloads
 
Created
Source

@cardstack/sftp

SFTP data source that allows for reading files from and SFTP server. Currently only implements a searcher.

To use, add a data source to your app:

factory.addResource('data-sources', 'sftp')
  .withAttributes({
    'source-type': '@cardstack/sftp',
    params: {
      contentType: 'sftp-files',
      connection: {
        host: '1.2.3.4',
        port: 22,
        username: 'someuser',
        privateKey: require('fs').readFileSync('/path/to/private/key')
      }
    }
  });

Config is passed through to ssh2 so see there if you want different connection options.

What you pass to the contentType option is the name of the content type that is created. So if you pass sftp-files, your files are accessible at e.g. /api/sftp-files/foo.jpg

Normal grants are respected.

Use url encoding to access non-root-level files, e.g. if you want to access foo/bar.jpg:

/api/sftp-files/foo%2fbar.jpg

Installation

ember install @cardstack/sftp

Usage

[Longer description of how to use the addon in apps.]

Contributing

Installation

  • git clone <repository-url>
  • cd @cardstack/sftp
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 30 Mar 2020

Did you know?

Socket

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.

Install

Related posts

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