aotrautils-srv 0.0.1029 → 0.0.1030
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/09/2024-03:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (02/09/2024-03:11:36)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5185,7 +5185,7 @@ JSON.recycle=function recycle($){
|
|
|
5185
5185
|
|
|
5186
5186
|
|
|
5187
5187
|
|
|
5188
|
-
|
|
5188
|
+
// CAUTION : TODO : FIXME WILL ERROR IF THERE IS A NON-ESCAPED SINGLE QUOTE ("'") IN RAW STRING !!!
|
|
5189
5189
|
// JSON parsing management :
|
|
5190
5190
|
window.parseJSON=function(strParam){
|
|
5191
5191
|
|
|
@@ -5259,7 +5259,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5259
5259
|
|
|
5260
5260
|
|
|
5261
5261
|
|
|
5262
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (02/09/2024-03:
|
|
5262
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (02/09/2024-03:11:36)»*/
|
|
5263
5263
|
/*-----------------------------------------------------------------------------*/
|
|
5264
5264
|
|
|
5265
5265
|
|
|
@@ -5403,7 +5403,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
|
5403
5403
|
|
|
5404
5404
|
|
|
5405
5405
|
|
|
5406
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (02/09/2024-03:
|
|
5406
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (02/09/2024-03:11:36)»*/
|
|
5407
5407
|
/*-----------------------------------------------------------------------------*/
|
|
5408
5408
|
|
|
5409
5409
|
|
|
@@ -7127,8 +7127,8 @@ getListManager=function(config){
|
|
|
7127
7127
|
};
|
|
7128
7128
|
|
|
7129
7129
|
|
|
7130
|
-
|
|
7131
|
-
// NO : IN A NODE CONTEXT WITH
|
|
7130
|
+
// CAUTION ! TODO : FIXME : We replace in response all single quotes with "`" (egrave) in order to avoid errors !
|
|
7131
|
+
// NO : IN A NODE CONTEXT WITH require("...") WILL RESULT IN AN UNDEFINED FUNCTION ERROR !!!
|
|
7132
7132
|
// function performHTTPRequest(...){...
|
|
7133
7133
|
// USE THIS INSTEAD :
|
|
7134
7134
|
performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyOrNamedArgs=null,isNodeContext=false,addCORSHeader=ADD_CORS_HEADER){
|
|
@@ -7230,11 +7230,15 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
|
|
|
7230
7230
|
response.on("end", () => {
|
|
7231
7231
|
|
|
7232
7232
|
try{
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7233
|
+
let responseData;
|
|
7234
|
+
try{
|
|
7235
|
+
responseData=parseJSON(responseDataStr);
|
|
7236
|
+
}catch(error){
|
|
7237
|
+
// CAUTION ! TODO : FIXME : We replace in response all single quotes with "`" (egrave) in order to avoid errors !
|
|
7238
|
+
// DEBUG
|
|
7239
|
+
responseDataStr=responseDataStr.replace(/'/gim,"`");
|
|
7240
|
+
responseData=parseJSON(responseDataStr);
|
|
7241
|
+
}
|
|
7238
7242
|
resolve( {responseData:responseData, response:response, responseDataStr:responseDataStr} );
|
|
7239
7243
|
}catch(error){
|
|
7240
7244
|
// DBG
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1030",
|
|
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)",
|