aotrautils 0.0.68 → 0.0.71

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:51:28)»*/
3
+ /*utils CLIENT library associated with aotra version : «1.0.0.000 (13/07/2022-02:22:17)»*/
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:51:28)»*/
6853
+ /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (13/07/2022-02:22:17)»*/
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:51:28)»*/
8059
+ /*utils SERVER library associated with aotra version : «1.0.0.000 (13/07/2022-02:22:17)»*/
8060
8060
  /*-----------------------------------------------------------------------------*/
8061
8061
 
8062
8062
 
@@ -8285,12 +8285,16 @@ WebsocketImplementation={
8285
8285
  // https://stackoverflow.com/questions/6599470/node-js-socket-io-with-ssl
8286
8286
  // https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
8287
8287
 
8288
- if(typeof(socketIO)==="undefined"){
8288
+ const globalContext=(WebsocketImplementation.isNodeContext?global:window);
8289
+ if(typeof(globalContext.socketIO)==="undefined"){
8289
8290
  // TRACE
8290
- console.log("«socket.io» SERVER library not called yet, calling it now.");
8291
- socketIO=require("socket.io");
8291
+ lognow("«socket.io» SERVER library not called yet, calling it now.");
8292
+ globalContext.socketIO=require("socket.io");
8293
+ // TRACE
8294
+ lognow("«socket.io» SERVER library called:",globalContext.socketIO);
8295
+
8292
8296
  }
8293
- if(typeof(socketIO)==="undefined"){
8297
+ if(typeof(globalContext.socketIO)==="undefined"){
8294
8298
  // Exception
8295
8299
  throw "ERROR : «socket.io» SERVER library not found. Cannot launch nodejs server. Aborting.";
8296
8300
  }
@@ -8337,6 +8341,11 @@ WebsocketImplementation={
8337
8341
  if(!WebsocketImplementation.useSocketIOImplementation){
8338
8342
  serverSocket=new WebSocket.Server({ "server":listenableServer });
8339
8343
  }else{
8344
+
8345
+
8346
+ // DBG
8347
+ console.log(">>>>>>>socketIO:",JSON.stringify(socketIO));
8348
+
8340
8349
  // NOW : socket.io :
8341
8350
  // Loading socket.io
8342
8351
  serverSocket=socketIO.listen(listenableServer);
@@ -9365,7 +9374,7 @@ function getListManager(config){
9365
9374
 
9366
9375
 
9367
9376
 
9368
- /*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
9377
+ /*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-02:22:17)»*/
9369
9378
  /*-----------------------------------------------------------------------------*/
9370
9379
 
9371
9380
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.68",
3
+ "version": "0.0.71",
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)",