aotrautils-srv 0.0.1096 → 0.0.1098
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 (
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (14/03/2025-00:00:46)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -5326,7 +5326,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
5326
5326
|
|
5327
5327
|
|
5328
5328
|
|
5329
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (
|
5329
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (14/03/2025-00:00:46)»*/
|
5330
5330
|
/*-----------------------------------------------------------------------------*/
|
5331
5331
|
|
5332
5332
|
|
@@ -5470,7 +5470,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
5470
5470
|
|
5471
5471
|
|
5472
5472
|
|
5473
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
5473
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (14/03/2025-00:00:46)»*/
|
5474
5474
|
/*-----------------------------------------------------------------------------*/
|
5475
5475
|
|
5476
5476
|
|
@@ -5642,7 +5642,7 @@ function isConnected(clientSocket){
|
|
5642
5642
|
|
5643
5643
|
// -Server :
|
5644
5644
|
|
5645
|
-
|
5645
|
+
getConsoleServerParams=function(portParam=null, certPathParam=null, keyPathParam=null, argsOffset=0, ignoreConsoleArgs=false){
|
5646
5646
|
|
5647
5647
|
// Node dependencies :
|
5648
5648
|
// https=require("https");
|
@@ -5662,26 +5662,20 @@ getServerParams=function(portParam=null, certPathParam=null, keyPathParam=null,
|
|
5662
5662
|
const result={};
|
5663
5663
|
|
5664
5664
|
// We read the command-line arguments if needed :
|
5665
|
-
|
5666
|
-
|
5667
|
-
|
5668
|
-
process.argv.forEach(function (val, i){
|
5669
|
-
if(i<=argsOffset+1) return;
|
5670
|
-
else if(i==argsOffset+2) argCLPort=val;
|
5671
|
-
else if(i==argsOffset+3) argCLCertPath=val;
|
5672
|
-
else if(i==argsOffset+4) argCLKeyPath=val;
|
5673
|
-
});
|
5665
|
+
const argCLPort=getConsoleParam(1,argsOffset);
|
5666
|
+
const argCLCertPath=getConsoleParam(2,argsOffset);
|
5667
|
+
const argCLKeyPath=getConsoleParam(3,argsOffset);
|
5674
5668
|
|
5675
5669
|
// Console, command-line arguments OVERRIDE parameters values :
|
5676
5670
|
|
5677
|
-
result.port=nonull(argCLPort,portParam);
|
5671
|
+
result.port=(ignoreConsoleArgs?portParam:nonull(argCLPort,portParam));
|
5678
5672
|
result.certPath=null;
|
5679
5673
|
result.keyPath=null;
|
5680
5674
|
result.isSecure=!!(certPathParam || keyPathParam);
|
5681
5675
|
|
5682
5676
|
if(result.isSecure){
|
5683
|
-
result.certPath=nonull(argCLCertPath,certPathParam);
|
5684
|
-
result.keyPath=nonull(argCLKeyPath,keyPathParam);
|
5677
|
+
result.certPath=(ignoreConsoleArgs?certPathParam:nonull(argCLCertPath,certPathParam));
|
5678
|
+
result.keyPath=(ignoreConsoleArgs?keyPathParam:nonull(argCLKeyPath,keyPathParam));
|
5685
5679
|
}
|
5686
5680
|
|
5687
5681
|
// Eventual encryption options :
|
aotrautils-srv/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils-srv",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1098",
|
4
4
|
"main": "aotrautils-srv.build.js",
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|