aotrautils-srv 0.0.2040 → 0.0.2041
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 (18/10/2026-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (18/10/2026-02:46:46)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5510,7 +5510,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5510
5510
|
|
|
5511
5511
|
|
|
5512
5512
|
|
|
5513
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (18/10/2026-
|
|
5513
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (18/10/2026-02:46:46)»*/
|
|
5514
5514
|
/*-----------------------------------------------------------------------------*/
|
|
5515
5515
|
|
|
5516
5516
|
|
|
@@ -5774,7 +5774,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
|
|
|
5774
5774
|
|
|
5775
5775
|
|
|
5776
5776
|
|
|
5777
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (18/10/2026-
|
|
5777
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (18/10/2026-02:46:46)»*/
|
|
5778
5778
|
/*-----------------------------------------------------------------------------*/
|
|
5779
5779
|
|
|
5780
5780
|
|
|
@@ -8648,8 +8648,8 @@ window.launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=
|
|
|
8648
8648
|
|
|
8649
8649
|
|
|
8650
8650
|
}catch(error) {
|
|
8651
|
-
response.writeHead(
|
|
8652
|
-
response.end(JSON.stringify({ error:
|
|
8651
|
+
response.writeHead(error.error || 500, { "Content-Type": "application/json" });
|
|
8652
|
+
response.end(JSON.stringify({ error: error.error || "ERROR : HTTP Endpoints encountered an error" }));
|
|
8653
8653
|
}
|
|
8654
8654
|
}
|
|
8655
8655
|
|
|
@@ -9874,14 +9874,14 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
9874
9874
|
// DBG
|
|
9875
9875
|
lognow("(SERVER) (ServerReceptionEntryPointsBag) Registering receive (NEW API) for message type «"+messageType+"»...");
|
|
9876
9876
|
|
|
9877
|
-
const
|
|
9877
|
+
const channelName=this.channelName;
|
|
9878
9878
|
const clientsRoomsTag=this.clientsRoomsTag;
|
|
9879
9879
|
const messageTypes=(!messageType || empty(messageType) ? [] :
|
|
9880
9880
|
(isArray(messageType) ? messageType : [messageType])
|
|
9881
9881
|
);
|
|
9882
9882
|
const listenerConfig={listenerMessageTypes:messageTypes, httpEndpointDefinition:httpEndpointDefinition};
|
|
9883
9883
|
const serverReceptionEntryPoint=
|
|
9884
|
-
new window.ServerReceptionEntryPoint(
|
|
9884
|
+
new window.ServerReceptionEntryPoint(channelName, clientsRoomsTag, listenerConfig, asyncDoOnIncomingMessage, this);
|
|
9885
9885
|
this.serverReceptionEntryPoints.push(serverReceptionEntryPoint);
|
|
9886
9886
|
|
|
9887
9887
|
if(httpEndpointDefinition){
|
|
@@ -9894,6 +9894,22 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
9894
9894
|
|
|
9895
9895
|
return this;
|
|
9896
9896
|
}
|
|
9897
|
+
|
|
9898
|
+
addAPIEndpointsExposition(){
|
|
9899
|
+
const self=this;
|
|
9900
|
+
this.addReceiveListener("endpoints", async (message, clientSocket=null)=>{// (Also handles backupUUID tests executions)
|
|
9901
|
+
const results=[];
|
|
9902
|
+
foreach(self.serverReceptionEntryPoints, serverReceptionEntryPoint=>{
|
|
9903
|
+
const conf=serverReceptionEntryPoint.listenerConfig;
|
|
9904
|
+
if(!conf || !conf.httpEndpointDefinition)
|
|
9905
|
+
return "continue";
|
|
9906
|
+
const httpEndpoint=conf.httpEndpointDefinition;
|
|
9907
|
+
results.push({httpMethod:httpEndpoint.httpMethod,urlPath:httpEndpoint.urlPath});
|
|
9908
|
+
});
|
|
9909
|
+
return {endpoints:results};
|
|
9910
|
+
},{urlPath:"/endpoints", httpMethod:"GET"})
|
|
9911
|
+
return this;
|
|
9912
|
+
}
|
|
9897
9913
|
|
|
9898
9914
|
}
|
|
9899
9915
|
|
|
@@ -9901,7 +9917,7 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
9901
9917
|
|
|
9902
9918
|
window.ServerReceptionEntryPoint=class ServerReceptionEntryPoint{
|
|
9903
9919
|
|
|
9904
|
-
constructor(channelNameParam, clientsRoomsTag, listenerConfig=null, asyncDoOnIncomingMessage, parentServerReceptionEntryPointsBag=null){
|
|
9920
|
+
constructor(channelNameParam, clientsRoomsTag, listenerConfig=null, asyncDoOnIncomingMessage=null, parentServerReceptionEntryPointsBag=null){
|
|
9905
9921
|
this.channelName=channelNameParam;
|
|
9906
9922
|
this.clientsRoomsTag=clientsRoomsTag;
|
|
9907
9923
|
this.listenerConfig=listenerConfig;
|
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.2041",
|
|
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.2041",
|
|
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.2041",
|
|
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)",
|