sergi/jsftp

DeprecationWarning: Ftp.raw[user](args): Use Ftp.raw('user args') instead.

Closed this issue ยท 17 comments

When I use ftp.auth method, this deprecation warning appear. is there anyway to do authentication. my code is following.

const connect = (server) => new Promise((resolve,reject)=>{
	
	// create new ftp server with r	
	const ftp = new JSFtp({
		host: server.host,
		port: server.port || 21,
		user: server.user,
		pass: server.pass,
		debugMode: true
	});	
		

	ftp.on('error',function(err){
		if(err.code == 530 ) reject({status: true, err: 'invalid user credential'});
		if(err.code == 'ENOTFOUND') reject({status: true, err: 'invalid host'});
		reject({status: true,err:'criteria is not correct. cannot connect to server' });
	});

	ftp.on('connect',function(err){
		
		ftp
			.auth(server.user,server.pass,(err,data) => {
				if(err)	reject({ status: true, err: 'Error: 530 Login incorrect'});

				resolve(ftp);
			})
		// resolve(ftp);
	})
});


It happens the same with me :(

This is caused by the auth function itself for user look at line 334, for password its line 340 and for type it's line 349.
They should be changed to self.raw('user ' + user, function(..., self.raw('pass' + pass, function(... and self.raw('type I', function(....

This was already fixed and it is merged on master: 35a8edd. Could anyone release a new version so we stop receiving these warnings, please?

Bump. Can we have a new release, please?

Receiving this warning too. Bump.

Receiving. Bump.

Same here

Although this has been closed the lines referred to by @svenbw remain unaltered in the version distributed via npm. I think the new code needs to be npm published

+1, are moderators of this library active or should we fork ?

Guys, it's just a simple push to npm publish.... please

Guys, it's just a simple push to npm publish.... please

Bump @sergi

It's been four months now. Is there a fork of this library that will be kept updated going forward?

sergi commented

Released v2.0.0. Really sorry for the wait, personal stuff got in the way.

Thank you so much for the update, @sergi.