aotrautils-srv 0.0.144 → 0.0.147
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 (17/07/2022-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (17/07/2022-03:32:13)»*/
|
|
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 (17/07/2022-
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-03:32:13)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -5169,22 +5169,31 @@ WebsocketImplementation={
|
|
|
5169
5169
|
execute:(clientSocketParam)=>{
|
|
5170
5170
|
|
|
5171
5171
|
|
|
5172
|
-
|
|
5173
|
-
//
|
|
5172
|
+
// With «ws» library we have no choive than register message events inside a «connection» event !
|
|
5173
|
+
// nodeServerInstance.onConnectionToClient((serverParam, clientSocketParam)=>{
|
|
5174
5174
|
|
|
5175
|
-
|
|
5176
|
-
|
|
5175
|
+
// TODO : Find a way to remove this !
|
|
5176
|
+
const doOnMessage=(message)=>{
|
|
5177
5177
|
|
|
5178
5178
|
// dataWrapped=JSON.parse(dataWrapped);
|
|
5179
5179
|
// dataWrapped=getAt(dataWrapped,0);// We get the root element
|
|
5180
5180
|
const dataWrapped=(WebsocketImplementation.useFlatStrings?JSON.parse(message):message);
|
|
5181
5181
|
|
|
5182
|
+
|
|
5183
|
+
// DBG
|
|
5184
|
+
lognow(" Channel information:dataWrapped",dataWrapped);
|
|
5185
|
+
lognow(" Channel information:dataWrapped.channelName",receptionEntryPoint.clientsRoomsTag);
|
|
5186
|
+
lognow(" Channel information:receptionEntryPoint.channelName",receptionEntryPoint.channelName);
|
|
5187
|
+
|
|
5182
5188
|
|
|
5183
5189
|
// Channel information is stored in exchanged data :
|
|
5184
5190
|
if(dataWrapped.channelName!==receptionEntryPoint.channelName) return;
|
|
5185
|
-
|
|
5186
5191
|
|
|
5187
5192
|
const clientSocket=clientSocketParam;
|
|
5193
|
+
|
|
5194
|
+
|
|
5195
|
+
// DBG
|
|
5196
|
+
lognow("receptionEntryPoint.clientsRoomsTag:",receptionEntryPoint.clientsRoomsTag);
|
|
5188
5197
|
|
|
5189
5198
|
// TODO : FIXME : Use one single interface !
|
|
5190
5199
|
// Room information is stored in client socket object :
|
|
@@ -5207,9 +5216,6 @@ WebsocketImplementation={
|
|
|
5207
5216
|
clientSocketParam.onAny((event,args) => { console.log(`MAIS PUTAIN : ${event}:`,args); });
|
|
5208
5217
|
clientSocketParam.on(channelName,(args, clientSocket) => { console.log(`MAIS OSKOUR :${args} ${clientSocket}`); });
|
|
5209
5218
|
|
|
5210
|
-
// DBG
|
|
5211
|
-
lognow(">>>>doOnMessage:",doOnMessage);
|
|
5212
|
-
|
|
5213
5219
|
|
|
5214
5220
|
|
|
5215
5221
|
clientSocketParam.on(channelName, doOnMessage);
|
|
@@ -5260,7 +5266,7 @@ WebsocketImplementation={
|
|
|
5260
5266
|
|
|
5261
5267
|
dataWrapped=JSON.stringify(dataWrapped);
|
|
5262
5268
|
|
|
5263
|
-
|
|
5269
|
+
// TODO : FIXME : Use one single interface !
|
|
5264
5270
|
if(!WebsocketImplementation.useSocketIOImplementation) clientSocket.send(dataWrapped);
|
|
5265
5271
|
else clientSocket.emit(channelName,dataWrapped);
|
|
5266
5272
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.147",
|
|
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)",
|