aotrautils 0.0.2043 → 0.0.2044
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.
- aotrautils/aotrautils.build.js +30 -17
- aotrautils/package-lock.json +2 -2
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (17/10/2026-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5485,7 +5485,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5485
5485
|
|
|
5486
5486
|
|
|
5487
5487
|
|
|
5488
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (17/10/2026-
|
|
5488
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
|
|
5489
5489
|
/*-----------------------------------------------------------------------------*/
|
|
5490
5490
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
|
5491
5491
|
*
|
|
@@ -13053,7 +13053,7 @@ window.createOritaMicroClient=function(url, port, isNode=false, staticMicroClien
|
|
|
13053
13053
|
|
|
13054
13054
|
|
|
13055
13055
|
|
|
13056
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (17/10/2026-
|
|
13056
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
|
|
13057
13057
|
/*-----------------------------------------------------------------------------*/
|
|
13058
13058
|
|
|
13059
13059
|
|
|
@@ -14142,10 +14142,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
|
14142
14142
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
|
14143
14143
|
|
|
14144
14144
|
window.AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
|
14145
|
-
/*utils 3D library associated with aotra version : «1_29072022-2359 (17/10/2026-
|
|
14145
|
+
/*utils 3D library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
|
|
14146
14146
|
/*-----------------------------------------------------------------------------*/
|
|
14147
14147
|
|
|
14148
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (17/10/2026-
|
|
14148
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
|
|
14149
14149
|
/*-----------------------------------------------------------------------------*/
|
|
14150
14150
|
|
|
14151
14151
|
|
|
@@ -14409,7 +14409,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
|
|
|
14409
14409
|
|
|
14410
14410
|
|
|
14411
14411
|
|
|
14412
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (17/10/2026-
|
|
14412
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (17/10/2026-02:53:29)»*/
|
|
14413
14413
|
/*-----------------------------------------------------------------------------*/
|
|
14414
14414
|
|
|
14415
14415
|
|
|
@@ -17263,7 +17263,7 @@ window.launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=
|
|
|
17263
17263
|
|
|
17264
17264
|
// (we bypass the channel and message types filters !)
|
|
17265
17265
|
try{
|
|
17266
|
-
httpEndpointResultObject.body=await serverReceptionEntryPoint.
|
|
17266
|
+
httpEndpointResultObject.body=await serverReceptionEntryPoint.executeWithAllPrerequisites(dataWrapped, eventOrMessage, null);
|
|
17267
17267
|
}catch(treatmentsChannelError){
|
|
17268
17268
|
// TODO : FIXME : DUPLICATED CODE !!!
|
|
17269
17269
|
const errorMessage="ERROR : An error has occured during the processing of a client message on channel treatments.";
|
|
@@ -18429,7 +18429,7 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
18429
18429
|
this.clientsRoomsTag=clientsRoomsTag;
|
|
18430
18430
|
|
|
18431
18431
|
this.serverReceptionEntryPoints=[];
|
|
18432
|
-
this.asyncPrerequisiteMethods=
|
|
18432
|
+
this.asyncPrerequisiteMethods=new Set();
|
|
18433
18433
|
}
|
|
18434
18434
|
|
|
18435
18435
|
// Executed whenever any message is received on any channel :
|
|
@@ -18477,8 +18477,9 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
18477
18477
|
|
|
18478
18478
|
}
|
|
18479
18479
|
|
|
18480
|
+
|
|
18480
18481
|
addReceiveListenerPrerequisite(asyncPrerequisiteMethod){
|
|
18481
|
-
this.asyncPrerequisiteMethods.
|
|
18482
|
+
this.asyncPrerequisiteMethods.add(asyncPrerequisiteMethod);
|
|
18482
18483
|
// TRACE
|
|
18483
18484
|
lognow("INFO : Added prerequisite: asyncPrerequisiteMethods:",asyncPrerequisiteMethod);
|
|
18484
18485
|
return this;
|
|
@@ -18504,6 +18505,10 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
18504
18505
|
// I-
|
|
18505
18506
|
// ASYNC
|
|
18506
18507
|
addReceiveListener(messageType, asyncDoOnIncomingMessage, httpEndpointDefinition=null){
|
|
18508
|
+
|
|
18509
|
+
// DBG
|
|
18510
|
+
lognow("(SERVER) (ServerReceptionEntryPointsBag) Registering receive (NEW API) for message type «"+messageType+"»...");
|
|
18511
|
+
|
|
18507
18512
|
const channelNameParam=this.channelNameParam;
|
|
18508
18513
|
const clientsRoomsTag=this.clientsRoomsTag;
|
|
18509
18514
|
const messageTypes=(!messageType || empty(messageType) ? [] :
|
|
@@ -18511,7 +18516,7 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
18511
18516
|
);
|
|
18512
18517
|
const listenerConfig={listenerMessageTypes:messageTypes, httpEndpointDefinition:httpEndpointDefinition};
|
|
18513
18518
|
const serverReceptionEntryPoint=
|
|
18514
|
-
new window.ServerReceptionEntryPoint(channelNameParam, clientsRoomsTag, listenerConfig, asyncDoOnIncomingMessage);
|
|
18519
|
+
new window.ServerReceptionEntryPoint(channelNameParam, clientsRoomsTag, listenerConfig, asyncDoOnIncomingMessage, this);
|
|
18515
18520
|
this.serverReceptionEntryPoints.push(serverReceptionEntryPoint);
|
|
18516
18521
|
|
|
18517
18522
|
if(httpEndpointDefinition){
|
|
@@ -18531,11 +18536,12 @@ window.ServerReceptionEntryPointsBag=class ServerReceptionEntryPointsBag{
|
|
|
18531
18536
|
|
|
18532
18537
|
window.ServerReceptionEntryPoint=class ServerReceptionEntryPoint{
|
|
18533
18538
|
|
|
18534
|
-
constructor(channelNameParam, clientsRoomsTag, listenerConfig=null, asyncDoOnIncomingMessage){
|
|
18539
|
+
constructor(channelNameParam, clientsRoomsTag, listenerConfig=null, asyncDoOnIncomingMessage, parentServerReceptionEntryPointsBag=null){
|
|
18535
18540
|
this.channelName=channelNameParam;
|
|
18536
18541
|
this.clientsRoomsTag=clientsRoomsTag;
|
|
18537
18542
|
this.listenerConfig=listenerConfig;
|
|
18538
18543
|
this.asyncDoOnIncomingMessage=asyncDoOnIncomingMessage;
|
|
18544
|
+
this.parentServerReceptionEntryPointsBag=parentServerReceptionEntryPointsBag;
|
|
18539
18545
|
}
|
|
18540
18546
|
|
|
18541
18547
|
async execute(eventOrMessage, clientSocketParam=null){
|
|
@@ -18543,7 +18549,7 @@ window.ServerReceptionEntryPoint=class ServerReceptionEntryPoint{
|
|
|
18543
18549
|
if(!eventOrMessage){
|
|
18544
18550
|
// TRACE
|
|
18545
18551
|
lognow("ERROR : No message received.");
|
|
18546
|
-
return;
|
|
18552
|
+
return null;
|
|
18547
18553
|
}
|
|
18548
18554
|
|
|
18549
18555
|
// OLD :
|
|
@@ -18562,7 +18568,7 @@ window.ServerReceptionEntryPoint=class ServerReceptionEntryPoint{
|
|
|
18562
18568
|
|
|
18563
18569
|
// Room information is stored in client socket object :
|
|
18564
18570
|
const isClientInRoom=window.WebsocketImplementation.isInRoom(clientSocketParam, this.clientsRoomsTag);
|
|
18565
|
-
if(!isClientInRoom) return;
|
|
18571
|
+
if(!isClientInRoom) return null;
|
|
18566
18572
|
|
|
18567
18573
|
|
|
18568
18574
|
if(this.listenerConfig){
|
|
@@ -18571,7 +18577,7 @@ window.ServerReceptionEntryPoint=class ServerReceptionEntryPoint{
|
|
|
18571
18577
|
// Else we check if the message matches the required message types :
|
|
18572
18578
|
if( dataWrapped.data && dataWrapped.data.type
|
|
18573
18579
|
&& !contains(this.listenerConfig.listenerMessageTypes, dataWrapped.data.type))
|
|
18574
|
-
return;
|
|
18580
|
+
return null;
|
|
18575
18581
|
}
|
|
18576
18582
|
}
|
|
18577
18583
|
|
|
@@ -18588,6 +18594,13 @@ window.ServerReceptionEntryPoint=class ServerReceptionEntryPoint{
|
|
|
18588
18594
|
}
|
|
18589
18595
|
|
|
18590
18596
|
}
|
|
18597
|
+
|
|
18598
|
+
async executeWithAllPrerequisites(dataWrapped, originalEventOrMessage, clientSocket){
|
|
18599
|
+
if(this.parentServerReceptionEntryPointsBag)
|
|
18600
|
+
await this.parentServerReceptionEntryPointsBag.executeAllPrerequisites(dataWrapped, originalEventOrMessage, clientSocket);
|
|
18601
|
+
return await this.execute(originalEventOrMessage, clientSocket);
|
|
18602
|
+
}
|
|
18603
|
+
|
|
18591
18604
|
}
|
|
18592
18605
|
|
|
18593
18606
|
|
|
@@ -18641,10 +18654,10 @@ window.NodeServerInstance=class NodeServerInstance{
|
|
|
18641
18654
|
receive(channelNameParam, doOnIncomingMessage, listenerConfig=null, clientsRoomsTag=null){
|
|
18642
18655
|
|
|
18643
18656
|
// DBG
|
|
18644
|
-
lognow("(SERVER) Registering receive (OLD API) for channel «"+channelNameParam+"»...");
|
|
18657
|
+
lognow("(SERVER) (NodeServerInstance) Registering receive (OLD API) for channel «"+channelNameParam+"»...");
|
|
18645
18658
|
|
|
18646
18659
|
const serverReceptionEntryPoint=
|
|
18647
|
-
new window.ServerReceptionEntryPoint(channelNameParam, clientsRoomsTag, listenerConfig, doOnIncomingMessage);
|
|
18660
|
+
new window.ServerReceptionEntryPoint(channelNameParam, clientsRoomsTag, listenerConfig, doOnIncomingMessage, null);
|
|
18648
18661
|
this.serverReceptionEntryPoints.push(serverReceptionEntryPoint);
|
|
18649
18662
|
|
|
18650
18663
|
//OLD: // SPECIAL FOR THE SOCKETIO IMPLEMENTATION :
|
|
@@ -18825,7 +18838,7 @@ window.NodeServerInstance=class NodeServerInstance{
|
|
|
18825
18838
|
// We execute the events registration listeners entry points:
|
|
18826
18839
|
// DEPRECATED : OLD API :
|
|
18827
18840
|
foreach(self.serverReceptionEntryPoints, (serverReceptionEntryPoint,i)=>{
|
|
18828
|
-
serverReceptionEntryPoint.execute(eventOrMessage, clientSocket
|
|
18841
|
+
serverReceptionEntryPoint.execute(eventOrMessage, clientSocket).then(()=>{
|
|
18829
18842
|
/*DO NOTHING*/
|
|
18830
18843
|
}).catch(treatmentsChannelError=>{
|
|
18831
18844
|
// TODO : FIXME : DUPLICATED CODE !!!
|
aotrautils/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2044",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "aotrautils",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.2044",
|
|
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.
|
|
3
|
+
"version": "0.0.2044",
|
|
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)",
|