aotrautils 0.0.1755 → 0.0.1757
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.
- aotrautils/aotrautils.build.js +23 -17
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (14/06/2025-00:
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (14/06/2025-02:00:36)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -3949,33 +3949,39 @@ window.setByDottedPath=(obj, path, value)=>{
|
|
3949
3949
|
}
|
3950
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
3952
|
let currentObject=obj;
|
3965
3953
|
for(let i=0; i<pathParts.length-1; i++) {
|
3954
|
+
|
3966
3955
|
const part=pathParts[i];
|
3956
|
+
// We create the sub-object if not already present:
|
3967
3957
|
if(!(part in currentObject)) {
|
3968
3958
|
const nextIsIndex=(!isNaN(pathParts[i + 1]));
|
3969
3959
|
currentObject[part]=(nextIsIndex ? [] : {});
|
3970
3960
|
}
|
3971
3961
|
currentObject=currentObject[part];
|
3962
|
+
|
3963
|
+
|
3964
|
+
if(isString(currentObject)){
|
3965
|
+
// Here we are trying to set a value inside an object, but the attribute is actually a JSON string !
|
3966
|
+
try{
|
3967
|
+
currentObject=parseJSON(currentObject);
|
3968
|
+
}catch(error){
|
3969
|
+
// Here we have a string, and we want to set a value inside the attribute, but it's not an object !
|
3970
|
+
const subPath=pathParts.slice(i+1);
|
3971
|
+
currentObject=setByDottedPath=(currentObject, subPath.join("."), value);
|
3972
|
+
return;
|
3973
|
+
}
|
3974
|
+
}
|
3975
|
+
|
3972
3976
|
}
|
3973
3977
|
const lastAttributeNameInPath=pathParts[pathParts.length-1];
|
3974
3978
|
currentObject[lastAttributeNameInPath]=value;
|
3979
|
+
|
3975
3980
|
};
|
3976
3981
|
|
3977
3982
|
|
3978
3983
|
|
3984
|
+
|
3979
3985
|
getUUID=function(mode=null){
|
3980
3986
|
|
3981
3987
|
let uuid="";
|
@@ -5005,7 +5011,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
5005
5011
|
|
5006
5012
|
|
5007
5013
|
|
5008
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (14/06/2025-00:
|
5014
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (14/06/2025-02:00:36)»*/
|
5009
5015
|
/*-----------------------------------------------------------------------------*/
|
5010
5016
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
5011
5017
|
*
|
@@ -13606,7 +13612,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
|
|
13606
13612
|
|
13607
13613
|
|
13608
13614
|
|
13609
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (14/06/2025-00:
|
13615
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (14/06/2025-02:00:36)»*/
|
13610
13616
|
/*-----------------------------------------------------------------------------*/
|
13611
13617
|
|
13612
13618
|
|
@@ -14845,7 +14851,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
14845
14851
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
14846
14852
|
|
14847
14853
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
14848
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (14/06/2025-00:
|
14854
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (14/06/2025-02:00:36)»*/
|
14849
14855
|
/*-----------------------------------------------------------------------------*/
|
14850
14856
|
|
14851
14857
|
|
@@ -14991,7 +14997,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
14991
14997
|
|
14992
14998
|
|
14993
14999
|
|
14994
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/06/2025-00:
|
15000
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/06/2025-02:00:36)»*/
|
14995
15001
|
/*-----------------------------------------------------------------------------*/
|
14996
15002
|
|
14997
15003
|
|
aotrautils/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1757",
|
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)",
|