aotrautils-srv 0.0.458 → 0.0.460
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_29072022-2359 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (29/01/2023-23:03:28)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4864,7 +4864,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4864
4864
|
|
|
4865
4865
|
|
|
4866
4866
|
|
|
4867
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
4867
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (29/01/2023-23:03:28)»*/
|
|
4868
4868
|
/*-----------------------------------------------------------------------------*/
|
|
4869
4869
|
|
|
4870
4870
|
|
|
@@ -4928,23 +4928,23 @@ if(typeof(fs)==="undefined"){
|
|
|
4928
4928
|
}else{
|
|
4929
4929
|
|
|
4930
4930
|
|
|
4931
|
-
getPersister=function(dataDirPath,
|
|
4931
|
+
getPersister=function(dataDirPath,prefix=""){
|
|
4932
4932
|
|
|
4933
4933
|
let self={
|
|
4934
4934
|
|
|
4935
4935
|
dataDirPath:dataDirPath,
|
|
4936
|
-
|
|
4936
|
+
prefix:prefix,
|
|
4937
4937
|
|
|
4938
4938
|
//FILE_NAME_PATTERN:"data.clientId.repositoryName.json",
|
|
4939
|
-
/*private*/getPath:function(clientId,repositoryName){
|
|
4939
|
+
/*private*/getPath:function(clientId="noclient", repositoryName="norepository"){
|
|
4940
4940
|
// let path=self.FILE_NAME_PATTERN.replace(new RegExp("@clientId@","g"),clientId);
|
|
4941
4941
|
let path=`${self.dataDirPath}`
|
|
4942
|
-
+ (blank(self.
|
|
4942
|
+
+ (blank(self.prefix)?"":(self.prefix+"."))
|
|
4943
4943
|
+`${clientId}.${repositoryName}.json`;
|
|
4944
4944
|
return path;
|
|
4945
4945
|
},
|
|
4946
4946
|
|
|
4947
|
-
readTreeObjectFromFile:function(clientId, repositoryName, CLASSNAME_ATTR_NAME=DEFAULT_CLASSNAME_ATTR_NAME){
|
|
4947
|
+
readTreeObjectFromFile:function(clientId="noclient", repositoryName="norepository", CLASSNAME_ATTR_NAME=DEFAULT_CLASSNAME_ATTR_NAME){
|
|
4948
4948
|
|
|
4949
4949
|
let path=self.getPath(clientId,repositoryName);
|
|
4950
4950
|
|
|
@@ -5796,8 +5796,13 @@ WebsocketImplementation={
|
|
|
5796
5796
|
if(doOnIncomingMessage)
|
|
5797
5797
|
doOnIncomingMessage(dataWrapped.data, clientSocket);
|
|
5798
5798
|
|
|
5799
|
+
// We remove one-time usage listeners :
|
|
5799
5800
|
if(listenerConfig && listenerConfig.destroyListenerAfterReceiving)
|
|
5800
5801
|
remove(browserInstance.receptionEntryPoints,receptionEntryPoint);
|
|
5802
|
+
|
|
5803
|
+
// DBG
|
|
5804
|
+
lognow("browserInstance.receptionEntryPoints("+browserInstance.receptionEntryPoints.length+"):",browserInstance.receptionEntryPoints);
|
|
5805
|
+
|
|
5801
5806
|
}
|
|
5802
5807
|
};
|
|
5803
5808
|
|
|
@@ -5805,8 +5810,6 @@ WebsocketImplementation={
|
|
|
5805
5810
|
if(!contains(browserInstance.receptionEntryPoints,(l)=>(l.id && receptionEntryPoint.id && l.id===receptionEntryPoint.id)))
|
|
5806
5811
|
browserInstance.receptionEntryPoints.push(receptionEntryPoint);
|
|
5807
5812
|
|
|
5808
|
-
// DBG
|
|
5809
|
-
lognow("browserInstance.receptionEntryPoints("+browserInstance.receptionEntryPoints.length+"):",browserInstance.receptionEntryPoints);
|
|
5810
5813
|
|
|
5811
5814
|
return browserInstance;
|
|
5812
5815
|
},
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.460",
|
|
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)",
|