@aloma.io/integration-sdk 3.0.8 → 3.0.10

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.
@@ -9,7 +9,7 @@ export class AbstractController {
9
9
  fallback(arg) {
10
10
  throw new Error("method not found");
11
11
  }
12
- endpoint(arg) {
12
+ async endpoint(arg) {
13
13
  throw new Error("method not found");
14
14
  }
15
15
  async newTask(name, data) {
@@ -73,7 +73,7 @@ class Fetcher {
73
73
  }
74
74
  catch (e) {
75
75
  --retries;
76
- console.log(e);
76
+ console.log(url, e);
77
77
  if (retries <= 0)
78
78
  throw e;
79
79
  return local.onError(e, url, options, retries, args);
@@ -120,6 +120,7 @@ class OAuthFetcher extends Fetcher {
120
120
  });
121
121
  }
122
122
  async customize(options, args = {}) {
123
+ const local = this;
123
124
  const token = await local.getToken(args.forceTokenRefresh);
124
125
  options = { ...options };
125
126
  options.headers = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@ export abstract class AbstractController {
14
14
  throw new Error("method not found");
15
15
  }
16
16
 
17
- protected endpoint(arg: any): Promise<any> {
17
+ protected async endpoint(arg: any): Promise<any> {
18
18
  throw new Error("method not found");
19
19
  }
20
20
 
@@ -94,7 +94,7 @@ class Fetcher {
94
94
  } catch (e) {
95
95
  --retries;
96
96
 
97
- console.log(e);
97
+ console.log(url, e);
98
98
 
99
99
  if (retries <= 0) throw e;
100
100
 
@@ -153,6 +153,7 @@ class OAuthFetcher extends Fetcher {
153
153
  }
154
154
 
155
155
  async customize(options, args = {}) {
156
+ const local = this;
156
157
  const token = await local.getToken(args.forceTokenRefresh);
157
158
 
158
159
  options = { ...options };