aotrautils-srv 0.0.66 → 0.0.69
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 SERVER library associated with aotra version : «1.0.0.000 (13/07/2022-01:
|
|
3
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -210,7 +210,7 @@ WebsocketImplementation={
|
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
//
|
|
213
|
-
// NODE SERVER
|
|
213
|
+
// NODE SERVER/CLIENT
|
|
214
214
|
//
|
|
215
215
|
getStatic:(isNodeContext=true, useSocketIOImplementation=false)=>{
|
|
216
216
|
|
|
@@ -219,21 +219,29 @@ WebsocketImplementation={
|
|
|
219
219
|
// cf. https://socket.io/docs/v4/client-socket-instance/
|
|
220
220
|
WebsocketImplementation.useSocketIOImplementation=useSocketIOImplementation;
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
// https://stackoverflow.com/questions/6599470/node-js-socket-io-with-ssl
|
|
225
|
-
// https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
|
|
226
|
-
|
|
227
|
-
if(typeof(socketIO)==="undefined"){
|
|
222
|
+
if(WebsocketImplementation.useSocketIOImplementation){
|
|
223
|
+
|
|
228
224
|
// TRACE
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
225
|
+
lognow("INFO : (SERVER/CLIENT) Using socket.io websocket implementation.");
|
|
226
|
+
|
|
227
|
+
// OLD : socket.io :
|
|
228
|
+
// https://stackoverflow.com/questions/31156884/how-to-use-https-on-node-js-using-express-socket-io
|
|
229
|
+
// https://stackoverflow.com/questions/6599470/node-js-socket-io-with-ssl
|
|
230
|
+
// https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
|
|
231
|
+
|
|
232
|
+
if(typeof(socketIO)==="undefined"){
|
|
233
|
+
// TRACE
|
|
234
|
+
console.log("«socket.io» SERVER library not called yet, calling it now.");
|
|
235
|
+
socketIO=require("socket.io");
|
|
236
|
+
}
|
|
237
|
+
if(typeof(socketIO)==="undefined"){
|
|
238
|
+
// Exception
|
|
239
|
+
throw "ERROR : «socket.io» SERVER library not found. Cannot launch nodejs server. Aborting.";
|
|
240
|
+
}
|
|
241
|
+
}else{
|
|
234
242
|
// TRACE
|
|
235
|
-
|
|
236
|
-
|
|
243
|
+
lognow("INFO : (SERVER/CLIENT) Using native websocket implementation.");
|
|
244
|
+
|
|
237
245
|
}
|
|
238
246
|
|
|
239
247
|
// *********************************************************************************
|
|
@@ -1301,7 +1309,7 @@ function getListManager(config){
|
|
|
1301
1309
|
|
|
1302
1310
|
|
|
1303
1311
|
|
|
1304
|
-
/*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-01:
|
|
1312
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (13/07/2022-01:51:28)»*/
|
|
1305
1313
|
/*-----------------------------------------------------------------------------*/
|
|
1306
1314
|
|
|
1307
1315
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
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)",
|