aotrautils-srv 0.0.224 → 0.0.227
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 (30/07/2022-00:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (30/07/2022-00:25:02)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4827,7 +4827,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4827
4827
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (30/07/2022-00:
|
|
4830
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (30/07/2022-00:25:02)»*/
|
|
4831
4831
|
/*-----------------------------------------------------------------------------*/
|
|
4832
4832
|
|
|
4833
4833
|
|
|
@@ -5069,17 +5069,33 @@ WebsocketImplementation={
|
|
|
5069
5069
|
lognow("INFO : (SERVER/CLIENT) Using socket.io websocket implementation.");
|
|
5070
5070
|
|
|
5071
5071
|
if(isNodeContext){
|
|
5072
|
+
|
|
5073
|
+
// NODE SERVER :
|
|
5074
|
+
// DBG
|
|
5075
|
+
lognow("INFO : Loading NODE SERVER socket.io libraries.")
|
|
5072
5076
|
if(typeof(Socket)==="undefined"){
|
|
5073
5077
|
// TRACE
|
|
5074
|
-
console.log("«socket.io» SERVER library not called yet, calling it now.");
|
|
5078
|
+
console.log("«socket.io» NODE SERVER library not called yet, calling it now.");
|
|
5075
5079
|
Socket=require("socket.io");
|
|
5076
|
-
return WebsocketImplementation;
|
|
5077
5080
|
}
|
|
5078
5081
|
if(typeof(Socket)==="undefined"){
|
|
5079
5082
|
// TRACE
|
|
5080
|
-
console.log("ERROR : «socket.io»
|
|
5081
|
-
|
|
5083
|
+
console.log("ERROR : «socket.io» NODE CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
5084
|
+
}
|
|
5085
|
+
|
|
5086
|
+
// NODE CLIENT :
|
|
5087
|
+
// DBG
|
|
5088
|
+
lognow("INFO : Loading NODE CLIENT socket.io libraries.")
|
|
5089
|
+
if(typeof(io)==="undefined"){
|
|
5090
|
+
// TRACE
|
|
5091
|
+
console.log("«socket.io-client» NODE CLIENT library not called yet, calling it now.");
|
|
5092
|
+
io=require("socket.io-client");
|
|
5093
|
+
}
|
|
5094
|
+
if(typeof(io)==="undefined"){
|
|
5095
|
+
// TRACE
|
|
5096
|
+
console.log("ERROR : «socket-client.io» NODE CLIENT library not found. Cannot launch nodejs server. Aborting.");
|
|
5082
5097
|
}
|
|
5098
|
+
return WebsocketImplementation;
|
|
5083
5099
|
}
|
|
5084
5100
|
|
|
5085
5101
|
}else{
|
|
@@ -5476,14 +5492,14 @@ WebsocketImplementation={
|
|
|
5476
5492
|
// NOW : socket.io :
|
|
5477
5493
|
//client on server-side:
|
|
5478
5494
|
|
|
5479
|
-
if(WebsocketImplementation.isNodeContext && typeof(
|
|
5495
|
+
if(WebsocketImplementation.isNodeContext && typeof(io)!=="undefined"){
|
|
5480
5496
|
// // Node client :
|
|
5481
5497
|
// connectToServer=function (serverURL, port, isSecure, timeout=10000){
|
|
5482
5498
|
// return Socket.connect(serverURL + ":" + port,{timeout: timeout});
|
|
5483
5499
|
// }
|
|
5484
5500
|
|
|
5485
5501
|
// OLD SYNTAX: clientSocket=Socket.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
|
|
5486
|
-
// clientSocket=new Socket.Client
|
|
5502
|
+
// NO : clientSocket=new Socket.Client(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
|
|
5487
5503
|
clientSocket=io(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
|
|
5488
5504
|
|
|
5489
5505
|
}
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.227",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|