dropbox-with-offline-refresh-token
Advanced tools
Comparing version 1.0.20 to 1.0.21
{ | ||
"name": "dropbox-with-offline-refresh-token", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "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.", |
@@ -73,4 +73,2 @@ import { Dropbox, DropboxResponseError } from "dropbox"; | ||
async execAsync<R>(lambda: (x: Dropbox) => Promise<R>): Promise<R> { | ||
return new Promise<R>((res, rej) => { | ||
@@ -81,2 +79,4 @@ this.jobQueue.push(async () => { | ||
const start = new Date() | ||
return lambda(this.client as Dropbox) | ||
@@ -86,2 +86,5 @@ .catch(async (e): Promise<R> => this.handleDropboxError(e, () => lambda(this.client as Dropbox))) | ||
.catch(rej) | ||
.finally(() => { | ||
console.log(`uploaded file to dropbox in ${new Date().getTime() - start.getTime()}`) | ||
}) | ||
}) | ||
@@ -88,0 +91,0 @@ }) |
@@ -57,6 +57,10 @@ import { Dropbox, DropboxResponseError } from "dropbox"; | ||
throw new Error('dropbox client was not set'); | ||
const start = new Date(); | ||
return lambda(this.client) | ||
.catch(async (e) => this.handleDropboxError(e, () => lambda(this.client))) | ||
.then(res) | ||
.catch(rej); | ||
.catch(rej) | ||
.finally(() => { | ||
console.log(`uploaded file to dropbox in ${new Date().getTime() - start.getTime()}`); | ||
}); | ||
}); | ||
@@ -63,0 +67,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11141
250