aotrautils 0.0.588 → 0.0.590

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 (11/09/2023-23:22:54)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (15/09/2023-01:26:48)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -461,8 +461,8 @@ window.aotestMethods.getScenariiInTest=function(test){
461
461
 
462
462
  const loopResultI=foreach(allTestsByType,(testsByFunction,functionName)=>{
463
463
  const loopResultJ=foreach(testsByFunction,(test,executionCoupleName)=>{ // (execution couple IS test)
464
-
465
- const scenarii=aotestMethods.getScenariiInTest(test)
464
+
465
+ const scenarii=aotestMethods.getScenariiInTest(test);
466
466
  const loopResultK=foreach(scenarii,(scenario, scenarioName)=>{
467
467
 
468
468
  if(doOnIteration) doOnIteration(scenario, test);
@@ -477,7 +477,7 @@ window.aotestMethods.getScenariiInTest=function(test){
477
477
  });
478
478
 
479
479
  if(loopResultJ)
480
- return loopResultJ;
480
+ return loopResultJ;
481
481
 
482
482
  });
483
483
 
@@ -487,14 +487,12 @@ window.aotestMethods.getScenariiInTest=function(test){
487
487
  /*public*/window.aotestMethods.iterateOverScenarii=function(allTests, doOnIteration, testsType=null, filter=null, mustTerminate=null){
488
488
 
489
489
  if(testsType){
490
-
491
490
  if(testsType==="*"){
492
491
  return foreach(allTests,(allTestsByType,t)=>{
493
492
  const loopResult=window.aotestMethods.doForAllTestsByType(allTestsByType, doOnIteration, filter, mustTerminate);
494
493
  if(loopResult)
495
494
  return loopResult;
496
495
  });
497
-
498
496
  }
499
497
 
500
498
  const allTestsByType=allTests[testsType];
@@ -503,14 +501,19 @@ window.aotestMethods.getScenariiInTest=function(test){
503
501
 
504
502
  const allTestsByType=allTests;
505
503
  return window.aotestMethods.doForAllTestsByType(allTestsByType, doOnIteration, filter, mustTerminate);
506
-
507
504
  };
508
505
 
509
- /*public*/window.aotestMethods.iterateOverValues=function(scenario, doOnIterationForValue, visited=[], valuePath=""){
506
+ /*public*/window.aotestMethods.iterateOverValues=function(scenarioParam, doOnIterationForValue, visited=[], valuePath=""){
507
+
508
+ // CAUTION : We ABSOLUTELY need to iterate over a deep copy, or else it will create weird incomprehensible bugs
509
+ // if we do another recursive browsing on the initial object !!!
510
+ const scenario=JSON.parse(JSON.stringify(scenarioParam));
511
+
510
512
 
511
513
  const basePath=valuePath;
512
514
  foreach(scenario,(item, itemNameOrIndex)=>{
513
- if(contains(visited,item)) return "continue";
515
+
516
+ if(contains(visited, item)) return "continue";
514
517
  visited.push(item);
515
518
 
516
519
  valuePath=basePath+"."+itemNameOrIndex;
@@ -4979,7 +4982,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4979
4982
 
4980
4983
 
4981
4984
 
4982
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (11/09/2023-23:22:54)»*/
4985
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (15/09/2023-01:26:48)»*/
4983
4986
  /*-----------------------------------------------------------------------------*/
4984
4987
  /* ## Utility global methods in a browser (htmljs) client environment.
4985
4988
  *
@@ -13246,7 +13249,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13246
13249
 
13247
13250
 
13248
13251
 
13249
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (11/09/2023-23:22:54)»*/
13252
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (15/09/2023-01:26:48)»*/
13250
13253
  /*-----------------------------------------------------------------------------*/
13251
13254
 
13252
13255
 
@@ -14485,7 +14488,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14485
14488
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14486
14489
 
14487
14490
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14488
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (11/09/2023-23:22:54)»*/
14491
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (15/09/2023-01:26:48)»*/
14489
14492
  /*-----------------------------------------------------------------------------*/
14490
14493
 
14491
14494
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.588",
3
+ "version": "0.0.590",
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)",