tsvesync 1.0.32 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import { VeSync } from './vesync';
5
5
  export declare function getApiBaseUrl(): string;
6
6
  export declare function setApiBaseUrl(url: string): void;
7
7
  export declare const API_RATE_LIMIT = 30;
8
- export declare const API_TIMEOUT = 5000;
8
+ export declare const API_TIMEOUT = 15000;
9
9
  export declare const APP_VERSION = "2.8.6";
10
10
  export declare const PHONE_BRAND = "SM N9005";
11
11
  export declare const PHONE_OS = "Android";
@@ -21,7 +21,7 @@ function setApiBaseUrl(url) {
21
21
  _apiBaseUrl = url;
22
22
  }
23
23
  exports.API_RATE_LIMIT = 30;
24
- exports.API_TIMEOUT = 5000;
24
+ exports.API_TIMEOUT = 15000;
25
25
  exports.APP_VERSION = '2.8.6';
26
26
  exports.PHONE_BRAND = 'SM N9005';
27
27
  exports.PHONE_OS = 'Android';
@@ -189,12 +189,7 @@ class Helpers {
189
189
  }
190
190
  return [responseData, error.response.status];
191
191
  }
192
- if (error.code === 'ECONNABORTED' && error.message.includes('timeout')) {
193
- logger_1.logger.debug('API call failed:', error.code, error.message);
194
- }
195
- else {
196
- logger_1.logger.error('API call failed:', error.code, error.message);
197
- }
192
+ logger_1.logger.error('API call failed:', error.code, error.message);
198
193
  return [null, 0];
199
194
  }
200
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsvesync",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "A TypeScript library for interacting with VeSync smart home devices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,7 +19,7 @@ export function setApiBaseUrl(url: string): void {
19
19
  }
20
20
 
21
21
  export const API_RATE_LIMIT = 30;
22
- export const API_TIMEOUT = 5000;
22
+ export const API_TIMEOUT = 15000;
23
23
 
24
24
  export const APP_VERSION = '2.8.6';
25
25
  export const PHONE_BRAND = 'SM N9005';
@@ -233,11 +233,8 @@ export class Helpers {
233
233
  }
234
234
  return [responseData, error.response.status];
235
235
  }
236
- if (error.code === 'ECONNABORTED' && error.message.includes('timeout')) {
237
- logger.debug('API call failed:', error.code, error.message);
238
- } else {
239
- logger.error('API call failed:', error.code, error.message);
240
- }
236
+
237
+ logger.error('API call failed:', error.code, error.message);
241
238
  return [null, 0];
242
239
  }
243
240
  }