aotrautils-srv 0.0.1486 → 0.0.1488

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-02:32:10)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (28/04/2025-02:51:41)»*/
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-02:32:10)»*/
4897
+ /*utils AI library associated with aotra version : «1_29072022-2359 (28/04/2025-02:51:41)»*/
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-02:32:10)»*/
5043
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (28/04/2025-02:51:41)»*/
5044
5044
  /*-----------------------------------------------------------------------------*/
5045
5045
 
5046
5046
 
@@ -7469,7 +7469,7 @@ class ClientReceptionEntryPoint{
7469
7469
  remove(this, clientReceptionEntryPoints);
7470
7470
 
7471
7471
  if(this.doOnIncomingMessage)
7472
- this.doOnIncomingMessage(dataWrapped.data, clientSocket);
7472
+ this.doOnIncomingMessage(dataWrapped.data, clientSocket, this.listenerConfig.messageId);
7473
7473
 
7474
7474
  }
7475
7475
 
@@ -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);
7510
7510
  });
7511
7511
  }
7512
7512
 
@@ -7526,19 +7526,18 @@ 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, 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(resultPromise.messageId!==dataLocal.messageId){
7540
+ if(messageIdParam!==dataLocal.messageId){
7542
7541
  // DBG
7543
7542
  lognow("DEBUG : Message ignored : resultPromise.messageId:"+resultPromise.messageId+"|dataLocal.messageId"+dataLocal.messageId);
7544
7543
  return;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.1486",
3
+ "version": "0.0.1488",
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)",