aotrautils-srv 0.0.86 → 0.0.89
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 (13/07/2022-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-11:25:30)»*/
|
|
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 (13/07/2022-
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (13/07/2022-11:25:30)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -4863,41 +4863,43 @@ if(typeof(window)==="undefined") window=global;
|
|
|
4863
4863
|
// https://stackoverflow.com/questions/6599470/node-js-socket-io-with-ssl
|
|
4864
4864
|
// https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
|
|
4865
4865
|
|
|
4866
|
+
const socketIO=require("socket.io");;
|
|
4867
|
+
const WebSocket=require("ws");;
|
|
4866
4868
|
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
if(typeof(socketIO)==="undefined"){
|
|
4871
|
-
// TRACE
|
|
4872
|
-
lognow("«socket.io» SERVER library not called yet, calling it now.");
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
// TRACE
|
|
4878
|
-
lognow("«socket.io» SERVER library called:",socketIO);
|
|
4879
|
-
|
|
4880
|
-
}
|
|
4881
|
-
if(typeof(socketIO)==="undefined"){
|
|
4882
|
-
// Exception
|
|
4883
|
-
lognow("ERROR : «socket.io» SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
4884
|
-
}
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
if(typeof(WebSocket)==="undefined"){
|
|
4893
|
-
WebSocket=require("ws");
|
|
4894
|
-
// TRACE
|
|
4895
|
-
lognow("«ws» SERVER library not called yet, calling it now.");
|
|
4896
|
-
}
|
|
4897
|
-
if(typeof(WebSocket)==="undefined"){
|
|
4898
|
-
// TRACE
|
|
4899
|
-
lognow("ERROR : «ws» SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
4900
|
-
}
|
|
4869
|
+
//let socketIO;
|
|
4870
|
+
//let WebSocket;
|
|
4871
|
+
//
|
|
4872
|
+
//if(typeof(socketIO)==="undefined"){
|
|
4873
|
+
// // TRACE
|
|
4874
|
+
// lognow("«socket.io» SERVER library not called yet, calling it now.");
|
|
4875
|
+
//
|
|
4876
|
+
// socketIO=require("socket.io");
|
|
4877
|
+
//// import { socketIO } from "socket.io";
|
|
4878
|
+
//
|
|
4879
|
+
// // TRACE
|
|
4880
|
+
// lognow("«socket.io» SERVER library called:",socketIO);
|
|
4881
|
+
//
|
|
4882
|
+
//}
|
|
4883
|
+
//if(typeof(socketIO)==="undefined"){
|
|
4884
|
+
// // Exception
|
|
4885
|
+
// lognow("ERROR : «socket.io» SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
4886
|
+
//}
|
|
4887
|
+
//
|
|
4888
|
+
//// NEW : ws :
|
|
4889
|
+
//// https://github.com/websockets/ws#installing
|
|
4890
|
+
//// https://github.com/websockets/ws/blob/master/doc/ws.md#event-message
|
|
4891
|
+
//// ON BROWSER SIDE : Native Websockets :
|
|
4892
|
+
//// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
|
|
4893
|
+
//// https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications
|
|
4894
|
+
//if(typeof(WebSocket)==="undefined"){
|
|
4895
|
+
// WebSocket=require("ws");
|
|
4896
|
+
// // TRACE
|
|
4897
|
+
// lognow("«ws» SERVER library not called yet, calling it now.");
|
|
4898
|
+
//}
|
|
4899
|
+
//if(typeof(WebSocket)==="undefined"){
|
|
4900
|
+
// // TRACE
|
|
4901
|
+
// lognow("ERROR : «ws» SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
4902
|
+
//}
|
|
4901
4903
|
|
|
4902
4904
|
|
|
4903
4905
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.89",
|
|
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)",
|