@aloma.io/integration-sdk 3.8.34 → 3.8.36

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.
@@ -35,7 +35,7 @@ export class AbstractController {
35
35
  * @param arg
36
36
  * @returns
37
37
  */
38
- autocomplete(arg) {
38
+ async autocomplete(arg) {
39
39
  return Promise.resolve({});
40
40
  }
41
41
  /**
@@ -42,8 +42,9 @@ export default class Fetcher {
42
42
  * @param args optional args for customize()
43
43
  * @returns
44
44
  */
45
- async fetch(url, options = {}, retries, args = {}) {
45
+ async fetch(url, options, retries, args = {}) {
46
46
  var local = this, baseUrl = local.baseUrl;
47
+ options ||= {};
47
48
  const options0 = { ...options };
48
49
  if (retries == null)
49
50
  retries = local.retry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.8.34",
3
+ "version": "3.8.36",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@ export abstract class AbstractController {
44
44
  * @param arg
45
45
  * @returns
46
46
  */
47
- protected autocomplete(arg: any): Promise<any> {
47
+ protected async autocomplete(arg: any): Promise<any> {
48
48
  return Promise.resolve({});
49
49
  }
50
50
 
@@ -1,4 +1,4 @@
1
- import {unwrap} from '../util/index.mjs';
1
+ import { unwrap } from '../util/index.mjs';
2
2
 
3
3
  /**
4
4
  * http request fetcher
@@ -60,7 +60,7 @@ export default class Fetcher {
60
60
  */
61
61
  async fetch(
62
62
  url: string,
63
- options: {
63
+ options?: {
64
64
  /**
65
65
  * request method like GET, POST, PUT, DELETE
66
66
  */
@@ -73,12 +73,13 @@ export default class Fetcher {
73
73
  * request body like "hello world" or {hello: "world"}
74
74
  */
75
75
  body?: any;
76
- } = {},
76
+ },
77
77
  retries?: number,
78
78
  args: any = {}
79
79
  ) {
80
80
  var local = this,
81
81
  baseUrl = local.baseUrl;
82
+ options ||= {};
82
83
 
83
84
  const options0: any = {...options};
84
85