aotrautils 0.0.458 → 0.0.459

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 (26/01/2023-19:45:13)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (26/01/2023-23:29:41)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4864,7 +4864,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4864
4864
 
4865
4865
 
4866
4866
 
4867
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (26/01/2023-19:45:13)»*/
4867
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (26/01/2023-23:29:41)»*/
4868
4868
  /*-----------------------------------------------------------------------------*/
4869
4869
  /* ## Utility global methods in a browser (htmljs) client environment.
4870
4870
  *
@@ -12986,7 +12986,7 @@ createOritaMicroClient=function(url, port, isNode=false){
12986
12986
  };
12987
12987
 
12988
12988
 
12989
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (26/01/2023-19:45:13)»*/
12989
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (26/01/2023-23:29:41)»*/
12990
12990
  /*-----------------------------------------------------------------------------*/
12991
12991
 
12992
12992
 
@@ -14214,7 +14214,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14214
14214
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14215
14215
 
14216
14216
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14217
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (26/01/2023-19:45:13)»*/
14217
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (26/01/2023-23:29:41)»*/
14218
14218
  /*-----------------------------------------------------------------------------*/
14219
14219
 
14220
14220
 
@@ -15175,9 +15175,13 @@ WebsocketImplementation={
15175
15175
 
15176
15176
  const resultPromise={
15177
15177
  clientsRoomsTag:clientsRoomsTag,
15178
- thenWhenReceiveMessageType:(channelNameForResponse, messageTypeForResponse, doOnIncomingMessageForResponse)=>{
15179
- const listenerId=messageTypeForResponse;
15180
- browserInstance.receive(channelNameForResponse, doOnIncomingMessageForResponse, this.clientsRoomsTag, listenerId);
15178
+ thenWhenReceiveMessageType:(channelNameForResponse, listenerConfig={messageType:"",condition:()=>true}, doOnIncomingMessageForResponse)=>{
15179
+ const listenerId=nonull(listenerConfig.messageType,"");
15180
+ browserInstance.receive(channelNameForResponse, (data, clientSocket)=>{
15181
+
15182
+ if(listenerConfig.condition && !listenerConfig.condition(data, clientSocket)) return ;
15183
+ doOnIncomingMessageForResponse(data, clientSocket);
15184
+ }, this.clientsRoomsTag, listenerId);
15181
15185
  return this;
15182
15186
  }
15183
15187
  };
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.458",
3
+ "version": "0.0.459",
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)",