@aloma.io/integration-sdk 3.8.24 → 3.8.26
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.
@@ -133,10 +133,8 @@ export class AbstractController {
|
|
133
133
|
}
|
134
134
|
async defaultConfigCheck(configSchema) {
|
135
135
|
const config = this.config;
|
136
|
-
|
137
|
-
const missing = Object.entries(configSchema())
|
136
|
+
const missing = Object.entries(configSchema)
|
138
137
|
.map(([key, field]) => {
|
139
|
-
console.log(key, field, config[key]);
|
140
138
|
if (!field)
|
141
139
|
return;
|
142
140
|
if (!field.optional && config[key] == null) {
|
@@ -59,14 +59,12 @@ export const onConnect = ({ dispatcher, configSchema, config, start, }) => {
|
|
59
59
|
healthCheck: async (controller) => {
|
60
60
|
let result = { ok: true, error: null };
|
61
61
|
try {
|
62
|
-
console.log('running healthcheck');
|
63
62
|
if (oauthClient) {
|
64
63
|
await oauthClient.__healthCheck();
|
65
64
|
}
|
66
65
|
await controller.__healthCheck(configSchema);
|
67
66
|
}
|
68
67
|
catch (e) {
|
69
|
-
console.log(e);
|
70
68
|
result.ok = false;
|
71
69
|
result.error = e.message;
|
72
70
|
}
|
package/package.json
CHANGED
package/src/controller/index.mts
CHANGED
@@ -187,11 +187,8 @@ export abstract class AbstractController {
|
|
187
187
|
private async defaultConfigCheck(configSchema: {[key: string]: ConfigField}): Promise<void> {
|
188
188
|
const config = this.config;
|
189
189
|
|
190
|
-
|
191
|
-
|
192
|
-
const missing = Object.entries(configSchema())
|
190
|
+
const missing = Object.entries(configSchema)
|
193
191
|
.map(([key, field]) => {
|
194
|
-
console.log(key, field, config[key])
|
195
192
|
if (!field) return;
|
196
193
|
|
197
194
|
if (!field.optional && config[key] == null) {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import {init} from '@paralleldrive/cuid2';
|
2
|
-
import {AbstractController} from '../../../../index.mjs';
|
1
|
+
import { init } from '@paralleldrive/cuid2';
|
2
|
+
import { AbstractController } from '../../../../index.mjs';
|
3
3
|
import Dispatcher from '../../../dispatcher/index.mjs';
|
4
4
|
import Fetcher from '../../../fetcher/fetcher.mjs';
|
5
|
-
import {Config} from '../../../websocket/config.mjs';
|
6
|
-
import {decryptConfig} from './decrypt-config.mjs';
|
7
|
-
import {patchFinishOAuth} from './finish-oauth.mjs';
|
8
|
-
import {makeOAuth} from './make-oauth.mjs';
|
9
|
-
import {patchStartOAuth} from './start-oauth.mjs';
|
5
|
+
import { Config } from '../../../websocket/config.mjs';
|
6
|
+
import { decryptConfig } from './decrypt-config.mjs';
|
7
|
+
import { patchFinishOAuth } from './finish-oauth.mjs';
|
8
|
+
import { makeOAuth } from './make-oauth.mjs';
|
9
|
+
import { patchStartOAuth } from './start-oauth.mjs';
|
10
10
|
|
11
11
|
const cuid = init({length: 32});
|
12
12
|
|
@@ -100,14 +100,12 @@ export const onConnect = ({
|
|
100
100
|
let result: any = {ok: true, error: null};
|
101
101
|
|
102
102
|
try {
|
103
|
-
console.log('running healthcheck')
|
104
103
|
if (oauthClient) {
|
105
104
|
await oauthClient.__healthCheck();
|
106
105
|
}
|
107
106
|
|
108
107
|
await controller.__healthCheck(configSchema);
|
109
108
|
} catch (e: any) {
|
110
|
-
console.log(e)
|
111
109
|
result.ok = false;
|
112
110
|
result.error = e.message;
|
113
111
|
}
|