aotrautils 0.0.115 → 0.0.116

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-15:09:11)»*/
3
+ /*utils COMMONS library associated with aotra version : «1.0.0.000 (16/07/2022-15:18:00)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4828
4828
 
4829
4829
 
4830
4830
 
4831
- /*utils CLIENT library associated with aotra version : «1.0.0.000 (16/07/2022-15:09:11)»*/
4831
+ /*utils CLIENT library associated with aotra version : «1.0.0.000 (16/07/2022-15:18:00)»*/
4832
4832
  /*-----------------------------------------------------------------------------*/
4833
4833
  /* ## Utility global methods in a browser (htmljs) client environment.
4834
4834
  *
@@ -11678,7 +11678,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
11678
11678
 
11679
11679
 
11680
11680
 
11681
- /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (16/07/2022-15:09:11)»*/
11681
+ /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (16/07/2022-15:18:00)»*/
11682
11682
  /*-----------------------------------------------------------------------------*/
11683
11683
 
11684
11684
 
@@ -12884,7 +12884,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
12884
12884
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
12885
12885
 
12886
12886
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
12887
- /*utils SERVER library associated with aotra version : «1.0.0.000 (16/07/2022-15:09:11)»*/
12887
+ /*utils SERVER library associated with aotra version : «1.0.0.000 (16/07/2022-15:18:00)»*/
12888
12888
  /*-----------------------------------------------------------------------------*/
12889
12889
 
12890
12890
 
@@ -13109,8 +13109,8 @@ if(typeof(fs)==="undefined"){
13109
13109
  // NODE ONLY SERVER / CLIENTS :
13110
13110
  WebsocketImplementation={
13111
13111
 
13112
- Socket:Socket,
13113
- Websocket:WebSocket,
13112
+ // Socket:Socket,
13113
+ // WebSocket:WebSocket,
13114
13114
 
13115
13115
  isNodeContext:true,
13116
13116
  useSocketIOImplementation:false,
@@ -13144,8 +13144,8 @@ WebsocketImplementation={
13144
13144
  // *********************************************************************************
13145
13145
 
13146
13146
  // DBG
13147
- console.log("11111 WebsocketImplementation.Socket:",WebsocketImplementation.Socket);
13148
- console.log("11111 WebsocketImplementation.WebSocket:",WebsocketImplementation.WebSocket);
13147
+ console.log("11111 Socket:",Socket);
13148
+ console.log("11111 WebSocket:",WebSocket);
13149
13149
 
13150
13150
 
13151
13151
 
@@ -13166,17 +13166,17 @@ WebsocketImplementation={
13166
13166
  // NODE SERVER MODE ONLY :
13167
13167
  let serverSocket;
13168
13168
  if(!WebsocketImplementation.useSocketIOImplementation){
13169
- serverSocket=new WebsocketImplementation.WebSocket.Server({ "server":listenableServer });
13169
+ serverSocket=new WebSocket.Server({ "server":listenableServer });
13170
13170
  }else{
13171
13171
 
13172
13172
 
13173
13173
  // DBG
13174
- console.log(">>>>>>>WebsocketImplementation.Socket:",WebsocketImplementation.Socket);
13175
- console.log(">>>>>>>WebsocketImplementation.WebSocket:",WebsocketImplementation.WebSocket);
13174
+ console.log(">>>>>>>Socket:",Socket);
13175
+ console.log(">>>>>>>WebSocket:",WebSocket);
13176
13176
 
13177
13177
  // NOW : socket.io :
13178
13178
  // Loading socket.io
13179
- serverSocket=WebsocketImplementation.Socket.listen(listenableServer);
13179
+ serverSocket=Socket.listen(listenableServer);
13180
13180
 
13181
13181
  // Setting up the disctonnect event :
13182
13182
  serverSocket.on("endConnection",()=>{
@@ -13264,7 +13264,7 @@ WebsocketImplementation={
13264
13264
 
13265
13265
 
13266
13266
  // TODO : FIXME : Use one single interface !
13267
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebsocketImplementation.WebSocket.OPEN) return;
13267
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
13268
13268
  else if(clientSocket.connected) return;
13269
13269
 
13270
13270
 
@@ -13288,7 +13288,7 @@ WebsocketImplementation={
13288
13288
 
13289
13289
  // TODO : FIXME : Use one single interface !
13290
13290
  let clientSocket=clientSocketParam;
13291
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebsocketImplementation.WebSocket.OPEN) return;
13291
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
13292
13292
  else if(clientSocket.connected) return;
13293
13293
 
13294
13294
 
@@ -13465,7 +13465,7 @@ WebsocketImplementation={
13465
13465
 
13466
13466
 
13467
13467
  // NEW : ws :
13468
- if(typeof(WebsocketImplementation.WebSocket)==="undefined"){
13468
+ if(typeof(WebSocket)==="undefined"){
13469
13469
  // TRACE
13470
13470
  lognow("ERROR : CLIENT : Could not find websocket client lib, aborting client connection.");
13471
13471
  return null;
@@ -13474,17 +13474,17 @@ WebsocketImplementation={
13474
13474
  // NODE CLIENT MODE ONLY :
13475
13475
  let clientSocket;
13476
13476
  if(!WebsocketImplementation.useSocketIOImplementation){
13477
- clientSocket=new WebsocketImplementation.WebSocket(serverURL+":"+port,/*WORKAROUND:*/{ rejectUnauthorized:false, secure: isSecure });
13477
+ clientSocket=new WebSocket(serverURL+":"+port,/*WORKAROUND:*/{ rejectUnauthorized:false, secure: isSecure });
13478
13478
  }else{
13479
13479
  // NOW : socket.io :
13480
13480
  //client on server-side:
13481
13481
 
13482
- if(WebsocketImplementation.isNodeContext && typeof(WebsocketImplementation.Socket)!=="undefined"){
13482
+ if(WebsocketImplementation.isNodeContext && typeof(Socket)!=="undefined"){
13483
13483
  // // Node client :
13484
13484
  // connectToServer=function (serverURL, port, isSecure, timeout=10000){
13485
- // return WebsocketImplementation.Socket.connect(serverURL + ":" + port,{timeout: timeout});
13485
+ // return Socket.connect(serverURL + ":" + port,{timeout: timeout});
13486
13486
  // }
13487
- clientSocket=WebsocketImplementation.Socket.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
13487
+ clientSocket=Socket.connect(serverURL + ":" + port,{timeout: timeout, secure: isSecure});
13488
13488
  }
13489
13489
  }
13490
13490
 
@@ -13544,7 +13544,7 @@ WebsocketImplementation={
13544
13544
  // console.log("(NODE CLIENT) TRYING TO SEND : clientSocket.readyState:",clientSocket.readyState);
13545
13545
 
13546
13546
  // TODO : FIXME : Use one single interface !
13547
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebsocketImplementation.WebSocket.OPEN) return;
13547
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
13548
13548
  else if(clientSocket.connected) return;
13549
13549
 
13550
13550
 
@@ -13621,7 +13621,7 @@ WebsocketImplementation={
13621
13621
  /*private*/connectToServerFromBrowser:(serverURL, port, isSecure, timeout)=>{
13622
13622
 
13623
13623
  // NEW : ws :
13624
- if(typeof(WebsocketImplementation.WebSocket)==="undefined"){
13624
+ if(typeof(WebSocket)==="undefined"){
13625
13625
  // TRACE
13626
13626
  lognow("ERROR : CLIENT : Could not find websocket client lib, aborting client connection.");
13627
13627
  return null;
@@ -13631,7 +13631,7 @@ WebsocketImplementation={
13631
13631
  // BROWSER CLIENT MODE ONLY :
13632
13632
  let clientSocket;
13633
13633
  if(!WebsocketImplementation.useSocketIOImplementation){
13634
- clientSocket=new WebsocketImplementation.WebSocket(serverURL+":"+port,["ws","wss"]);
13634
+ clientSocket=new WebSocket(serverURL+":"+port,["ws","wss"]);
13635
13635
  }else if(typeof(io)!=="undefined"){
13636
13636
  // NOW : socket.io :
13637
13637
  // // Browser client :
@@ -13697,7 +13697,7 @@ WebsocketImplementation={
13697
13697
  // console.log("(BROWSER) TRYING TO SEND : clientSocket.readyState:",clientSocket.readyState);
13698
13698
 
13699
13699
  // TODO : FIXME : Use one single interface !
13700
- if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebsocketImplementation.WebSocket.OPEN) return;
13700
+ if(!WebsocketImplementation.useSocketIOImplementation) if(clientSocket.readyState!==WebSocket.OPEN) return;
13701
13701
  else if(clientSocket.connected) return;
13702
13702
 
13703
13703
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
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)",