aotrautils-srv 0.0.211 → 0.0.214
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 (19/07/2022-03:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (19/07/2022-03:50:14)»*/
|
|
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 (19/07/2022-03:
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (19/07/2022-03:50:14)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -6164,16 +6164,24 @@ class ListManager{
|
|
|
6164
6164
|
return;
|
|
6165
6165
|
}
|
|
6166
6166
|
const numberOfItemsCurrently=getArraySize(this.itemsInfos);
|
|
6167
|
+
|
|
6168
|
+
// DBG
|
|
6169
|
+
lognow(">>>>>>>>>numberOfItemsCurrently:",numberOfItemsCurrently);
|
|
6170
|
+
lognow(">>>>>>>>>Object.keys(arrayOfValues):",Object.keys(this.itemsInfos));
|
|
6171
|
+
|
|
6172
|
+
|
|
6167
6173
|
if(this.maxItemsNumber<=numberOfItemsCurrently){
|
|
6168
6174
|
// TRACE
|
|
6169
6175
|
lognow("ERROR : Cannot add item with id «"+id+"», list already full.");
|
|
6170
6176
|
return;
|
|
6171
6177
|
}
|
|
6172
6178
|
|
|
6173
|
-
// DBG
|
|
6174
|
-
lognow(">>>>>>>>>numberOfItemsCurrently:",numberOfItemsCurrently);
|
|
6175
6179
|
|
|
6176
6180
|
if(numberOfItemsCurrently==0 && this.mode==="startAtConnexion"){
|
|
6181
|
+
|
|
6182
|
+
// DBG
|
|
6183
|
+
lognow(">>>>>>>>>START SESSION !!!!");
|
|
6184
|
+
|
|
6177
6185
|
this.startSession();
|
|
6178
6186
|
}
|
|
6179
6187
|
this.itemsInfos[id]={
|
|
@@ -6183,7 +6191,7 @@ class ListManager{
|
|
|
6183
6191
|
}
|
|
6184
6192
|
|
|
6185
6193
|
startSession(){
|
|
6186
|
-
this.time
|
|
6194
|
+
this.time=getNow();
|
|
6187
6195
|
this.started=true;
|
|
6188
6196
|
}
|
|
6189
6197
|
|
|
@@ -6192,15 +6200,27 @@ class ListManager{
|
|
|
6192
6200
|
}
|
|
6193
6201
|
|
|
6194
6202
|
isSessionActive(){
|
|
6203
|
+
|
|
6204
|
+
// DBG
|
|
6205
|
+
lognow(" !!! this.sessionDurationSeconds : "+this.sessionDurationSeconds);
|
|
6206
|
+
lognow(" !!! this.started : "+this.started);
|
|
6207
|
+
lognow(" !!! this.time : "+this.time);
|
|
6208
|
+
|
|
6209
|
+
|
|
6195
6210
|
if(!this.sessionDurationSeconds) return true;
|
|
6196
6211
|
if(!this.started) return false;
|
|
6197
|
-
|
|
6212
|
+
const result=!hasDelayPassed(this.time, this.sessionDurationSeconds*1000);
|
|
6213
|
+
|
|
6214
|
+
// DBG
|
|
6215
|
+
lognow(" !!! HAS DELAY PASSED : "+result);
|
|
6216
|
+
|
|
6217
|
+
return result;
|
|
6198
6218
|
}
|
|
6199
6219
|
|
|
6200
6220
|
isClientActive(clientId){
|
|
6201
6221
|
|
|
6202
6222
|
// DBG
|
|
6203
|
-
lognow(" this.isSessionActive()"
|
|
6223
|
+
lognow(" this.isSessionActive()"+this.isSessionActive());
|
|
6204
6224
|
|
|
6205
6225
|
if(!this.isSessionActive()) return false;
|
|
6206
6226
|
const clientPosition=this.getItemPosition(clientId);
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.214",
|
|
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)",
|