aotrautils 0.0.225 → 0.0.228

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.0.0.000 (29/07/2022-23:59:30)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (30/07/2022-00:18:12)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4827,7 +4827,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4827
4827
 
4828
4828
 
4829
4829
 
4830
- /*utils CLIENT library associated with aotra version : «1.0.0.000 (29/07/2022-23:59:30)»*/
4830
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (30/07/2022-00:18:12)»*/
4831
4831
  /*-----------------------------------------------------------------------------*/
4832
4832
  /* ## Utility global methods in a browser (htmljs) client environment.
4833
4833
  *
@@ -11676,7 +11676,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
11676
11676
 
11677
11677
 
11678
11678
 
11679
- /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (29/07/2022-23:59:30)»*/
11679
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (30/07/2022-00:18:12)»*/
11680
11680
  /*-----------------------------------------------------------------------------*/
11681
11681
 
11682
11682
 
@@ -12881,7 +12881,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
12881
12881
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
12882
12882
 
12883
12883
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
12884
- /*utils SERVER library associated with aotra version : «1.0.0.000 (29/07/2022-23:59:30)»*/
12884
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (30/07/2022-00:18:12)»*/
12885
12885
  /*-----------------------------------------------------------------------------*/
12886
12886
 
12887
12887
 
@@ -13123,17 +13123,37 @@ WebsocketImplementation={
13123
13123
  lognow("INFO : (SERVER/CLIENT) Using socket.io websocket implementation.");
13124
13124
 
13125
13125
  if(isNodeContext){
13126
+
13127
+ // NODE SERVER :
13128
+ // DBG
13129
+ lognow("INFO : Loading NODE SERVER socket.io libraries.")
13126
13130
  if(typeof(Socket)==="undefined"){
13127
13131
  // TRACE
13128
- console.log("«socket.io» SERVER library not called yet, calling it now.");
13132
+ console.log("«socket.io» NODE SERVER library not called yet, calling it now.");
13129
13133
  Socket=require("socket.io");
13130
13134
  return WebsocketImplementation;
13131
13135
  }
13132
13136
  if(typeof(Socket)==="undefined"){
13133
13137
  // TRACE
13134
- console.log("ERROR : «socket.io» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
13138
+ console.log("ERROR : «socket.io» NODE CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
13135
13139
  return WebsocketImplementation;
13136
13140
  }
13141
+
13142
+ // NODE CLIENT :
13143
+ // DBG
13144
+ lognow("INFO : Loading NODE CLIENT socket.io libraries.")
13145
+ if(typeof(io)==="undefined"){
13146
+ // TRACE
13147
+ console.log("«socket.io-client» NODE CLIENT library not called yet, calling it now.");
13148
+ io=require("socket.io-client");
13149
+ }
13150
+ if(typeof(io)==="undefined"){
13151
+ // TRACE
13152
+ console.log("ERROR : «socket-client.io» NODE CLIENT library not found. Cannot launch nodejs server. Aborting.");
13153
+ return WebsocketImplementation;
13154
+ }
13155
+
13156
+
13137
13157
  }
13138
13158
 
13139
13159
  }else{
@@ -13530,14 +13550,14 @@ WebsocketImplementation={
13530
13550
  // NOW : socket.io :
13531
13551
  //client on server-side:
13532
13552
 
13533
- if(WebsocketImplementation.isNodeContext && typeof(Socket)!=="undefined"){
13553
+ if(WebsocketImplementation.isNodeContext && typeof(io)!=="undefined"){
13534
13554
  // // Node client :
13535
13555
  // connectToServer=function (serverURL, port, isSecure, timeout=10000){
13536
13556
  // return Socket.connect(serverURL + ":" + port,{timeout: timeout});
13537
13557
  // }
13538
13558
 
13539
13559
  // OLD SYNTAX: clientSocket=Socket.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
13540
- // clientSocket=new Socket.Client???(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
13560
+ // NO : clientSocket=new Socket.Client(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
13541
13561
  clientSocket=io(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
13542
13562
 
13543
13563
  }
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.225",
3
+ "version": "0.0.228",
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)",
@@ -24,6 +24,7 @@
24
24
  "fs": "^0.0.1-security",
25
25
  "sjcl": "^1.0.8",
26
26
  "socket.io": "^4.5.1",
27
+ "socket.io-client": "^4.5.1",
27
28
  "ws": "^8.1.0"
28
29
  }
29
30
  }