aotrautils 0.0.1496 → 0.0.1498

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 (29/04/2025-00:13:27)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:20)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4894,7 +4894,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4894
4894
 
4895
4895
 
4896
4896
 
4897
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (29/04/2025-00:13:27)»*/
4897
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:20)»*/
4898
4898
  /*-----------------------------------------------------------------------------*/
4899
4899
  /* ## Utility global methods in a browser (htmljs) client environment.
4900
4900
  *
@@ -13466,7 +13466,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
13466
13466
 
13467
13467
 
13468
13468
 
13469
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (29/04/2025-00:13:27)»*/
13469
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:20)»*/
13470
13470
  /*-----------------------------------------------------------------------------*/
13471
13471
 
13472
13472
 
@@ -14705,7 +14705,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14705
14705
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14706
14706
 
14707
14707
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14708
- /*utils AI library associated with aotra version : «1_29072022-2359 (29/04/2025-00:13:27)»*/
14708
+ /*utils AI library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:20)»*/
14709
14709
  /*-----------------------------------------------------------------------------*/
14710
14710
 
14711
14711
 
@@ -14851,7 +14851,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
14851
14851
 
14852
14852
 
14853
14853
 
14854
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (29/04/2025-00:13:27)»*/
14854
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:20)»*/
14855
14855
  /*-----------------------------------------------------------------------------*/
14856
14856
 
14857
14857
 
@@ -17260,32 +17260,39 @@ class ClientReceptionEntryPoint{
17260
17260
  // III-
17261
17261
  execute(eventOrMessage, clientSocket, clientReceptionEntryPoints){
17262
17262
 
17263
- const channelName=this.channelName;
17264
17263
 
17265
17264
  const dataWrapped=WebsocketImplementation.getMessageDataBothImplementations(eventOrMessage);
17266
17265
 
17267
- // Channel information is stored in exchanged data :
17268
- if(dataWrapped.channelName && dataWrapped.channelName!==this.channelName) return;
17269
-
17270
- // Room information is stored in client socket object :
17271
- if(!WebsocketImplementation.isInRoom(clientSocket, this.clientsRoomsTag)) return;
17266
+ // We check if the message is in the right channel (channel information is stored in exchanged wrapped data) :
17267
+ const channelName=this.channelName;
17268
+ if(dataWrapped.channelName && dataWrapped.channelName!==this.channelName){
17269
+ return;
17270
+ }
17272
17271
 
17272
+ // We check if the message is in the right room (r)oom information is stored in client socket object) :
17273
+ if(!WebsocketImplementation.isInRoom(clientSocket, this.clientsRoomsTag)){
17274
+ return;
17275
+ }
17276
+
17277
+ // We check if the message matches the required message type :
17273
17278
  if( this.listenerConfig && this.listenerConfig.messageType && dataWrapped.type
17274
- && this.listenerConfig.messageType===dataWrapped.type) return;
17275
-
17276
- const dataLocal=dataWrapped.data;
17279
+ && this.listenerConfig.messageType!==dataWrapped.type){
17280
+ return;
17281
+ }
17277
17282
 
17278
17283
  // We check if the message matches the condition :
17279
- if(this.listenerConfig.condition && !lthis.istenerConfig.condition(dataLocal, clientSocket)) return ;
17284
+ const dataLocal=dataWrapped.data;
17285
+ if(this.listenerConfig.condition && !this.istenerConfig.condition(dataLocal, clientSocket)){
17286
+ return;
17287
+ }
17280
17288
 
17281
- const messageIdLocal=this.listenerConfig.messageId;
17282
17289
  // We check if we have the same message id:
17290
+ const messageIdLocal=this.listenerConfig.messageId;
17283
17291
  if(messageIdLocal!==dataLocal.messageId){
17284
- // DBG
17285
- lognow("DEBUG : Message ignored : messageId:"+messageIdLocal+"|dataLocal.messageId"+dataLocal.messageId);
17286
17292
  return;
17287
17293
  }
17288
17294
 
17295
+ // At this point, message is the right one, so it can be processed :
17289
17296
  // --------------------------------
17290
17297
 
17291
17298
  // We remove one-time usage listeners :
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1496",
3
+ "version": "0.0.1498",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",