Giter VIP home page Giter VIP logo

nest-sftp's People

Contributors

benmain avatar dependabot[bot] avatar semantic-release-bot avatar vflumeris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nest-sftp's Issues

NestJS 10+

Hi,
Any plan to update the dependencies? Is it safe to install with force?

Getting:

npm ERR! nest-sftp@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

NPM Audit shows unfixable high vulerabilities

Dear Maintainer,
my audit log shows a certain amount of unfixable high vulnerabilities, may I ask you to fix these ?

npm audit report

axios <=0.21.1
Severity: high
Incorrect Comparison in axios - GHSA-cph5-m8f7-6c5x
fix available via npm audit fix
node_modules/nest-sftp/node_modules/axios
@nestjs/common 4.6.0 - 8.0.6
Depends on vulnerable versions of axios
node_modules/nest-sftp/node_modules/@nestjs/common
@nestjs/core <=2.0.2 || 5.0.0-beta.0 - 8.0.0-alpha.7
Depends on vulnerable versions of @nestjs/common
Depends on vulnerable versions of @nestjs/microservices
Depends on vulnerable versions of @nestjs/platform-express
node_modules/nest-sftp/node_modules/@nestjs/core
@nestjs/microservices 5.0.0-beta.0 - 8.0.0-alpha.7
Depends on vulnerable versions of @nestjs/common
node_modules/nest-sftp/node_modules/@nestjs/microservices
@nestjs/platform-express <=8.0.0-alpha.7
Depends on vulnerable versions of @nestjs/common
node_modules/nest-sftp/node_modules/@nestjs/platform-express

ssh2 <1.4.0
Severity: high
OS Command Injection in ssh2 - GHSA-652h-xwhf-q4h6
No fix available
node_modules/ssh2
ssh2-sftp-client <=6.0.1
Depends on vulnerable versions of ssh2
node_modules/ssh2-sftp-client
nest-sftp *
Depends on vulnerable versions of ssh2-sftp-client
node_modules/nest-sftp

Thank you very much in advance

Please add forRootAsync

Would be useful to have forRootAsync when configuration is coming from ConfigModule

Thanks!

Incorrect Upload method parameters

On Readme file you sad that upload method has remotePath and localPath as parameters, but in the dependecy code i found this :
upload(contents: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, transferOptions?: TransferOptions): Promise<string>;
Has contents , remoteFilePath as parameters.

Please can you provide us more examples, to explain this method

Node Crash on startup when using SftpModule

I have no idea what is the problem but when I'm importing SftpModule with the following informations:

@Module({
  imports: [HttpModule,
    SftpModule.forRoot({
      host: '*********************',
      port: 21,
      username: '********',
      password: '*********',
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule { }

I'm able to connect with sftp on the 21 port with that user and that password without any problem from terminal

[1] 21:12:01 - Found 0 errors. Watching for file changes.
[0] [Nest] 17424   - 2019-10-10 21:12:02   [NestFactory] Starting Nest application...
[0] [Nest] 17424   - 2019-10-10 21:12:02   [InstanceLoader] HttpModule dependencies initialized +42ms
[0] [Nest] 17424   - 2019-10-10 21:12:02   [InstanceLoader] AppModule dependencies initialized +1ms
[0]  1: 0x9bcb80 node::Abort() [node]
[0]  2: 0xa30de9  [node]
[0]  3: 0xb8466c  [node]
[0]  4: 0xb86477 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
[0]  5: 0x134e979  [node]
[0] Aborted (core dumped)
[0] [nodemon] app crashed - waiting for file changes before starting...
^C[0] wait-on dist/main.js && nodemon exited with code SIGINT
[1] tsc -w -p tsconfig.build.json exited with code SIGINT

Please update ssh2-sftp-client to 7.x.x to fix timeout bug

Hello,
This package is using an older version of ssh2-sftp-client which has a known timeout bug that happens during connect. The solution was that a new package was published, version 7.0.2, which uses a newer version of the ssh2 package, which is where the timeout bug was found.

theophilusx/ssh2-sftp-client#338

But the nest-sftp package is still using broken version 5.3.2:

https://github.com/benMain/nest-sftp/blob/master/package.json#L43

Please update this package to the latest version in the package.json. Thank you

Options Types for @types/ssh2-streams in not correct

The method to upload has the wrong types from @types/ssh2-streams and therefore the implementation in this project is not correct:

Fails:

aync upload(
    contents: string | Buffer | NodeJS.ReadableStream,
    remoteFilePath: string,
    options: TransferOptions = null,
  ): Promise<void> {
    await this.sftpClient.put(contents, remoteFilePath, options);
  }

Succeeds:

aync upload(
    contents: string | Buffer | NodeJS.ReadableStream,
    remoteFilePath: string,
    options: WriteStreamOptions = null,
  ): Promise<void> {
    await this.sftpClient.put(contents, remoteFilePath, options);
  }

MULTIPLE CONNECTION FEATURES

Hello Ben,

First of all thanks a lot for this jewelry. But the problem i'm facing is multiple connection instances.
I would like to have possibility to register or connect to multiple sftp identified by a connection name as available in the ssh2 lib.

Did you think about it ? Is an update expected ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.