aotrautils-srv 0.0.2004 → 0.0.2005

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-00:57:51)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (05/10/2026-01:12:37)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5485,7 +5485,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
5485
5485
 
5486
5486
 
5487
5487
 
5488
- /*utils AI library associated with aotra version : «1_29072022-2359 (05/10/2026-00:57:51)»*/
5488
+ /*utils AI library associated with aotra version : «1_29072022-2359 (05/10/2026-01:12:37)»*/
5489
5489
  /*-----------------------------------------------------------------------------*/
5490
5490
 
5491
5491
 
@@ -5749,7 +5749,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
5749
5749
 
5750
5750
 
5751
5751
 
5752
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (05/10/2026-00:57:51)»*/
5752
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (05/10/2026-01:12:37)»*/
5753
5753
  /*-----------------------------------------------------------------------------*/
5754
5754
 
5755
5755
 
@@ -9869,13 +9869,23 @@ window.NodeServerInstance=class NodeServerInstance{
9869
9869
 
9870
9870
  const doOnMessage=(eventOrMessage)=>{
9871
9871
 
9872
- // DBG
9873
- const data=(eventOrMessage && eventOrMessage.data) ? eventOrMessage.data : eventOrMessage;
9874
- console.log("(DEBUG) doOnMessage listener : data:", data);
9872
+ // DEBUG FOR BUN COMPATIBILITY PROBLEMS :
9873
+ let rawData=((eventOrMessage && eventOrMessage.data) ? eventOrMessage.data : eventOrMessage);
9874
+ if(rawData && typeof(rawData)!=="string"){
9875
+ rawData=rawData.toString();
9876
+ }
9877
+ let message=rawData;
9878
+ if(message && isString(message)){
9879
+ try{
9880
+ message=JSON.parse(rawData);
9881
+ }catch(error){
9882
+ lognow("ERROR : Could not parse JSON : rawData:"+rawData, error);
9883
+ }
9884
+ }
9875
9885
 
9876
9886
  // We execute the events registration listeners entry points:
9877
9887
  foreach(self.serverReceptionEntryPoints,(serverReceptionEntryPoint,i)=>{
9878
- serverReceptionEntryPoint.execute(eventOrMessage, clientSocket);
9888
+ serverReceptionEntryPoint.execute(message, clientSocket);
9879
9889
  });
9880
9890
  };
9881
9891
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.2004",
3
+ "version": "0.0.2005",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "aotrautils-srv",
9
- "version": "0.0.2004",
9
+ "version": "0.0.2005",
10
10
  "license": "HGPL-1.0",
11
11
  "dependencies": {
12
12
  "atob": "^2.1.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.2004",
3
+ "version": "0.0.2005",
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)",