aotrautils-srv 0.0.1880 → 0.0.1882
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 (19/06/2026-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/06/2026-21:44:29)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5470,7 +5470,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5470
5470
|
|
|
5471
5471
|
|
|
5472
5472
|
|
|
5473
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (19/06/2026-
|
|
5473
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (19/06/2026-21:44:29)»*/
|
|
5474
5474
|
/*-----------------------------------------------------------------------------*/
|
|
5475
5475
|
|
|
5476
5476
|
|
|
@@ -5730,7 +5730,7 @@ getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProviderName=DE
|
|
|
5730
5730
|
|
|
5731
5731
|
|
|
5732
5732
|
|
|
5733
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (19/06/2026-
|
|
5733
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (19/06/2026-21:44:29)»*/
|
|
5734
5734
|
/*-----------------------------------------------------------------------------*/
|
|
5735
5735
|
|
|
5736
5736
|
|
|
@@ -5768,7 +5768,6 @@ if(typeof(window)==="undefined") window=global;
|
|
|
5768
5768
|
|
|
5769
5769
|
//*********************************** AUTO-ORGANIZING REAL-TIME AORTAC CLUSTERIZATION (AORTAC) *********************************** */
|
|
5770
5770
|
|
|
5771
|
-
const AORTAC_CLIENT_FORCE_SSL_USAGE=true;
|
|
5772
5771
|
|
|
5773
5772
|
// New implementation :
|
|
5774
5773
|
|
|
@@ -5787,7 +5786,6 @@ class AORTACClientCell{
|
|
|
5787
5786
|
this.protocol=nonull(infos.protocol,"ws");
|
|
5788
5787
|
this.host=nonull(infos.host,"localhost");
|
|
5789
5788
|
this.port=nonull(infos.port,"30000");
|
|
5790
|
-
this.usesSSL=AORTAC_CLIENT_FORCE_SSL_USAGE;
|
|
5791
5789
|
|
|
5792
5790
|
this.startTime=null;
|
|
5793
5791
|
|
|
@@ -5832,7 +5830,7 @@ class AORTACClientCell{
|
|
|
5832
5830
|
self.handleClientHelloSequence(resolve);
|
|
5833
5831
|
|
|
5834
5832
|
|
|
5835
|
-
}, self.protocol+"://"+self.host, self.port
|
|
5833
|
+
}, self.protocol+"://"+self.host, self.port);
|
|
5836
5834
|
self.initialClientInstance.client.start();
|
|
5837
5835
|
|
|
5838
5836
|
});
|
|
@@ -5911,7 +5909,6 @@ class AORTACClientCell{
|
|
|
5911
5909
|
const protocol=nonull(infos.protocol,"ws");
|
|
5912
5910
|
const host=nonull(infos.host,"localhost");
|
|
5913
5911
|
const port=nonull(infos.port,"30000");
|
|
5914
|
-
const usesSSL=AORTAC_CLIENT_FORCE_SSL_USAGE;
|
|
5915
5912
|
|
|
5916
5913
|
const reconnectedClientInstance=initClient(self.isNodeContext, false, (socketToServerClientInstance, reconnectedClientInstanceLocal)=>{
|
|
5917
5914
|
|
|
@@ -5927,7 +5924,7 @@ class AORTACClientCell{
|
|
|
5927
5924
|
self.handleReconnectedClientHelloSequence(reconnectedClientInstance, resolve)
|
|
5928
5925
|
|
|
5929
5926
|
|
|
5930
|
-
}, protocol+"://"+host, port
|
|
5927
|
+
}, protocol+"://"+host, port);
|
|
5931
5928
|
|
|
5932
5929
|
self.clientInstances[serverOrigin]=reconnectedClientInstance;
|
|
5933
5930
|
reconnectedClientInstance.client.start();
|
|
@@ -6344,7 +6341,7 @@ class AORTACServerCell{
|
|
|
6344
6341
|
// For this, use the socketToServerClientInstance attribute instead :
|
|
6345
6342
|
outcomingCell.socketToServerClientInstance=socketToServerClientInstance;
|
|
6346
6343
|
|
|
6347
|
-
}, outcomingCellProtocol+"://"+outcomingCellHost, outcomingCellPort
|
|
6344
|
+
}, outcomingCellProtocol+"://"+outcomingCellHost, outcomingCellPort);
|
|
6348
6345
|
|
|
6349
6346
|
clientInstance.client.start();
|
|
6350
6347
|
|
|
@@ -8103,7 +8100,11 @@ WebsocketImplementation={
|
|
|
8103
8100
|
// TRACE
|
|
8104
8101
|
lognow("ERROR : «ws» CONSOLE SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
8105
8102
|
|
|
8106
|
-
serverSocket=new window.WebSocketServer.WebSocketServer({
|
|
8103
|
+
//serverSocket=new window.WebSocketServer.WebSocketServer({
|
|
8104
|
+
serverSocket=new window.WebSocketServer.Server({
|
|
8105
|
+
server:listenableServer,
|
|
8106
|
+
perMessageDeflate: false,
|
|
8107
|
+
});
|
|
8107
8108
|
// DOES NOT WORK ANYMORE :
|
|
8108
8109
|
// serverSocket=new WebSocket.Server({ "server":listenableServer });
|
|
8109
8110
|
|
|
@@ -8189,11 +8190,12 @@ WebsocketImplementation={
|
|
|
8189
8190
|
// TRACE
|
|
8190
8191
|
lognow("INFO : CLIENT : Trying to establish connection to server (serverURL:«"+serverURL+"» ; port:«"+port+"» ; isSecure:«"+isSecure+"»)");
|
|
8191
8192
|
|
|
8192
|
-
|
|
8193
|
+
|
|
8193
8194
|
clientSocket=new WebSocket(serverURL+":"+port,/*WORKAROUND:*/{
|
|
8194
8195
|
// CAUTION : SECURITY BREACH :
|
|
8195
8196
|
// BUT ALSO NECESSARY TO ALLOW SELF-SIGNED CERTIFICATES USAGE WITH THE YESBOT SYSTEM ON DEV ENVIRONMENTS !
|
|
8196
|
-
|
|
8197
|
+
// (ONLY FOR DEV ENVIRONMENTS :)
|
|
8198
|
+
rejectUnauthorized:contains(serverURL, "localhost"), // (THIS IS A KNOWN SECURITY BREACH)
|
|
8197
8199
|
secure: isSecure
|
|
8198
8200
|
});
|
|
8199
8201
|
|
|
@@ -9072,7 +9074,10 @@ if(typeof(window)==="undefined") window=global;
|
|
|
9072
9074
|
// -Client :
|
|
9073
9075
|
|
|
9074
9076
|
// TODO : Use everywhere it's applicable !
|
|
9075
|
-
initClient=function(isNodeContext=true, useSocketIOImplementation=/*DEBUG*/false, doOnServerConnection=null, url, /*OPTIONAL*/port=25000,
|
|
9077
|
+
initClient=function(isNodeContext=true, useSocketIOImplementation=/*DEBUG*/false, doOnServerConnection=null, url, /*OPTIONAL*/port=25000, /*OPTIONAL*/timeout=10000, /*OPTIONAL*/selfParam=null){
|
|
9078
|
+
|
|
9079
|
+
const isSecure=(contains(url.toLowerCase(),"https:") || contains(url.toLowerCase(),"wss:"));
|
|
9080
|
+
|
|
9076
9081
|
let aotraClient={};
|
|
9077
9082
|
|
|
9078
9083
|
aotraClient.client={};
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1882",
|
|
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)",
|