@aloma.io/integration-sdk 3.3.58 → 3.3.59

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.
@@ -151,7 +151,6 @@ class OAuthFetcher extends Fetcher {
151
151
  const local = this, oauth = local.oauth;
152
152
  if (!oauth.refreshToken())
153
153
  return;
154
- console.log('refreshing');
155
154
  await local.getToken(true);
156
155
  }
157
156
  async customize(options, args = {}) {
@@ -189,7 +188,7 @@ class OAuth {
189
188
  }
190
189
  async periodicRefresh() {
191
190
  const clients = this.clients;
192
- console.log('refreshing clients', clients.length);
191
+ console.log('refreshing oauth clients', clients.length);
193
192
  for (let i = 0; i < clients.length; ++i) {
194
193
  const client = clients[0];
195
194
  await client.periodicRefresh();
@@ -464,14 +463,14 @@ ${text}
464
463
  if (theOAuth) {
465
464
  clearInterval(this._refreshOAuthToken);
466
465
  if (!(this._oauth.noPeriodicTokenRefresh === false)) {
467
- this._refreshOAuthToken = setTimeout(async () => {
466
+ this._refreshOAuthToken = setInterval(async () => {
468
467
  try {
469
468
  await theOAuth.periodicRefresh();
470
469
  }
471
470
  catch (e) {
472
471
  console.log('periodic refresh', e);
473
472
  }
474
- }, /*4 * 60 * 60 **/ 15000);
473
+ }, 4 * 60 * 60 * 15000);
475
474
  }
476
475
  }
477
476
  start({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.3.58",
3
+ "version": "3.3.59",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -192,7 +192,6 @@ class OAuthFetcher extends Fetcher {
192
192
  const local = this, oauth = local.oauth;
193
193
  if (!oauth.refreshToken()) return;
194
194
 
195
- console.log('refreshing')
196
195
  await local.getToken(true);
197
196
  }
198
197
 
@@ -241,7 +240,7 @@ class OAuth {
241
240
  async periodicRefresh() {
242
241
  const clients = this.clients;
243
242
 
244
- console.log('refreshing clients', clients.length)
243
+ console.log('refreshing oauth clients', clients.length)
245
244
 
246
245
  for (let i = 0; i < clients.length; ++i) {
247
246
  const client = clients[0];
@@ -574,7 +573,7 @@ ${text}
574
573
  clearInterval(this._refreshOAuthToken);
575
574
 
576
575
  if (!(this._oauth.noPeriodicTokenRefresh === false)) {
577
- this._refreshOAuthToken = setTimeout(async () => {
576
+ this._refreshOAuthToken = setInterval(async () => {
578
577
 
579
578
  try
580
579
  {
@@ -582,7 +581,7 @@ ${text}
582
581
  } catch(e) {
583
582
  console.log('periodic refresh', e);
584
583
  }
585
- }, /*4 * 60 * 60 **/ 15000);
584
+ }, 4 * 60 * 60 * 15000);
586
585
  }
587
586
 
588
587
  }