aotrautils-srv 0.0.1933 → 0.0.1934
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 (02/08/2026-00:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (02/08/2026-00:47:56)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5470,7 +5470,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5470
5470
|
|
|
5471
5471
|
|
|
5472
5472
|
|
|
5473
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (02/08/2026-00:
|
|
5473
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (02/08/2026-00:47:56)»*/
|
|
5474
5474
|
/*-----------------------------------------------------------------------------*/
|
|
5475
5475
|
|
|
5476
5476
|
|
|
@@ -5730,7 +5730,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
|
|
|
5730
5730
|
|
|
5731
5731
|
|
|
5732
5732
|
|
|
5733
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (02/08/2026-00:
|
|
5733
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (02/08/2026-00:47:56)»*/
|
|
5734
5734
|
/*-----------------------------------------------------------------------------*/
|
|
5735
5735
|
|
|
5736
5736
|
|
|
@@ -8236,7 +8236,7 @@ window.WebsocketImplementation={
|
|
|
8236
8236
|
// CAUTION : SECURITY BREACH :
|
|
8237
8237
|
// BUT ALSO NECESSARY TO ALLOW SELF-SIGNED CERTIFICATES USAGE WITH THE YESBOT SYSTEM ON DEV ENVIRONMENTS !
|
|
8238
8238
|
// (ONLY FOR DEV ENVIRONMENTS :)
|
|
8239
|
-
rejectUnauthorized:
|
|
8239
|
+
rejectUnauthorized:isURLLocalhost(serverURL), // (THIS IS A KNOWN SECURITY BREACH)
|
|
8240
8240
|
secure: isSecure
|
|
8241
8241
|
});
|
|
8242
8242
|
|
|
@@ -8842,8 +8842,7 @@ window.getListManager=function(config){
|
|
|
8842
8842
|
// function performHTTPRequest(...){...
|
|
8843
8843
|
// USE THIS INSTEAD :
|
|
8844
8844
|
window.performHTTPRequest=function(completeURL, httpMethod="GET", headers={}, requestBodyOrNamedArgs=null, isNodeContext=false,
|
|
8845
|
-
addCORSHeader=ADD_CORS_HEADER_BY_DEFAULT
|
|
8846
|
-
allowSelfSignedCerts=false/*RECOMMENDED VALUE, TRY NOT TO SET IT TO «true» !!!*/){
|
|
8845
|
+
addCORSHeader=ADD_CORS_HEADER_BY_DEFAULT){
|
|
8847
8846
|
|
|
8848
8847
|
// Body
|
|
8849
8848
|
let requestBodyOrNamedArgsStr=null;
|
|
@@ -8900,8 +8899,9 @@ window.performHTTPRequest=function(completeURL, httpMethod="GET", headers={}, re
|
|
|
8900
8899
|
};
|
|
8901
8900
|
|
|
8902
8901
|
|
|
8903
|
-
if(
|
|
8904
|
-
options.rejectUnauthorized=
|
|
8902
|
+
if(isURLLocalhost(completeURL)){
|
|
8903
|
+
options.rejectUnauthorized=false;
|
|
8904
|
+
}
|
|
8905
8905
|
|
|
8906
8906
|
|
|
8907
8907
|
return new Promise((resolve,reject)=>{
|
|
@@ -8963,10 +8963,11 @@ window.performHTTPRequest=function(completeURL, httpMethod="GET", headers={}, re
|
|
|
8963
8963
|
options.headers=headers;
|
|
8964
8964
|
|
|
8965
8965
|
|
|
8966
|
-
if(
|
|
8967
|
-
options.rejectUnauthorized=
|
|
8966
|
+
if(isURLLocalhost(completeURL)){
|
|
8967
|
+
options.rejectUnauthorized=false;
|
|
8968
|
+
}
|
|
8969
|
+
|
|
8968
8970
|
|
|
8969
|
-
|
|
8970
8971
|
return new Promise((resolve,reject)=>{
|
|
8971
8972
|
|
|
8972
8973
|
// Create the HTTP request
|
|
@@ -9080,6 +9081,11 @@ window.startsWithUpperCase=(str)=>{
|
|
|
9080
9081
|
}
|
|
9081
9082
|
|
|
9082
9083
|
|
|
9084
|
+
window.isURLLocalhost=(url)=>{
|
|
9085
|
+
if(!url) return false;
|
|
9086
|
+
return (contains(url, ":localhost") || contains(url, ":127.0.0.1"));
|
|
9087
|
+
}
|
|
9088
|
+
|
|
9083
9089
|
|
|
9084
9090
|
|
|
9085
9091
|
/* ## Utility network global methods in a javascript, console (nodejs), or vanilla javascript with no browser environment.
|
aotrautils-srv/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1934",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "aotrautils-srv",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1934",
|
|
10
10
|
"license": "HGPL-1.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"atob": "^2.1.2",
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1934",
|
|
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)",
|