aotrautils-srv 0.0.49 → 0.0.52

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 (11/07/2022-20:58:09)»*/
3
+ /*utils SERVER library associated with aotra version : «1.0.0.000 (11/07/2022-23:37:18)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -140,59 +140,60 @@ if(typeof(fs)==="undefined"){
140
140
 
141
141
  // -Server :
142
142
 
143
- getServerParams=function(portParam,isSecureParam,certPathParam,keyPathParam){
144
-
145
- // Node dependencies :
146
- // https=require("https");
147
- // fs=require("fs");
148
-
149
- if(!https){
150
- // TRACE
151
- console.log("WARN : Could not find the nodejs dependency «https», aborting SSL setup.");
152
- return null;
153
- }
154
- if(!fs){
155
- // TRACE
156
- console.log("WARN : Could not find the nodejs dependency «fs», aborting SSL setup.");
157
- return null;
158
- }
159
-
160
- var result={};
161
-
162
- // We read the command-line arguments if needed :
163
- var argCLPort;
164
- var argCLCertPath;
165
- var argCLKeyPath;
166
- process.argv.forEach(function (val, i){
167
- if(i<=1) return;
168
- else if(i==2) argCLPort=val;
169
- else if(i==3) argCLCertPath=val;
170
- else if(i==4) argCLKeyPath=val;
171
- });
172
-
173
- // Console, command-line arguments OVERRIDE parameters values :
174
-
175
- result.port=nonull(argCLPort,portParam);
176
- result.certPath=null;
177
- result.keyPath=null;
178
- result.isSecure=isSecureParam;
179
-
180
- if(isSecureParam){
181
- result.certPath=nonull(argCLCertPath,certPathParam);
182
- result.keyPath=nonull(argCLKeyPath,keyPathParam);
183
- }
184
-
185
- // Eventual encryption options :
186
- result.sslOptions=null;
187
- if(isSecureParam){
188
- result.sslOptions={
189
- cert: fs.readFileSync(certPath),
190
- key: fs.readFileSync(keyPath),
191
- };
192
- }
193
-
194
- return result;
195
- }
143
+ // UNUSED : (BUT KEEP CODE!!)
144
+ //getServerParams=function(portParam,isSecureParam,certPathParam,keyPathParam){
145
+ //
146
+ // // Node dependencies :
147
+ // // https=require("https");
148
+ // // fs=require("fs");
149
+ //
150
+ // if(!https){
151
+ // // TRACE
152
+ // console.log("WARN : Could not find the nodejs dependency «https», aborting SSL setup.");
153
+ // return null;
154
+ // }
155
+ // if(!fs){
156
+ // // TRACE
157
+ // console.log("WARN : Could not find the nodejs dependency «fs», aborting SSL setup.");
158
+ // return null;
159
+ // }
160
+ //
161
+ // var result={};
162
+ //
163
+ // // We read the command-line arguments if needed :
164
+ // var argCLPort;
165
+ // var argCLCertPath;
166
+ // var argCLKeyPath;
167
+ // process.argv.forEach(function (val, i){
168
+ // if(i<=1) return;
169
+ // else if(i==2) argCLPort=val;
170
+ // else if(i==3) argCLCertPath=val;
171
+ // else if(i==4) argCLKeyPath=val;
172
+ // });
173
+ //
174
+ // // Console, command-line arguments OVERRIDE parameters values :
175
+ //
176
+ // result.port=nonull(argCLPort,portParam);
177
+ // result.certPath=null;
178
+ // result.keyPath=null;
179
+ // result.isSecure=isSecureParam;
180
+ //
181
+ // if(isSecureParam){
182
+ // result.certPath=nonull(argCLCertPath,certPathParam);
183
+ // result.keyPath=nonull(argCLKeyPath,keyPathParam);
184
+ // }
185
+ //
186
+ // // Eventual encryption options :
187
+ // result.sslOptions=null;
188
+ // if(isSecureParam){
189
+ // result.sslOptions={
190
+ // cert: fs.readFileSync(certPath),
191
+ // key: fs.readFileSync(keyPath),
192
+ // };
193
+ // }
194
+ //
195
+ // return result;
196
+ //}
196
197
 
197
198
 
198
199
  // NODE ONLY SERVER / CLIENTS :
@@ -1015,7 +1016,6 @@ initNodeServer=function(doOnClientConnection=null, doOnFinalizeServer=null, /*OP
1015
1016
  }
1016
1017
  }catch(err2){
1017
1018
  lognow("ERROR : Cannot parse JSON string «"+val+"».",err2);
1018
- isHashAsked=true;
1019
1019
  }
1020
1020
  } else persisterId=val;
1021
1021
  }else if(i==4){
@@ -1303,7 +1303,7 @@ function getListManager(config){
1303
1303
 
1304
1304
 
1305
1305
 
1306
- /*utils COMMONS library associated with aotra version : «1.0.0.000 (11/07/2022-20:58:09)»*/
1306
+ /*utils COMMONS library associated with aotra version : «1.0.0.000 (11/07/2022-23:37:18)»*/
1307
1307
  /*-----------------------------------------------------------------------------*/
1308
1308
 
1309
1309
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.49",
3
+ "version": "0.0.52",
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)",