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

amocrm-js

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amocrm-js - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

8

dist/base/AmoConnection.js

@@ -226,3 +226,3 @@ 'use strict';

if (this._server) {
return Promise.resolve;
return Promise.resolve();
}

@@ -266,5 +266,5 @@ var options = _extends({}, this._options.server, {

return this.waitUserAction();
} else if (!this._code && this.getToken() && this.isRequestExpired()) {
} else if (this.getToken() && this.isRequestExpired()) {
return this.refreshToken();
} else if (!this._code) {
} else if (!this._code && !this.getToken()) {
return Promise.resolve(false);

@@ -281,3 +281,3 @@ }

_this6._isConnected = true;
return true;
return Promise.resolve(true);
}

@@ -284,0 +284,0 @@

{
"name": "amocrm-js",
"version": "2.0.8",
"version": "2.0.9",
"description": "JS Library for AmoCRM",

@@ -5,0 +5,0 @@ "main": "dist/AmoCRM.js",

@@ -271,1 +271,7 @@ # AmoCRM

```
## Доска почёта
Спасибо @amorev, @maxism за вклад в разработку этого проекта
Отдельная благодарность @dmitrytemlead за возможность протестировать библиотеку в стороннем проекте

@@ -45,3 +45,3 @@ import AmoCRM from '../src/AmoCRM';

fit( 'should get new token', async done => {
it( 'should get new token', async done => {
const url = client.connection.getAuthUrl();

@@ -73,2 +73,11 @@ console.log({

}, 60 * 1000 );
it( 'should set old token', async done => {
client.connection.setToken( config.token );
client.connection.connect();
if ( !client.connection.isRequestExpired()) {
done();
}
// done();
}, 60 * 1000 );
});

@@ -181,3 +181,3 @@ 'use strict';

if ( this._server ) {
return Promise.resolve;
return Promise.resolve();
}

@@ -221,6 +221,5 @@ const options = {

}
else if ( !this._code && this.getToken() && this.isRequestExpired()) {
else if ( this.getToken() && this.isRequestExpired()) {
return this.refreshToken();
}
else if ( !this._code ) {
} else if ( !this._code && !this.getToken() ) {
return Promise.resolve( false );

@@ -236,3 +235,3 @@ }

this._isConnected = true;
return true;
return Promise.resolve( true );
}

@@ -239,0 +238,0 @@

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