aotrautils 0.0.1123 → 0.0.1125
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 +12 -10
- 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 (18/03/2025-21:
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (18/03/2025-21:46:25)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -4879,15 +4879,16 @@ window.getAsFlatStructure=function(rawObject
|
|
4879
4879
|
};
|
4880
4880
|
|
4881
4881
|
function flattenGraph(root, UUID_ATTR_NAME, CLASSNAME_ATTR_NAME, POINTER_TO_ATTR_NAME) {
|
4882
|
-
const visitedObjects =
|
4882
|
+
const visitedObjects = {}; // Prevent infinite loops
|
4883
4883
|
|
4884
4884
|
function process(obj, map, isRoot=false) { // Store objects by ID
|
4885
4885
|
|
4886
4886
|
if (obj === null || isPrimitive(obj)) return obj; // Primitives stay unchanged
|
4887
|
-
|
4887
|
+
const found=visitedObjects[obj];
|
4888
|
+
if (found) return { [POINTER_TO_ATTR_NAME] : found }; // Return if already processed
|
4888
4889
|
|
4889
4890
|
const id = (isRoot?ROOT_UUID:getUUID());
|
4890
|
-
visitedObjects
|
4891
|
+
visitedObjects[obj]=id; // Mark object as processed
|
4891
4892
|
|
4892
4893
|
const serialized = {
|
4893
4894
|
[UUID_ATTR_NAME]: id,
|
@@ -4902,10 +4903,11 @@ function flattenGraph(root, UUID_ATTR_NAME, CLASSNAME_ATTR_NAME, POINTER_TO_ATTR
|
|
4902
4903
|
serialized[indexOrKey]=item; // Primitives stay unchanged
|
4903
4904
|
return "continue";
|
4904
4905
|
}
|
4905
|
-
|
4906
|
+
const foundItem=visitedObjects[item];
|
4907
|
+
if (!foundItem){
|
4906
4908
|
process(item, map);
|
4907
4909
|
}
|
4908
|
-
serialized[indexOrKey] = { [POINTER_TO_ATTR_NAME]:
|
4910
|
+
serialized[indexOrKey] = { [POINTER_TO_ATTR_NAME] : foundItem }; // Return if already processed;
|
4909
4911
|
},(item)=>!isFunction(item));
|
4910
4912
|
|
4911
4913
|
return serialized;
|
@@ -5247,7 +5249,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
5247
5249
|
|
5248
5250
|
|
5249
5251
|
|
5250
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (18/03/2025-21:
|
5252
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (18/03/2025-21:46:25)»*/
|
5251
5253
|
/*-----------------------------------------------------------------------------*/
|
5252
5254
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
5253
5255
|
*
|
@@ -13819,7 +13821,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
|
|
13819
13821
|
|
13820
13822
|
|
13821
13823
|
|
13822
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (18/03/2025-21:
|
13824
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (18/03/2025-21:46:25)»*/
|
13823
13825
|
/*-----------------------------------------------------------------------------*/
|
13824
13826
|
|
13825
13827
|
|
@@ -15058,7 +15060,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
15058
15060
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
15059
15061
|
|
15060
15062
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
15061
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (18/03/2025-21:
|
15063
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (18/03/2025-21:46:25)»*/
|
15062
15064
|
/*-----------------------------------------------------------------------------*/
|
15063
15065
|
|
15064
15066
|
|
@@ -15202,7 +15204,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
15202
15204
|
|
15203
15205
|
|
15204
15206
|
|
15205
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (18/03/2025-21:
|
15207
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (18/03/2025-21:46:25)»*/
|
15206
15208
|
/*-----------------------------------------------------------------------------*/
|
15207
15209
|
|
15208
15210
|
|
aotrautils/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1125",
|
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)",
|