aotrautils-srv 0.0.1856 → 0.0.1858

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 (18/06/2026-17:20:52)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (18/06/2026-17:25:38)»*/
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 (18/06/2026-17:20:52)»*/
5473
+ /*utils AI library associated with aotra version : «1_29072022-2359 (18/06/2026-17:25:38)»*/
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 (18/06/2026-17:20:52)»*/
5733
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (18/06/2026-17:25:38)»*/
5734
5734
  /*-----------------------------------------------------------------------------*/
5735
5735
 
5736
5736
 
@@ -8014,13 +8014,11 @@ WebsocketImplementation={
8014
8014
  // TRACE
8015
8015
  console.log("«ws» SERVER library not called yet, calling it now.");
8016
8016
 
8017
- const {WebSocket, WebSocketServer}=require("ws");
8018
- window.WebSocket=WebSocket;
8019
- window.WebSocketServer=WebSocketServer;
8017
+ window.WebSocket=require("ws");
8020
8018
 
8021
8019
  if(typeof(WebSocket)==="undefined"){
8022
8020
  // TRACE
8023
- console.log("ERROR : «ws» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
8021
+ console.log("ERROR : «ws» CONSOLE/BROWSER CLIENT library not found. Cannot launch nodejs server. Aborting.");
8024
8022
  }
8025
8023
  }
8026
8024
  }
@@ -8097,6 +8095,16 @@ WebsocketImplementation={
8097
8095
  // NODE SERVER MODE ONLY :
8098
8096
  let serverSocket;
8099
8097
  if(!WebsocketImplementation.useSocketIOImplementation){
8098
+
8099
+ if(typeof(WebSocketServer)==="undefined"){
8100
+ window.WebSocketServer=require("ws");
8101
+ }
8102
+
8103
+ if(typeof(WebSocketServer)==="undefined"){
8104
+ // TRACE
8105
+ console.log("ERROR : «ws» CONSOLE SERVER library not found. Cannot launch nodejs server. Aborting.");
8106
+ }
8107
+
8100
8108
  serverSocket=new window.WebSocketServer({ "server":listenableServer });
8101
8109
  }else{
8102
8110
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.1856",
3
+ "version": "0.0.1858",
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)",