aotrautils-srv 0.0.1765 → 0.0.1766

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 (14/06/2025-12:01:39)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (14/06/2025-13:36:49)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -3958,16 +3958,19 @@ window.setByDottedPath=(obj, path, value)=>{
3958
3958
  const nextIsIndex=(!isNaN(pathParts[i + 1]));
3959
3959
  currentObject[part]=(nextIsIndex ? [] : {});
3960
3960
  }
3961
+ const previousObject=currentObject;
3961
3962
  currentObject=currentObject[part];
3962
3963
 
3963
3964
  if(isString(currentObject)){
3964
3965
  // Here we are trying to set a value inside an object, but the attribute is actually a JSON string !
3965
3966
  try{
3966
- currentObject=parseJSON(currentObject);
3967
+ previousObject[part]=parseJSON(currentObject);
3968
+ // We need to update the current object again...(since we have competely transformed it)
3969
+ currentObject=currentObject[part];
3967
3970
  }catch(error){
3968
3971
  // Here we have a string, and we want to set a value inside the attribute, but it's not an object !
3969
- const subPath=pathParts.slice(i+1);
3970
- currentObject=setByDottedPath=(currentObject, subPath.join("."), value);
3972
+ const subPathToChild=pathParts.slice(i+1);
3973
+ setByDottedPath(currentObject, subPathToChild.join("."), value);
3971
3974
  return;
3972
3975
  }
3973
3976
  }
@@ -5009,7 +5012,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5009
5012
 
5010
5013
 
5011
5014
 
5012
- /*utils AI library associated with aotra version : «1_29072022-2359 (14/06/2025-12:01:39)»*/
5015
+ /*utils AI library associated with aotra version : «1_29072022-2359 (14/06/2025-13:36:49)»*/
5013
5016
  /*-----------------------------------------------------------------------------*/
5014
5017
 
5015
5018
 
@@ -5155,7 +5158,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
5155
5158
 
5156
5159
 
5157
5160
 
5158
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/06/2025-12:01:39)»*/
5161
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/06/2025-13:36:49)»*/
5159
5162
  /*-----------------------------------------------------------------------------*/
5160
5163
 
5161
5164
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.1765",
3
+ "version": "0.0.1766",
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)",