aotrautils 0.0.220 → 0.0.223
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.
- aotrautils/aotrautils.build.js +19 -18
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1.0.0.000 (28/07/2022-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (28/07/2022-23:11:42)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4827,7 +4827,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4827
4827
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
|
-
/*utils CLIENT library associated with aotra version : «1.0.0.000 (28/07/2022-
|
|
4830
|
+
/*utils CLIENT library associated with aotra version : «1.0.0.000 (28/07/2022-23:11:42)»*/
|
|
4831
4831
|
/*-----------------------------------------------------------------------------*/
|
|
4832
4832
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
|
4833
4833
|
*
|
|
@@ -11676,7 +11676,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
|
|
|
11676
11676
|
|
|
11677
11677
|
|
|
11678
11678
|
|
|
11679
|
-
/*utils GEOMETRY library associated with aotra version : «1.0.0.000 (28/07/2022-
|
|
11679
|
+
/*utils GEOMETRY library associated with aotra version : «1.0.0.000 (28/07/2022-23:11:42)»*/
|
|
11680
11680
|
/*-----------------------------------------------------------------------------*/
|
|
11681
11681
|
|
|
11682
11682
|
|
|
@@ -12881,7 +12881,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
|
12881
12881
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
|
12882
12882
|
|
|
12883
12883
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
|
12884
|
-
/*utils SERVER library associated with aotra version : «1.0.0.000 (28/07/2022-
|
|
12884
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (28/07/2022-23:11:42)»*/
|
|
12885
12885
|
/*-----------------------------------------------------------------------------*/
|
|
12886
12886
|
|
|
12887
12887
|
|
|
@@ -13143,16 +13143,15 @@ WebsocketImplementation={
|
|
|
13143
13143
|
// https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications
|
|
13144
13144
|
if(isNodeContext){
|
|
13145
13145
|
if(typeof(WebSocket)==="undefined"){
|
|
13146
|
-
WebSocket=require("ws");
|
|
13147
13146
|
// TRACE
|
|
13148
13147
|
console.log("«ws» SERVER library not called yet, calling it now.");
|
|
13148
|
+
WebSocket=require("ws");
|
|
13149
|
+
if(typeof(WebSocket)==="undefined"){
|
|
13150
|
+
// TRACE
|
|
13151
|
+
console.log("ERROR : «ws» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
13152
|
+
}
|
|
13149
13153
|
return WebsocketImplementation;
|
|
13150
13154
|
}
|
|
13151
|
-
if(typeof(WebSocket)==="undefined"){
|
|
13152
|
-
// TRACE
|
|
13153
|
-
console.log("ERROR : «ws» CONSOLE/BROWSER CLIENT/SERVER library not found. Cannot launch nodejs server. Aborting.");
|
|
13154
|
-
return WebsocketImplementation;
|
|
13155
|
-
}
|
|
13156
13155
|
}
|
|
13157
13156
|
|
|
13158
13157
|
}
|
|
@@ -13498,7 +13497,7 @@ WebsocketImplementation={
|
|
|
13498
13497
|
connectToServer:(serverURL, port, isSecure=false, timeout)=>{
|
|
13499
13498
|
|
|
13500
13499
|
// TRACE
|
|
13501
|
-
lognow("INFO : Using
|
|
13500
|
+
lognow("INFO : Using socket library flavor : "+(WebsocketImplementation.isNodeContext?"node (client/server-side)":"browser (client-side only)"));
|
|
13502
13501
|
|
|
13503
13502
|
if(WebsocketImplementation.isNodeContext)
|
|
13504
13503
|
return WebsocketImplementation.connectToServerFromNode(serverURL, port, isSecure, timeout);
|
|
@@ -13514,16 +13513,18 @@ WebsocketImplementation={
|
|
|
13514
13513
|
/*private*/connectToServerFromNode:(serverURL, port, isSecure, timeout)=>{
|
|
13515
13514
|
|
|
13516
13515
|
|
|
13517
|
-
// NEW : ws :
|
|
13518
|
-
if(typeof(WebSocket)==="undefined"){
|
|
13519
|
-
// TRACE
|
|
13520
|
-
lognow("ERROR : CLIENT : Could not find websocket client lib, aborting client connection.");
|
|
13521
|
-
return null;
|
|
13522
|
-
}
|
|
13523
|
-
|
|
13524
13516
|
// NODE CLIENT MODE ONLY :
|
|
13525
13517
|
let clientSocket;
|
|
13526
13518
|
if(!WebsocketImplementation.useSocketIOImplementation){
|
|
13519
|
+
|
|
13520
|
+
// NEW : ws :
|
|
13521
|
+
if(typeof(WebSocket)==="undefined"){
|
|
13522
|
+
// TRACE
|
|
13523
|
+
lognow("ERROR : CLIENT : Could not find websocket client lib, aborting client connection.");
|
|
13524
|
+
return null;
|
|
13525
|
+
}
|
|
13526
|
+
|
|
13527
|
+
|
|
13527
13528
|
clientSocket=new WebSocket(serverURL+":"+port,/*WORKAROUND:*/{ rejectUnauthorized:false, secure: isSecure });
|
|
13528
13529
|
}else{
|
|
13529
13530
|
// NOW : socket.io :
|
aotrautils/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.223",
|
|
4
4
|
"main": "aotrautils.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|