aotrautils-srv 0.0.1471 → 0.0.1473
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/04/2025-12:
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (26/04/2025-12:57: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 (26/04/2025-12:
|
4897
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (26/04/2025-12:57:23)»*/
|
4898
4898
|
/*-----------------------------------------------------------------------------*/
|
4899
4899
|
|
4900
4900
|
|
@@ -5040,7 +5040,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
5040
5040
|
|
5041
5041
|
|
5042
5042
|
|
5043
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (26/04/2025-12:
|
5043
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (26/04/2025-12:57:23)»*/
|
5044
5044
|
/*-----------------------------------------------------------------------------*/
|
5045
5045
|
|
5046
5046
|
|
@@ -6040,30 +6040,25 @@ WebsocketImplementation={
|
|
6040
6040
|
// TODO : ADD TO ALL OTHER SUBSYSTEMS !
|
6041
6041
|
id:receptionEntryPointId,
|
6042
6042
|
listenerConfig:listenerConfig,
|
6043
|
+
doOnIncomingMessage:doOnIncomingMessage,
|
6043
6044
|
execute:(eventOrMessage)=>{
|
6044
6045
|
|
6045
6046
|
const dataWrapped=WebsocketImplementation.getMessageDataBothImplementations(eventOrMessage);
|
6046
|
-
|
6047
|
-
// // DBG
|
6048
|
-
// lognow("(CLIENT) (DEBUG) CLIENT RECEIVED SOMETHING FROM SERVER :",dataWrapped);
|
6049
6047
|
|
6050
6048
|
// Channel information is stored in exchanged data :
|
6051
|
-
if(dataWrapped.channelName && dataWrapped.channelName!==
|
6049
|
+
if(dataWrapped.channelName && dataWrapped.channelName!==this.channelName) return;
|
6052
6050
|
|
6053
|
-
const clientSocket=browserInstance.clientSocket;
|
6054
|
-
|
6055
6051
|
// Room information is stored in client socket object :
|
6056
|
-
|
6057
|
-
|
6052
|
+
const clientSocket=browserInstance.clientSocket;
|
6053
|
+
if(!WebsocketImplementation.isInRoom(clientSocket, this.clientsRoomsTag)) return;
|
6058
6054
|
|
6059
6055
|
// We remove one-time usage listeners :
|
6060
6056
|
// We remove BEFORE executing doOnIncomingMessage(), because in this function we can have other listener registration UNDER THE SAME ID !
|
6061
|
-
if(listenerConfig && listenerConfig.destroyListenerAfterReceiving)
|
6057
|
+
if(this.listenerConfig && this.listenerConfig.destroyListenerAfterReceiving)
|
6062
6058
|
remove(browserInstance.receptionEntryPoints, receptionEntryPoint);
|
6063
6059
|
|
6064
|
-
|
6065
|
-
|
6066
|
-
doOnIncomingMessage(dataWrapped.data, clientSocket);
|
6060
|
+
if(this.doOnIncomingMessage)
|
6061
|
+
this.doOnIncomingMessage(dataWrapped.data, clientSocket);
|
6067
6062
|
|
6068
6063
|
}
|
6069
6064
|
};
|
aotrautils-srv/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils-srv",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1473",
|
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)",
|