@aloma.io/integration-sdk 3.8.23 → 3.8.25

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.
@@ -102,7 +102,7 @@ export declare abstract class AbstractController {
102
102
  __endpoint(arg: any): Promise<any | null>;
103
103
  __autocomplete(arg: any): Promise<any | null>;
104
104
  __default(arg: any): Promise<any | null>;
105
- __healthCheck(configSchema: {
105
+ __healthCheck(configSchema: () => {
106
106
  [key: string]: ConfigField;
107
107
  }): Promise<void>;
108
108
  private defaultConfigCheck;
@@ -108,6 +108,7 @@ export class AbstractController {
108
108
  }
109
109
  async __healthCheck(configSchema) {
110
110
  const errors = [];
111
+ const schema = configSchema();
111
112
  try {
112
113
  await this.healthCheck();
113
114
  }
@@ -115,13 +116,13 @@ export class AbstractController {
115
116
  errors.push(e.message);
116
117
  }
117
118
  try {
118
- await this.defaultConfigCheck(configSchema);
119
+ await this.defaultConfigCheck(schema);
119
120
  }
120
121
  catch (e) {
121
122
  errors.push(e.message);
122
123
  }
123
124
  try {
124
- await this.configCheck(configSchema);
125
+ await this.configCheck(schema);
125
126
  }
126
127
  catch (e) {
127
128
  errors.push(e.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.8.23",
3
+ "version": "3.8.25",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -157,8 +157,9 @@ export abstract class AbstractController {
157
157
  return this.fallback(arg);
158
158
  }
159
159
 
160
- async __healthCheck(configSchema: {[key: string]: ConfigField}): Promise<void> {
160
+ async __healthCheck(configSchema: () => {[key: string]: ConfigField}): Promise<void> {
161
161
  const errors: string[] = [];
162
+ const schema = configSchema();
162
163
 
163
164
  try {
164
165
  await this.healthCheck();
@@ -167,13 +168,13 @@ export abstract class AbstractController {
167
168
  }
168
169
 
169
170
  try {
170
- await this.defaultConfigCheck(configSchema);
171
+ await this.defaultConfigCheck(schema);
171
172
  } catch (e: any) {
172
173
  errors.push(e.message);
173
174
  }
174
175
 
175
176
  try {
176
- await this.configCheck(configSchema);
177
+ await this.configCheck(schema);
177
178
  } catch (e: any) {
178
179
  errors.push(e.message);
179
180
  }