aotrautils-srv 0.0.224 → 0.0.225
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:15:34)»*/
|
|
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:15:34)»*/
|
|
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 :
|
|
5072
5074
|
if(typeof(Socket)==="undefined"){
|
|
5073
5075
|
// TRACE
|
|
5074
|
-
console.log("«socket.io» SERVER library not called yet, calling it now.");
|
|
5076
|
+
console.log("«socket.io» NODE SERVER library not called yet, calling it now.");
|
|
5075
5077
|
Socket=require("socket.io");
|
|
5076
5078
|
return WebsocketImplementation;
|
|
5077
5079
|
}
|
|
5078
5080
|
if(typeof(Socket)==="undefined"){
|
|
5079
5081
|
// TRACE
|
|
5080
|
-
console.log("ERROR : «socket.io»
|
|
5082
|
+
console.log("ERROR : «socket.io» NODE CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
5081
5083
|
return WebsocketImplementation;
|
|
5082
5084
|
}
|
|
5085
|
+
|
|
5086
|
+
// NODE CLIENT :
|
|
5087
|
+
if(typeof(io)==="undefined"){
|
|
5088
|
+
// TRACE
|
|
5089
|
+
console.log("«socket.io-client» NODE CLIENT library not called yet, calling it now.");
|
|
5090
|
+
io=require("socket.io-client");
|
|
5091
|
+
}
|
|
5092
|
+
if(typeof(io)==="undefined"){
|
|
5093
|
+
// TRACE
|
|
5094
|
+
console.log("ERROR : «socket-client.io» NODE CLIENT library not found. Cannot launch nodejs server. Aborting.");
|
|
5095
|
+
return WebsocketImplementation;
|
|
5096
|
+
}
|
|
5097
|
+
|
|
5098
|
+
|
|
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.225",
|
|
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)",
|