@cadenza.io/service 1.10.2 → 1.10.4
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/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1348,6 +1348,7 @@ var SocketController = class _SocketController {
|
|
|
1348
1348
|
try {
|
|
1349
1349
|
const server = new import_socket.Server((_a2 = ctx.__httpsServer) != null ? _a2 : ctx.__httpServer);
|
|
1350
1350
|
ctx.__socketServer = server;
|
|
1351
|
+
console.log("SocketServer:", server);
|
|
1351
1352
|
const profile = (_b2 = ctx.__securityProfile) != null ? _b2 : "medium";
|
|
1352
1353
|
server.use((socket, next) => {
|
|
1353
1354
|
var _a3;
|
|
@@ -1393,17 +1394,20 @@ var SocketController = class _SocketController {
|
|
|
1393
1394
|
next2();
|
|
1394
1395
|
});
|
|
1395
1396
|
});
|
|
1397
|
+
console.log("SocketServer: Setup complete");
|
|
1396
1398
|
} catch (err) {
|
|
1397
1399
|
console.error("Socket setup error:", err);
|
|
1398
1400
|
return false;
|
|
1399
1401
|
}
|
|
1400
|
-
return
|
|
1402
|
+
return ctx;
|
|
1401
1403
|
}).then(
|
|
1402
1404
|
CadenzaService.createMetaTask(
|
|
1403
1405
|
"Start SocketServer",
|
|
1404
1406
|
(ctx) => {
|
|
1405
1407
|
const server = ctx.__socketServer;
|
|
1408
|
+
console.log("SocketServer: Starting", server);
|
|
1406
1409
|
server.on("connection", (ws) => {
|
|
1410
|
+
console.log("SocketServer: New connection");
|
|
1407
1411
|
ws.on("handshake", (ctx2) => {
|
|
1408
1412
|
console.log("Socket HANDSHAKE", ctx2.serviceInstanceId);
|
|
1409
1413
|
ws.emit("handshake", {
|
|
@@ -1524,7 +1528,13 @@ var SocketController = class _SocketController {
|
|
|
1524
1528
|
randomizationFactor: 0.5,
|
|
1525
1529
|
retries: 5
|
|
1526
1530
|
});
|
|
1531
|
+
console.log(
|
|
1532
|
+
"SocketClient: Connecting to",
|
|
1533
|
+
`${socketProtocol}://${serviceAddress}:${port}`,
|
|
1534
|
+
socket
|
|
1535
|
+
);
|
|
1527
1536
|
socket.on("connect", () => {
|
|
1537
|
+
console.log("SocketClient: CONNECTED");
|
|
1528
1538
|
CadenzaService.broker.emit("meta.socket_client.connected", ctx);
|
|
1529
1539
|
socket.emit("handshake", {
|
|
1530
1540
|
serviceInstanceId
|
|
@@ -1572,6 +1582,7 @@ var SocketController = class _SocketController {
|
|
|
1572
1582
|
errored: true
|
|
1573
1583
|
}, ctx2), ctx2.__metadata);
|
|
1574
1584
|
}
|
|
1585
|
+
console.log("SocketClient: Delegate result", resultContext);
|
|
1575
1586
|
return resultContext;
|
|
1576
1587
|
}),
|
|
1577
1588
|
`Delegate flow to instance ${serviceInstanceId} of service ${serviceName} with address ${serviceAddress}:${servicePort}`
|