dropbox-with-offline-refresh-token
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "dropbox-with-offline-refresh-token", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "use can easily use the dropbox api without have to handle all the authentication stuff. all you need is a single offline refresh token.", | ||
@@ -8,3 +8,4 @@ "main": "target/lib/Client.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build_publish": "npx tsc" | ||
}, | ||
@@ -20,6 +21,7 @@ "repository": { | ||
"dotenv": "^16.4.5", | ||
"dropbox": "^10.34.0", | ||
"fs": "^0.0.1-security", | ||
"typescript": "^5.4.5" | ||
"dropbox": "^10.34.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.6.2" | ||
} | ||
} | ||
} |
@@ -71,7 +71,7 @@ import axios from "axios"; | ||
const errorMsg = e.error.error_summary | ||
const errorMsg = e.error.error['.tag'] | ||
if (typeof errorMsg !== 'string') throw e | ||
switch (errorMsg) { | ||
case 'expired_access_token/': | ||
await this.refreshAccessToken() | ||
return lambda(this.client) | ||
case 'expired_access_token': | ||
return this.refreshAccessToken().then(() => lambda(this.client)) | ||
default: | ||
@@ -78,0 +78,0 @@ console.log('no handling for this error implemented') |
@@ -52,7 +52,8 @@ "use strict"; | ||
} | ||
const errorMsg = e.error.error_summary; | ||
const errorMsg = e.error.error['.tag']; | ||
if (typeof errorMsg !== 'string') | ||
throw e; | ||
switch (errorMsg) { | ||
case 'expired_access_token/': | ||
await this.refreshAccessToken(); | ||
return lambda(this.client); | ||
case 'expired_access_token': | ||
return this.refreshAccessToken().then(() => lambda(this.client)); | ||
default: | ||
@@ -59,0 +60,0 @@ console.log('no handling for this error implemented'); |
7322
3
173
1
- Removedfs@^0.0.1-security
- Removedtypescript@^5.4.5
- Removedfs@0.0.1-security(transitive)
- Removedtypescript@5.8.2(transitive)