@aloma.io/integration-sdk 3.7.25 → 3.7.27
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.
package/build/internal/index.mjs
CHANGED
@@ -343,7 +343,17 @@ ${text}
|
|
343
343
|
getBlobContent,
|
344
344
|
createBlob,
|
345
345
|
healthCheck: async (controller) => {
|
346
|
-
|
346
|
+
let result = { ok: true };
|
347
|
+
try {
|
348
|
+
await controller.__healthCheck();
|
349
|
+
}
|
350
|
+
catch (e) {
|
351
|
+
result.ok = false;
|
352
|
+
result.error = e.message;
|
353
|
+
}
|
354
|
+
const packet = transport.newPacket(result);
|
355
|
+
packet.method("connector.health.check");
|
356
|
+
transport.send(packet);
|
347
357
|
},
|
348
358
|
getClient: (arg) => theOAuth ? theOAuth.getClient(arg) : new Fetcher(arg),
|
349
359
|
newTask: (name, data) => {
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import C from "../connection/constants.mjs";
|
2
1
|
import { init } from "@paralleldrive/cuid2";
|
2
|
+
import C from "../connection/constants.mjs";
|
3
3
|
const cuid = init({ length: 32 });
|
4
|
-
import { DurableWebsocket } from "./durable.mjs";
|
5
4
|
import WebSocket from "ws";
|
6
|
-
import {
|
5
|
+
import { DurableWebsocket } from "./durable.mjs";
|
6
|
+
import { Callback, Packet } from "./packet.mjs";
|
7
7
|
const cleanInterval = 45 * 1000;
|
8
8
|
const pingInterval = 30 * 1000;
|
9
9
|
class Transport {
|
@@ -56,7 +56,7 @@ class Transport {
|
|
56
56
|
}, 30000 + 15000);
|
57
57
|
};
|
58
58
|
ws.on("open", () => {
|
59
|
-
console.log("
|
59
|
+
console.log("transport connected");
|
60
60
|
local.connected = true;
|
61
61
|
ws.onPing();
|
62
62
|
local.pinger = setInterval(() => ws.ping(() => null), pingInterval);
|
package/package.json
CHANGED
package/src/internal/index.mts
CHANGED
@@ -433,7 +433,23 @@ ${text}
|
|
433
433
|
getBlobContent,
|
434
434
|
createBlob,
|
435
435
|
healthCheck: async (controller) => {
|
436
|
-
|
436
|
+
let result: any = {ok: true};
|
437
|
+
|
438
|
+
try
|
439
|
+
{
|
440
|
+
await controller.__healthCheck()
|
441
|
+
} catch(e: any) {
|
442
|
+
result.ok = false;
|
443
|
+
result.error = e.message;
|
444
|
+
}
|
445
|
+
|
446
|
+
const packet = transport.newPacket(
|
447
|
+
result,
|
448
|
+
);
|
449
|
+
|
450
|
+
packet.method("connector.health.check");
|
451
|
+
|
452
|
+
transport.send(packet);
|
437
453
|
},
|
438
454
|
getClient: (arg) =>
|
439
455
|
theOAuth ? theOAuth.getClient(arg) : new Fetcher(arg),
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import C from "../connection/constants.mjs";
|
2
1
|
import { init } from "@paralleldrive/cuid2";
|
2
|
+
import C from "../connection/constants.mjs";
|
3
3
|
const cuid = init({ length: 32 });
|
4
4
|
|
5
|
-
import { DurableWebsocket } from "./durable.mjs";
|
6
5
|
import WebSocket from "ws";
|
7
|
-
import {
|
6
|
+
import { DurableWebsocket } from "./durable.mjs";
|
7
|
+
import { Callback, Packet } from "./packet.mjs";
|
8
8
|
|
9
9
|
const cleanInterval = 45 * 1000;
|
10
10
|
const pingInterval = 30 * 1000;
|
@@ -77,7 +77,7 @@ class Transport {
|
|
77
77
|
};
|
78
78
|
|
79
79
|
ws.on("open", () => {
|
80
|
-
console.log("
|
80
|
+
console.log("transport connected");
|
81
81
|
local.connected = true;
|
82
82
|
ws.onPing();
|
83
83
|
local.pinger = setInterval(() => ws.ping(() => null), pingInterval);
|