aotrautils 0.0.2010 → 0.0.2012

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 (05/10/2026-01:44:08)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (05/10/2026-02:19:49)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5485,7 +5485,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
5485
5485
 
5486
5486
 
5487
5487
 
5488
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (05/10/2026-01:44:08)»*/
5488
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (05/10/2026-02:19:49)»*/
5489
5489
  /*-----------------------------------------------------------------------------*/
5490
5490
  /* ## Utility global methods in a browser (htmljs) client environment.
5491
5491
  *
@@ -13000,7 +13000,7 @@ window.createOritaMicroClient=function(url, port, isNode=false, staticMicroClien
13000
13000
 
13001
13001
 
13002
13002
 
13003
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (05/10/2026-01:44:08)»*/
13003
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (05/10/2026-02:19:49)»*/
13004
13004
  /*-----------------------------------------------------------------------------*/
13005
13005
 
13006
13006
 
@@ -14089,10 +14089,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
14089
14089
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14090
14090
 
14091
14091
  window.AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14092
- /*utils 3D library associated with aotra version : «1_29072022-2359 (05/10/2026-01:44:08)»*/
14092
+ /*utils 3D library associated with aotra version : «1_29072022-2359 (05/10/2026-02:19:49)»*/
14093
14093
  /*-----------------------------------------------------------------------------*/
14094
14094
 
14095
- /*utils AI library associated with aotra version : «1_29072022-2359 (05/10/2026-01:44:08)»*/
14095
+ /*utils AI library associated with aotra version : «1_29072022-2359 (05/10/2026-02:19:49)»*/
14096
14096
  /*-----------------------------------------------------------------------------*/
14097
14097
 
14098
14098
 
@@ -14356,7 +14356,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
14356
14356
 
14357
14357
 
14358
14358
 
14359
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (05/10/2026-01:44:08)»*/
14359
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (05/10/2026-02:19:49)»*/
14360
14360
  /*-----------------------------------------------------------------------------*/
14361
14361
 
14362
14362
 
@@ -18349,6 +18349,7 @@ window.NodeServerInstance=class NodeServerInstance{
18349
18349
  //sendChainable(channelNameParam, data, clientsRoomsTag=null){
18350
18350
  //}
18351
18351
 
18352
+ // I-
18352
18353
  receive(channelNameParam, doOnIncomingMessage, listenerConfig=null, clientsRoomsTag=null){
18353
18354
 
18354
18355
  // DBG
@@ -18462,6 +18463,8 @@ window.NodeServerInstance=class NodeServerInstance{
18462
18463
  onConnectionToClient(doOnConnection, doOnConnectionLost=null){
18463
18464
  const self=this;
18464
18465
 
18466
+ // DBG
18467
+ console.log("(DEBUG) SERVER : Using websocket implementation:",window.WebsocketImplementation.implementationToUse);
18465
18468
 
18466
18469
  // «connection» is the only event fired by the serverSocket :
18467
18470
  this.serverSocket.on("connection", (clientSocket)=>{
@@ -18477,31 +18480,28 @@ window.NodeServerInstance=class NodeServerInstance{
18477
18480
  const doOnMessage=(eventOrMessage)=>{
18478
18481
 
18479
18482
  // DEBUG FOR BUN COMPATIBILITY PROBLEMS :
18480
- let rawData=((eventOrMessage && eventOrMessage.data) ? eventOrMessage.data : eventOrMessage);
18481
- if(rawData && typeof(rawData)!=="string"){
18482
- rawData=rawData.toString();
18483
- }
18484
- let message=rawData;
18485
- if(message && isString(message)){
18483
+ //let rawData=((eventOrMessage && eventOrMessage.data) ? eventOrMessage.data : eventOrMessage);
18484
+ if(eventOrMessage && eventOrMessage.data && typeof(eventOrMessage.data)!=="string"){
18485
+ // Case Buffer :
18486
+ eventOrMessage.data=eventOrMessage.data.toString();
18486
18487
  try{
18487
- message=JSON.parse(rawData);
18488
+ eventOrMessage.data=JSON.parse(eventOrMessage.data);
18488
18489
  }catch(error){
18489
- lognow("ERROR : Could not parse JSON : rawData:"+rawData, error);
18490
+ lognow("ERROR : Could not parse JSON : eventOrMessage.data:"+eventOrMessage.data, error);
18490
18491
  }
18491
18492
  }
18492
18493
 
18493
18494
  //DBG
18494
- lognow("(DEBUG)(COMMONS)>>>>>>>>><message:",message);
18495
- lognow("(DEBUG)(COMMONS)>>>>>>>>><self.serverReceptionEntryPoints:",self.serverReceptionEntryPoints);
18495
+ lognow("(DEBUG)(COMMONS)>>>>>>>>><eventOrMessage:",eventOrMessage);
18496
18496
 
18497
18497
  // We execute the events registration listeners entry points:
18498
18498
  foreach(self.serverReceptionEntryPoints,(serverReceptionEntryPoint,i)=>{
18499
- serverReceptionEntryPoint.execute(message, clientSocket);
18499
+ serverReceptionEntryPoint.execute(eventOrMessage, clientSocket);
18500
18500
  });
18501
18501
  };
18502
18502
 
18503
18503
  // if(!window.WebsocketImplementation.useSocketIOImplementation){
18504
- if(!window.WebsocketImplementation.implementationToUse){
18504
+ if(!window.WebsocketImplementation.implementationToUse){ // (Case default implementation (websocket))
18505
18505
  // DOES NOT WORK WITH BUN : clientSocket.addEventListener("message", doOnMessage);
18506
18506
  // DOES NOT WORK AT ALL : clientSocket.on("message", doOnMessage);
18507
18507
  clientSocket.onmessage=doOnMessage;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.2010",
3
+ "version": "0.0.2012",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "aotrautils",
9
- "version": "0.0.2010",
9
+ "version": "0.0.2012",
10
10
  "license": "HGPL-1.0",
11
11
  "dependencies": {
12
12
  "atob": "^2.1.2",
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.2010",
3
+ "version": "0.0.2012",
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)",