@aloma.io/integration-sdk 3.8.26 → 3.8.28

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.
@@ -109,6 +109,7 @@ export class AbstractController {
109
109
  async __healthCheck(configSchema) {
110
110
  const errors = [];
111
111
  const schema = configSchema();
112
+ const fields = schema.fields;
112
113
  try {
113
114
  await this.healthCheck();
114
115
  }
@@ -116,13 +117,13 @@ export class AbstractController {
116
117
  errors.push(e.message);
117
118
  }
118
119
  try {
119
- await this.defaultConfigCheck(schema);
120
+ await this.defaultConfigCheck(fields);
120
121
  }
121
122
  catch (e) {
122
123
  errors.push(e.message);
123
124
  }
124
125
  try {
125
- await this.configCheck(schema);
126
+ await this.configCheck(fields);
126
127
  }
127
128
  catch (e) {
128
129
  errors.push(e.message);
@@ -138,7 +139,7 @@ export class AbstractController {
138
139
  if (!field)
139
140
  return;
140
141
  if (!field.optional && config[key] == null) {
141
- return `Configuration: ${field.name} is required`;
142
+ return `Configuration: ${field.name || key} is required`;
142
143
  }
143
144
  })
144
145
  .filter((what) => !!what);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.8.26",
3
+ "version": "3.8.28",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -160,6 +160,7 @@ export abstract class AbstractController {
160
160
  async __healthCheck(configSchema: () => {[key: string]: ConfigField}): Promise<void> {
161
161
  const errors: string[] = [];
162
162
  const schema = configSchema();
163
+ const fields: any = schema.fields;
163
164
 
164
165
  try {
165
166
  await this.healthCheck();
@@ -168,13 +169,13 @@ export abstract class AbstractController {
168
169
  }
169
170
 
170
171
  try {
171
- await this.defaultConfigCheck(schema);
172
+ await this.defaultConfigCheck(fields);
172
173
  } catch (e: any) {
173
174
  errors.push(e.message);
174
175
  }
175
176
 
176
177
  try {
177
- await this.configCheck(schema);
178
+ await this.configCheck(fields);
178
179
  } catch (e: any) {
179
180
  errors.push(e.message);
180
181
  }
@@ -192,7 +193,7 @@ export abstract class AbstractController {
192
193
  if (!field) return;
193
194
 
194
195
  if (!field.optional && config[key] == null) {
195
- return `Configuration: ${field.name} is required`;
196
+ return `Configuration: ${field.name || key} is required`;
196
197
  }
197
198
  })
198
199
  .filter((what) => !!what);