aotrautils-srv 0.0.1485 → 0.0.1487
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.
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (28/04/2025-
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (28/04/2025-02:48:07)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -4894,7 +4894,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
4894
4894
|
|
4895
4895
|
|
4896
4896
|
|
4897
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (28/04/2025-
|
4897
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (28/04/2025-02:48:07)»*/
|
4898
4898
|
/*-----------------------------------------------------------------------------*/
|
4899
4899
|
|
4900
4900
|
|
@@ -5040,7 +5040,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
5040
5040
|
|
5041
5041
|
|
5042
5042
|
|
5043
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (28/04/2025-
|
5043
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (28/04/2025-02:48:07)»*/
|
5044
5044
|
/*-----------------------------------------------------------------------------*/
|
5045
5045
|
|
5046
5046
|
|
@@ -7506,7 +7506,7 @@ class ClientInstance{
|
|
7506
7506
|
if(WebsocketImplementation.useSocketIOImplementation){
|
7507
7507
|
// FOR THE SOCKETIO IMPLEMENTATION :
|
7508
7508
|
clientSocket.on(channelNameParam, (eventOrMessage)=>{
|
7509
|
-
clientReceptionEntryPoint.execute(eventOrMessage, clientSocket, clientReceptionEntryPoint);
|
7509
|
+
clientReceptionEntryPoint.execute(eventOrMessage, clientSocket, this.clientReceptionEntryPoints, clientReceptionEntryPoint.listenerConfig.messageId);
|
7510
7510
|
});
|
7511
7511
|
}
|
7512
7512
|
|
@@ -7526,21 +7526,20 @@ class ClientInstance{
|
|
7526
7526
|
// 1) We prepare the reception :
|
7527
7527
|
const resultPromise={
|
7528
7528
|
clientsRoomsTag:clientsRoomsTag,
|
7529
|
-
messageId:messageId,
|
7530
|
-
thenWhenReceiveMessageType:(channelNameForResponse, listenerConfig={messageType:"",condition:()=>true}, doOnIncomingMessageForResponse)=>{
|
7529
|
+
thenWhenReceiveMessageType:(channelNameForResponse, listenerConfig={messageType:"",messageId:messageId,condition:()=>true}, doOnIncomingMessageForResponse)=>{
|
7531
7530
|
listenerConfig=nonull(listenerConfig,{messageType:"",condition:()=>true});
|
7532
7531
|
const listenerId=nonull(listenerConfig.messageType,"");
|
7533
7532
|
|
7534
7533
|
//
|
7535
|
-
self.receive(channelNameForResponse, (dataLocal, clientSocket)=>{
|
7534
|
+
self.receive(channelNameForResponse, (dataLocal, clientSocket, clientReceptionEntryPoints, messageIdParam)=>{
|
7536
7535
|
|
7537
7536
|
// We check if the message matches the condition :
|
7538
7537
|
if(listenerConfig.condition && !listenerConfig.condition(dataLocal, clientSocket)) return ;
|
7539
7538
|
|
7540
7539
|
// We check if we have the same message id:
|
7541
|
-
if(
|
7540
|
+
if(messageIdParam!==dataLocal.messageId){
|
7542
7541
|
// DBG
|
7543
|
-
lognow("resultPromise.messageId:"+resultPromise.messageId+"|dataLocal.messageId"+dataLocal.messageId);
|
7542
|
+
lognow("DEBUG : Message ignored : resultPromise.messageId:"+resultPromise.messageId+"|dataLocal.messageId"+dataLocal.messageId);
|
7544
7543
|
return;
|
7545
7544
|
}
|
7546
7545
|
|
@@ -7613,7 +7612,7 @@ class ClientInstance{
|
|
7613
7612
|
// FOR THE WEBSOCKET IMPLEMENTATION :
|
7614
7613
|
clientSocket.addEventListener("message", (eventOrMessage)=>{
|
7615
7614
|
foreach(self.clientReceptionEntryPoints,(clientReceptionEntryPoint)=>{
|
7616
|
-
clientReceptionEntryPoint.execute(eventOrMessage, clientSocket, self.clientReceptionEntryPoints);
|
7615
|
+
clientReceptionEntryPoint.execute(eventOrMessage, clientSocket, self.clientReceptionEntryPoints, clientReceptionEntryPoint.listenerConfig.messageId);
|
7617
7616
|
});
|
7618
7617
|
});
|
7619
7618
|
}
|
aotrautils-srv/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils-srv",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1487",
|
4
4
|
"main": "aotrautils-srv.build.js",
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|