aotrautils 0.0.64 → 0.0.67

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 CLIENT library associated with aotra version : «1.0.0.000 (13/07/2022-01:44:12)»*/
3
+ /*utils CLIENT library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
  /* ## Utility global methods in a browser (htmljs) client environment.
6
6
  *
@@ -6850,7 +6850,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
6850
6850
 
6851
6851
 
6852
6852
 
6853
- /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (13/07/2022-01:44:12)»*/
6853
+ /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
6854
6854
  /*-----------------------------------------------------------------------------*/
6855
6855
 
6856
6856
 
@@ -8056,7 +8056,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
8056
8056
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
8057
8057
 
8058
8058
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
8059
- /*utils SERVER library associated with aotra version : «1.0.0.000 (13/07/2022-01:44:12)»*/
8059
+ /*utils SERVER library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
8060
8060
  /*-----------------------------------------------------------------------------*/
8061
8061
 
8062
8062
 
@@ -8266,7 +8266,7 @@ WebsocketImplementation={
8266
8266
 
8267
8267
 
8268
8268
  //
8269
- // NODE SERVER
8269
+ // NODE SERVER/CLIENT
8270
8270
  //
8271
8271
  getStatic:(isNodeContext=true, useSocketIOImplementation=false)=>{
8272
8272
 
@@ -8275,21 +8275,29 @@ WebsocketImplementation={
8275
8275
  // cf. https://socket.io/docs/v4/client-socket-instance/
8276
8276
  WebsocketImplementation.useSocketIOImplementation=useSocketIOImplementation;
8277
8277
 
8278
- // OLD : socket.io :
8279
- // https://stackoverflow.com/questions/31156884/how-to-use-https-on-node-js-using-express-socket-io
8280
- // https://stackoverflow.com/questions/6599470/node-js-socket-io-with-ssl
8281
- // https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
8282
-
8283
- if(typeof(socketIO)==="undefined"){
8278
+ if(WebsocketImplementation.useSocketIOImplementation){
8279
+
8284
8280
  // TRACE
8285
- console.log("«socket.io» SERVER library not called yet, calling it now.");
8286
- socketIO=require("socket.io");
8287
- return socketIO;
8288
- }
8289
- if(typeof(socketIO)==="undefined"){
8281
+ lognow("INFO : (SERVER/CLIENT) Using socket.io websocket implementation.");
8282
+
8283
+ // OLD : socket.io :
8284
+ // https://stackoverflow.com/questions/31156884/how-to-use-https-on-node-js-using-express-socket-io
8285
+ // https://stackoverflow.com/questions/6599470/node-js-socket-io-with-ssl
8286
+ // https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
8287
+
8288
+ if(typeof(socketIO)==="undefined"){
8289
+ // TRACE
8290
+ console.log("«socket.io» SERVER library not called yet, calling it now.");
8291
+ socketIO=require("socket.io");
8292
+ }
8293
+ if(typeof(socketIO)==="undefined"){
8294
+ // Exception
8295
+ throw "ERROR : «socket.io» SERVER library not found. Cannot launch nodejs server. Aborting.";
8296
+ }
8297
+ }else{
8290
8298
  // TRACE
8291
- console.log("ERROR : «socket.io» SERVER library not found. Cannot launch nodejs server. Aborting.");
8292
- return null;
8299
+ lognow("INFO : (SERVER/CLIENT) Using native websocket implementation.");
8300
+
8293
8301
  }
8294
8302
 
8295
8303
  // *********************************************************************************
@@ -9357,7 +9365,7 @@ function getListManager(config){
9357
9365
 
9358
9366
 
9359
9367
 
9360
- /*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-01:44:12)»*/
9368
+ /*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
9361
9369
  /*-----------------------------------------------------------------------------*/
9362
9370
 
9363
9371
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.64",
3
+ "version": "0.0.67",
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)",