aotrautils 0.0.1881 → 0.0.1883

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 (19/06/2026-20:10:25)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/06/2026-21:43:59)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5470,7 +5470,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5470
5470
 
5471
5471
 
5472
5472
 
5473
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/06/2026-20:10:25)»*/
5473
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/06/2026-21:43:59)»*/
5474
5474
  /*-----------------------------------------------------------------------------*/
5475
5475
  /* ## Utility global methods in a browser (htmljs) client environment.
5476
5476
  *
@@ -11611,7 +11611,7 @@ class VNCFrame2D{
11611
11611
 
11612
11612
  this.url=url;
11613
11613
  this.port=port;
11614
- this.isSecure=(contains(url.toLowerCase(),"wss"));
11614
+
11615
11615
  this.parentElement=nonull(htmlConfig.parentElement, document.body);
11616
11616
  this.imageMode=htmlConfig.imageMode;
11617
11617
  this.mouseEventsRefreshMillis=mouseEventsRefreshMillis;
@@ -11690,7 +11690,7 @@ class VNCFrame2D{
11690
11690
  self.fusrodaClient.client.socketToServerClientInstance.send("soundSampleRequest", {});
11691
11691
  });
11692
11692
  }
11693
- }, this.url, this.port, this.isSecure);
11693
+ }, this.url, this.port);
11694
11694
 
11695
11695
 
11696
11696
  // TODO : FIXME : DUPLICATED CODE !
@@ -11831,9 +11831,6 @@ window.base64ToUint8ClampedArray=(base64String)=>{
11831
11831
  createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null, portParam=4000){
11832
11832
  // CAUTION : WORKS BETTER WHEN UNSECURE, BUT 'NEEDS CLIENT BROWSER TO ALLOW MIXED (SECURE/UNSECURE) CONTENT !
11833
11833
 
11834
-
11835
- const isSecure=(contains(urlParam.toLowerCase(),"https") || contains(urlParam.toLowerCase(),"wss"));
11836
-
11837
11834
  const fusrodaClient=initClient(false,
11838
11835
  /*CAUTION : Fusroda Java server requires the Socket IO websocket implementation !!*/true,
11839
11836
  /*doOnServerConnection:*/(socketToServerClientInstance)=>{
@@ -11868,7 +11865,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
11868
11865
  socketToServerClientInstance.send("protocol", { type:"hello" });
11869
11866
 
11870
11867
 
11871
- }, urlParam, portParam, isSecure);
11868
+ }, urlParam, portParam);
11872
11869
 
11873
11870
  fusrodaClient.sendMouseMoveEvent=(mouseEvent)=>{
11874
11871
  fusrodaClient.client.socketToServerClientInstance.send("mouseMoveEvent", mouseEvent);
@@ -11960,9 +11957,6 @@ window.createOritaMainClient=function(
11960
11957
 
11961
11958
  const ORITA_HASH_STRING_NAME="oritaClientHash";
11962
11959
 
11963
- const isSecure=(contains(urlParam.toLowerCase(),"https") || contains(urlParam.toLowerCase(),"wss"));
11964
-
11965
-
11966
11960
 
11967
11961
  const onCommunicationEventListeners=[];
11968
11962
 
@@ -12245,7 +12239,7 @@ window.createOritaMainClient=function(
12245
12239
 
12246
12240
 
12247
12241
 
12248
- }, urlParam, portParam, isSecure);
12242
+ }, urlParam, portParam);
12249
12243
 
12250
12244
 
12251
12245
  oritaClient.microClientsInfos={};
@@ -13294,7 +13288,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13294
13288
 
13295
13289
 
13296
13290
 
13297
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/06/2026-20:10:25)»*/
13291
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/06/2026-21:43:59)»*/
13298
13292
  /*-----------------------------------------------------------------------------*/
13299
13293
 
13300
13294
 
@@ -14379,10 +14373,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
14379
14373
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14380
14374
 
14381
14375
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14382
- /*utils 3D library associated with aotra version : «1_29072022-2359 (19/06/2026-20:10:25)»*/
14376
+ /*utils 3D library associated with aotra version : «1_29072022-2359 (19/06/2026-21:43:59)»*/
14383
14377
  /*-----------------------------------------------------------------------------*/
14384
14378
 
14385
- /*utils AI library associated with aotra version : «1_29072022-2359 (19/06/2026-20:10:25)»*/
14379
+ /*utils AI library associated with aotra version : «1_29072022-2359 (19/06/2026-21:43:59)»*/
14386
14380
  /*-----------------------------------------------------------------------------*/
14387
14381
 
14388
14382
 
@@ -14642,7 +14636,7 @@ getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProviderName=DE
14642
14636
 
14643
14637
 
14644
14638
 
14645
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (19/06/2026-20:10:25)»*/
14639
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (19/06/2026-21:43:59)»*/
14646
14640
  /*-----------------------------------------------------------------------------*/
14647
14641
 
14648
14642
 
@@ -14680,7 +14674,6 @@ if(typeof(window)==="undefined") window=global;
14680
14674
 
14681
14675
  //*********************************** AUTO-ORGANIZING REAL-TIME AORTAC CLUSTERIZATION (AORTAC) *********************************** */
14682
14676
 
14683
- const AORTAC_CLIENT_FORCE_SSL_USAGE=true;
14684
14677
 
14685
14678
  // New implementation :
14686
14679
 
@@ -14699,7 +14692,6 @@ class AORTACClientCell{
14699
14692
  this.protocol=nonull(infos.protocol,"ws");
14700
14693
  this.host=nonull(infos.host,"localhost");
14701
14694
  this.port=nonull(infos.port,"30000");
14702
- this.usesSSL=AORTAC_CLIENT_FORCE_SSL_USAGE;
14703
14695
 
14704
14696
  this.startTime=null;
14705
14697
 
@@ -14744,7 +14736,7 @@ class AORTACClientCell{
14744
14736
  self.handleClientHelloSequence(resolve);
14745
14737
 
14746
14738
 
14747
- }, self.protocol+"://"+self.host, self.port, self.usesSSL);
14739
+ }, self.protocol+"://"+self.host, self.port);
14748
14740
  self.initialClientInstance.client.start();
14749
14741
 
14750
14742
  });
@@ -14823,7 +14815,6 @@ class AORTACClientCell{
14823
14815
  const protocol=nonull(infos.protocol,"ws");
14824
14816
  const host=nonull(infos.host,"localhost");
14825
14817
  const port=nonull(infos.port,"30000");
14826
- const usesSSL=AORTAC_CLIENT_FORCE_SSL_USAGE;
14827
14818
 
14828
14819
  const reconnectedClientInstance=initClient(self.isNodeContext, false, (socketToServerClientInstance, reconnectedClientInstanceLocal)=>{
14829
14820
 
@@ -14839,7 +14830,7 @@ class AORTACClientCell{
14839
14830
  self.handleReconnectedClientHelloSequence(reconnectedClientInstance, resolve)
14840
14831
 
14841
14832
 
14842
- }, protocol+"://"+host, port, usesSSL);
14833
+ }, protocol+"://"+host, port);
14843
14834
 
14844
14835
  self.clientInstances[serverOrigin]=reconnectedClientInstance;
14845
14836
  reconnectedClientInstance.client.start();
@@ -15256,7 +15247,7 @@ class AORTACServerCell{
15256
15247
  // For this, use the socketToServerClientInstance attribute instead :
15257
15248
  outcomingCell.socketToServerClientInstance=socketToServerClientInstance;
15258
15249
 
15259
- }, outcomingCellProtocol+"://"+outcomingCellHost, outcomingCellPort, false);
15250
+ }, outcomingCellProtocol+"://"+outcomingCellHost, outcomingCellPort);
15260
15251
 
15261
15252
  clientInstance.client.start();
15262
15253
 
@@ -17015,7 +17006,11 @@ WebsocketImplementation={
17015
17006
  // TRACE
17016
17007
  lognow("ERROR : «ws» CONSOLE SERVER library not found. Cannot launch nodejs server. Aborting.");
17017
17008
 
17018
- serverSocket=new window.WebSocketServer.WebSocketServer({ "server":listenableServer });
17009
+ //serverSocket=new window.WebSocketServer.WebSocketServer({
17010
+ serverSocket=new window.WebSocketServer.Server({
17011
+ server:listenableServer,
17012
+ perMessageDeflate: false,
17013
+ });
17019
17014
  // DOES NOT WORK ANYMORE :
17020
17015
  // serverSocket=new WebSocket.Server({ "server":listenableServer });
17021
17016
 
@@ -17101,11 +17096,12 @@ WebsocketImplementation={
17101
17096
  // TRACE
17102
17097
  lognow("INFO : CLIENT : Trying to establish connection to server (serverURL:«"+serverURL+"» ; port:«"+port+"» ; isSecure:«"+isSecure+"»)");
17103
17098
 
17104
-
17099
+
17105
17100
  clientSocket=new WebSocket(serverURL+":"+port,/*WORKAROUND:*/{
17106
17101
  // CAUTION : SECURITY BREACH :
17107
17102
  // BUT ALSO NECESSARY TO ALLOW SELF-SIGNED CERTIFICATES USAGE WITH THE YESBOT SYSTEM ON DEV ENVIRONMENTS !
17108
- rejectUnauthorized:false, // (THIS IS A KNOWN SECURITY BREACH)
17103
+ // (ONLY FOR DEV ENVIRONMENTS :)
17104
+ rejectUnauthorized:contains(serverURL, "localhost"), // (THIS IS A KNOWN SECURITY BREACH)
17109
17105
  secure: isSecure
17110
17106
  });
17111
17107
 
@@ -17984,7 +17980,10 @@ if(typeof(window)==="undefined") window=global;
17984
17980
  // -Client :
17985
17981
 
17986
17982
  // TODO : Use everywhere it's applicable !
17987
- initClient=function(isNodeContext=true, useSocketIOImplementation=/*DEBUG*/false, doOnServerConnection=null, url, /*OPTIONAL*/port=25000, isSecure=true, /*OPTIONAL*/timeout=10000, /*OPTIONAL*/selfParam=null){
17983
+ initClient=function(isNodeContext=true, useSocketIOImplementation=/*DEBUG*/false, doOnServerConnection=null, url, /*OPTIONAL*/port=25000, /*OPTIONAL*/timeout=10000, /*OPTIONAL*/selfParam=null){
17984
+
17985
+ const isSecure=(contains(url.toLowerCase(),"https:") || contains(url.toLowerCase(),"wss:"));
17986
+
17988
17987
  let aotraClient={};
17989
17988
 
17990
17989
  aotraClient.client={};
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1881",
3
+ "version": "0.0.1883",
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)",