aotrautils 0.0.1754 → 0.0.1755

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 (13/06/2025-23:25:36)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (14/06/2025-00:05:06)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -3947,8 +3947,21 @@ window.setByDottedPath=(obj, path, value)=>{
3947
3947
  if(!contains(path,".")){
3948
3948
  obj[path]=value;
3949
3949
  }
3950
- let currentObject=obj;
3950
+
3951
3951
  const pathParts=path.split(".");
3952
+
3953
+ if(isString(obj)){
3954
+ // Here we are trying to set a value inside an object, but the attribute is actually a JSON string !
3955
+ try{
3956
+ obj=parseJSON(obj);
3957
+ }catch(error){
3958
+ const lastAttributeNameInPath=pathParts[pathParts.length-1];
3959
+ currentObject[lastAttributeNameInPath]=value;
3960
+ return;
3961
+ }
3962
+ }
3963
+
3964
+ let currentObject=obj;
3952
3965
  for(let i=0; i<pathParts.length-1; i++) {
3953
3966
  const part=pathParts[i];
3954
3967
  if(!(part in currentObject)) {
@@ -3957,7 +3970,7 @@ window.setByDottedPath=(obj, path, value)=>{
3957
3970
  }
3958
3971
  currentObject=currentObject[part];
3959
3972
  }
3960
- const lastAttributeNameInPath=pathParts[pathParts.length - 1];
3973
+ const lastAttributeNameInPath=pathParts[pathParts.length-1];
3961
3974
  currentObject[lastAttributeNameInPath]=value;
3962
3975
  };
3963
3976
 
@@ -4992,7 +5005,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4992
5005
 
4993
5006
 
4994
5007
 
4995
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (13/06/2025-23:25:36)»*/
5008
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (14/06/2025-00:05:06)»*/
4996
5009
  /*-----------------------------------------------------------------------------*/
4997
5010
  /* ## Utility global methods in a browser (htmljs) client environment.
4998
5011
  *
@@ -13593,7 +13606,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
13593
13606
 
13594
13607
 
13595
13608
 
13596
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (13/06/2025-23:25:36)»*/
13609
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (14/06/2025-00:05:06)»*/
13597
13610
  /*-----------------------------------------------------------------------------*/
13598
13611
 
13599
13612
 
@@ -14832,7 +14845,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14832
14845
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14833
14846
 
14834
14847
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14835
- /*utils AI library associated with aotra version : «1_29072022-2359 (13/06/2025-23:25:36)»*/
14848
+ /*utils AI library associated with aotra version : «1_29072022-2359 (14/06/2025-00:05:06)»*/
14836
14849
  /*-----------------------------------------------------------------------------*/
14837
14850
 
14838
14851
 
@@ -14978,7 +14991,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
14978
14991
 
14979
14992
 
14980
14993
 
14981
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (13/06/2025-23:25:36)»*/
14994
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/06/2025-00:05:06)»*/
14982
14995
  /*-----------------------------------------------------------------------------*/
14983
14996
 
14984
14997
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1754",
3
+ "version": "0.0.1755",
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)",