aotrautils-srv 0.0.131 → 0.0.132
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 (16/07/2022-16:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (16/07/2022-16:58:53)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
4830
|
|
|
4831
|
-
/*utils SERVER library associated with aotra version : «1.0.0.000 (16/07/2022-16:
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (16/07/2022-16:58:53)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -5070,16 +5070,18 @@ WebsocketImplementation={
|
|
|
5070
5070
|
// TRACE
|
|
5071
5071
|
lognow("INFO : (SERVER/CLIENT) Using socket.io websocket implementation.");
|
|
5072
5072
|
|
|
5073
|
-
if(isNodeContext
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5073
|
+
if(isNodeContext){
|
|
5074
|
+
if(typeof(Socket)==="undefined"){
|
|
5075
|
+
// TRACE
|
|
5076
|
+
console.log("«socket.io» SERVER library not called yet, calling it now.");
|
|
5077
|
+
Socket=require("socket.io");
|
|
5078
|
+
return WebsocketImplementation;
|
|
5079
|
+
}
|
|
5080
|
+
if(typeof(Socket)==="undefined"){
|
|
5081
|
+
// TRACE
|
|
5082
|
+
console.log("ERROR : «socket.io» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
5083
|
+
return WebsocketImplementation;
|
|
5084
|
+
}
|
|
5083
5085
|
}
|
|
5084
5086
|
|
|
5085
5087
|
}else{
|
|
@@ -5087,17 +5089,19 @@ WebsocketImplementation={
|
|
|
5087
5089
|
lognow("INFO : (SERVER/CLIENT) Using native WebSocket implementation.");
|
|
5088
5090
|
|
|
5089
5091
|
// https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications
|
|
5090
|
-
if(isNodeContext
|
|
5091
|
-
WebSocket
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5092
|
+
if(isNodeContext){
|
|
5093
|
+
if(typeof(WebSocket)==="undefined"){
|
|
5094
|
+
WebSocket=require("ws");
|
|
5095
|
+
// TRACE
|
|
5096
|
+
console.log("«ws» SERVER library not called yet, calling it now.");
|
|
5097
|
+
return WebsocketImplementation;
|
|
5098
|
+
}
|
|
5099
|
+
if(typeof(WebSocket)==="undefined"){
|
|
5100
|
+
// TRACE
|
|
5101
|
+
console.log("ERROR : «ws» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
5102
|
+
return WebsocketImplementation;
|
|
5103
|
+
}
|
|
5095
5104
|
}
|
|
5096
|
-
if(typeof(WebSocket)==="undefined"){
|
|
5097
|
-
// TRACE
|
|
5098
|
-
console.log("ERROR : «ws» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
5099
|
-
return WebsocketImplementation;
|
|
5100
|
-
}
|
|
5101
5105
|
|
|
5102
5106
|
}
|
|
5103
5107
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.132",
|
|
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)",
|