@placeos/ts-client 4.7.6 → 4.7.7
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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/auth/functions.ts +5 -3
package/package.json
CHANGED
package/src/auth/functions.ts
CHANGED
|
@@ -159,10 +159,12 @@ export function token(return_expired: boolean = true): string {
|
|
|
159
159
|
_failed_count += 1;
|
|
160
160
|
timeout(
|
|
161
161
|
're-authorise',
|
|
162
|
-
() =>
|
|
163
|
-
authorise
|
|
162
|
+
async () => {
|
|
163
|
+
delete _promises.authorise;
|
|
164
|
+
await authorise().catch((e) =>
|
|
164
165
|
log('Auth', `Failed to get token: ${e}`),
|
|
165
|
-
)
|
|
166
|
+
);
|
|
167
|
+
},
|
|
166
168
|
200 * Math.min(20, _failed_count),
|
|
167
169
|
);
|
|
168
170
|
}
|