aotrautils 0.0.2044 → 0.0.2045

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 (17/10/2026-02:53:29)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (18/10/2026-01:57:55)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -457,6 +457,30 @@ if(!window.aotestAllTestsManager){
457
457
  // Utility methods for aotest framework :
458
458
 
459
459
  // UI/CLI ONLY :
460
+
461
+ window.aotestMethods.getTestsMapForScenarii=(testsArray, scenariiNames=null/*(OPTIONAL)*/)=>{
462
+ const testsMap={};
463
+
464
+ if(!scenariiNames || scenariiNames=="" || scenariiNames=="*"){// Case we want all tests from all scenarii:
465
+ foreach(testsArray, (test, testName)=>{
466
+ // (to avoid doing this treatment several times unecessarily)
467
+ if(testsMap[testName]) return "continue";
468
+ testsMap[testName]=test;
469
+ });
470
+ }else{
471
+ foreach(scenariiNames,scenarioName=>{
472
+ foreach(testsArray,(test,testName)=>{
473
+ // (to avoid doing this treatment several times unecessarily)
474
+ if(testsMap[testName]) return "continue";
475
+ testsMap[testName]=test;
476
+ },(test, testName)=>(contains(Object.keys(test),scenarioName)));
477
+ });
478
+ }
479
+
480
+ return testsMap;
481
+ };
482
+
483
+
460
484
  window.aotestMethods.getParentTestByScenarioNameInTestsArray=function(testsArray, scenarioName){
461
485
  return foreach(testsArray,test=>{
462
486
  return window.aotestMethods.iterateOverScenariiInSingleTest(test, (parentTest, scenario)=>{
@@ -560,7 +584,7 @@ window.aotestMethods.getScenarioInSingleTest=function(test, scenarioName=null){
560
584
  window.aotestMethods.getScenariiInSingleTest=function(test, scenariiNames=null){
561
585
  let results={};
562
586
  window.aotestMethods.iterateOverScenariiInSingleTest(test,(t,s,sName)=>{
563
- if(!scenariiNames || contains(scenariiNames, sName)){
587
+ if(!scenariiNames || scenariiNames=="" || scenariiNames=="*" || contains(scenariiNames, sName)){
564
588
  results[sName]=s;
565
589
  }
566
590
  });
@@ -578,6 +602,7 @@ window.aotestMethods.iterateOverScenariiInSingleTest=function(test, doOnEachIter
578
602
 
579
603
 
580
604
 
605
+
581
606
  /*public*/window.aotestMethods.iterateOverValuesOnClonedObject=function(scenarioParam, doOnIterationForValue, visited=[], valuePath="", isValueFunction=null){
582
607
 
583
608
  // CAUTION : We ABSOLUTELY need to iterate over a deep copy, or else it will create weird incomprehensible bugs
@@ -5485,7 +5510,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
5485
5510
 
5486
5511
 
5487
5512
 
5488
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
5513
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (18/10/2026-01:57:55)»*/
5489
5514
  /*-----------------------------------------------------------------------------*/
5490
5515
  /* ## Utility global methods in a browser (htmljs) client environment.
5491
5516
  *
@@ -13053,7 +13078,7 @@ window.createOritaMicroClient=function(url, port, isNode=false, staticMicroClien
13053
13078
 
13054
13079
 
13055
13080
 
13056
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
13081
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (18/10/2026-01:57:55)»*/
13057
13082
  /*-----------------------------------------------------------------------------*/
13058
13083
 
13059
13084
 
@@ -14142,10 +14167,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
14142
14167
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14143
14168
 
14144
14169
  window.AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14145
- /*utils 3D library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
14170
+ /*utils 3D library associated with aotra version : «1_29072022-2359 (18/10/2026-01:57:55)»*/
14146
14171
  /*-----------------------------------------------------------------------------*/
14147
14172
 
14148
- /*utils AI library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
14173
+ /*utils AI library associated with aotra version : «1_29072022-2359 (18/10/2026-01:57:55)»*/
14149
14174
  /*-----------------------------------------------------------------------------*/
14150
14175
 
14151
14176
 
@@ -14409,7 +14434,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
14409
14434
 
14410
14435
 
14411
14436
 
14412
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
14437
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (18/10/2026-01:57:55)»*/
14413
14438
  /*-----------------------------------------------------------------------------*/
14414
14439
 
14415
14440
 
@@ -17956,9 +17981,9 @@ window.isURLLocalhost=(url)=>{
17956
17981
 
17957
17982
 
17958
17983
  window.assert={};
17959
- window.assert.notNull=(value, errorMessage=null)=>{
17984
+ window.assert.notNull=(value, variableName=null, errorMessage=null)=>{
17960
17985
  if(typeof(value)=="undefined" || value==null)
17961
- throw new Error(nonull(errorMessage, "ERROR : Value is null."));
17986
+ throw new Error(nonull(errorMessage, (variableName?"ERROR : "+variableName+" is null.":"ERROR : Value is null.")));
17962
17987
  };
17963
17988
 
17964
17989
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.2044",
3
+ "version": "0.0.2045",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "aotrautils",
9
- "version": "0.0.2044",
9
+ "version": "0.0.2045",
10
10
  "license": "HGPL-1.0",
11
11
  "dependencies": {
12
12
  "atob": "^2.1.2",
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.2044",
3
+ "version": "0.0.2045",
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)",