aotrautils-srv 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:
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:23)»*/
|
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 (29/04/2025-00:
|
4897
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:23)»*/
|
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 (29/04/2025-00:
|
5043
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (29/04/2025-00:19:23)»*/
|
5044
5044
|
/*-----------------------------------------------------------------------------*/
|
5045
5045
|
|
5046
5046
|
|
@@ -7449,32 +7449,39 @@ class ClientReceptionEntryPoint{
|
|
7449
7449
|
// III-
|
7450
7450
|
execute(eventOrMessage, clientSocket, clientReceptionEntryPoints){
|
7451
7451
|
|
7452
|
-
const channelName=this.channelName;
|
7453
7452
|
|
7454
7453
|
const dataWrapped=WebsocketImplementation.getMessageDataBothImplementations(eventOrMessage);
|
7455
7454
|
|
7456
|
-
//
|
7457
|
-
|
7458
|
-
|
7459
|
-
|
7460
|
-
|
7455
|
+
// We check if the message is in the right channel (channel information is stored in exchanged wrapped data) :
|
7456
|
+
const channelName=this.channelName;
|
7457
|
+
if(dataWrapped.channelName && dataWrapped.channelName!==this.channelName){
|
7458
|
+
return;
|
7459
|
+
}
|
7461
7460
|
|
7461
|
+
// We check if the message is in the right room (r)oom information is stored in client socket object) :
|
7462
|
+
if(!WebsocketImplementation.isInRoom(clientSocket, this.clientsRoomsTag)){
|
7463
|
+
return;
|
7464
|
+
}
|
7465
|
+
|
7466
|
+
// We check if the message matches the required message type :
|
7462
7467
|
if( this.listenerConfig && this.listenerConfig.messageType && dataWrapped.type
|
7463
|
-
&& this.listenerConfig.messageType
|
7464
|
-
|
7465
|
-
|
7468
|
+
&& this.listenerConfig.messageType!==dataWrapped.type){
|
7469
|
+
return;
|
7470
|
+
}
|
7466
7471
|
|
7467
7472
|
// We check if the message matches the condition :
|
7468
|
-
|
7473
|
+
const dataLocal=dataWrapped.data;
|
7474
|
+
if(this.listenerConfig.condition && !this.istenerConfig.condition(dataLocal, clientSocket)){
|
7475
|
+
return;
|
7476
|
+
}
|
7469
7477
|
|
7470
|
-
const messageIdLocal=this.listenerConfig.messageId;
|
7471
7478
|
// We check if we have the same message id:
|
7479
|
+
const messageIdLocal=this.listenerConfig.messageId;
|
7472
7480
|
if(messageIdLocal!==dataLocal.messageId){
|
7473
|
-
// DBG
|
7474
|
-
lognow("DEBUG : Message ignored : messageId:"+messageIdLocal+"|dataLocal.messageId"+dataLocal.messageId);
|
7475
7481
|
return;
|
7476
7482
|
}
|
7477
7483
|
|
7484
|
+
// At this point, message is the right one, so it can be processed :
|
7478
7485
|
// --------------------------------
|
7479
7486
|
|
7480
7487
|
// We remove one-time usage listeners :
|
aotrautils-srv/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils-srv",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1498",
|
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)",
|