aotrautils 0.0.1358 → 0.0.1360

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 (12/04/2025-02:45:29)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:47)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4898,7 +4898,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4898
4898
 
4899
4899
 
4900
4900
 
4901
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:29)»*/
4901
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:47)»*/
4902
4902
  /*-----------------------------------------------------------------------------*/
4903
4903
  /* ## Utility global methods in a browser (htmljs) client environment.
4904
4904
  *
@@ -13470,7 +13470,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
13470
13470
 
13471
13471
 
13472
13472
 
13473
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:29)»*/
13473
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:47)»*/
13474
13474
  /*-----------------------------------------------------------------------------*/
13475
13475
 
13476
13476
 
@@ -14709,7 +14709,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14709
14709
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14710
14710
 
14711
14711
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14712
- /*utils AI library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:29)»*/
14712
+ /*utils AI library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:47)»*/
14713
14713
  /*-----------------------------------------------------------------------------*/
14714
14714
 
14715
14715
 
@@ -14826,7 +14826,8 @@ class OpenAIAPIClient{
14826
14826
  console.log("~~~~~~~~~~~assistantReply :",assistantReply);
14827
14827
 
14828
14828
  resolve(assistantReply);
14829
- }).catch(error => {
14829
+ }).catch(errorObj)=>{
14830
+ const error=errorObj.error, httpStatus=errorObj.httpStatus;
14830
14831
  // TRACE
14831
14832
  console.error("Error:", error);
14832
14833
  reject(error);
@@ -14853,7 +14854,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
14853
14854
 
14854
14855
 
14855
14856
 
14856
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:29)»*/
14857
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:47)»*/
14857
14858
  /*-----------------------------------------------------------------------------*/
14858
14859
 
14859
14860
 
@@ -16633,7 +16634,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
16633
16634
  const error=nonull(data.error, data.detail);
16634
16635
  // TRACE
16635
16636
  console.error("Error:", error);
16636
- reject(""+error, status);
16637
+ reject({error:""+error, httpStatus:status});
16637
16638
  return;
16638
16639
  }
16639
16640
 
@@ -16644,7 +16645,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
16644
16645
  }).catch(error => {
16645
16646
  // TRACE
16646
16647
  console.error("Error:", error);
16647
- reject(`${error}`, null);
16648
+ reject({error:`${error}`, httpStatus:null});
16648
16649
  });
16649
16650
  });
16650
16651
  }// else :
@@ -16711,7 +16712,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
16711
16712
  const error=nonull(response.statusMessage, "No error message for error code "+status);
16712
16713
  // TRACE
16713
16714
  console.error("Error:", error);
16714
- reject(""+error, status);
16715
+ reject({error:""+error, httpStatus:status});
16715
16716
  return;
16716
16717
  }
16717
16718
 
@@ -16728,7 +16729,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
16728
16729
 
16729
16730
  // Handle errors
16730
16731
  request.on("error", (error) => {
16731
- reject(error);
16732
+ reject({error:error, httpStatus:null});
16732
16733
  });
16733
16734
 
16734
16735
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1358",
3
+ "version": "0.0.1360",
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)",