aotrautils-srv 0.0.1995 → 0.0.1997

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 (14/09/2026-01:53:26)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (04/10/2026-00:30:48)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5485,7 +5485,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
5485
5485
 
5486
5486
 
5487
5487
 
5488
- /*utils AI library associated with aotra version : «1_29072022-2359 (14/09/2026-01:53:26)»*/
5488
+ /*utils AI library associated with aotra version : «1_29072022-2359 (04/10/2026-00:30:48)»*/
5489
5489
  /*-----------------------------------------------------------------------------*/
5490
5490
 
5491
5491
 
@@ -5749,7 +5749,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
5749
5749
 
5750
5750
 
5751
5751
 
5752
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (14/09/2026-01:53:26)»*/
5752
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (04/10/2026-00:30:48)»*/
5753
5753
  /*-----------------------------------------------------------------------------*/
5754
5754
 
5755
5755
 
@@ -5957,6 +5957,7 @@ window.AORTACClientCell=class AORTACClientCell{
5957
5957
  },{listenerMessageType:"clientHello.response"});
5958
5958
 
5959
5959
  }
5960
+
5960
5961
 
5961
5962
  // ----
5962
5963
  // RECONNECTED CLIENT HELLO SEQUENCE
@@ -6126,6 +6127,51 @@ window.getAORTACClient=function(serverCellOrigin="ws://127.0.0.1:40000", model,
6126
6127
 
6127
6128
 
6128
6129
 
6130
+ /* ## Utility methods in a javascript, for AORTAC subsystem (client)
6131
+ *
6132
+ * This set of methods gathers utility generic-purpose methods usable in any JS project.
6133
+ * Several authors of snippets published freely on the Internet contributed to this library.
6134
+ * Feel free to use/modify-enhance/publish them under the terms of its license.
6135
+ *
6136
+ * # Library name : «aotrautils»
6137
+ * # Library license : HGPL(Help Burma) (see aotra README information for details : https://alqemia.com/aotra.js )
6138
+ * # Author name : Jérémie Ratomposon (massively helped by his native country free education system)
6139
+ * # Author email : info@alqemia.com
6140
+ * # Organization name : Alqemia
6141
+ * # Organization email : admin@alqemia.com
6142
+ * # Organization website : https://alqemia.com
6143
+ *
6144
+ *
6145
+ */
6146
+
6147
+
6148
+
6149
+ // COMPATIBILITY browser javascript / nodejs environment :
6150
+ if(typeof(window)==="undefined") window=global;
6151
+
6152
+
6153
+ // ==================================================================================================================
6154
+
6155
+
6156
+ // AORTAC CLIENT CENTRALIZED PROTOCOL
6157
+
6158
+
6159
+ // CURRENT 1
6160
+ window.ModificationRequestSender=class ModificationRequestSender{
6161
+ constructor(serverCell){
6162
+ this.serverCell=serverCell;
6163
+ }
6164
+ }
6165
+
6166
+ window.ViewChangedRequestSender=class ViewChangedRequestSender{
6167
+ constructor(serverCell){
6168
+ this.serverCell=serverCell;
6169
+ }
6170
+ }
6171
+
6172
+
6173
+
6174
+
6129
6175
  /* ## Utility methods in a javascript, for AORTAC subsystem (server)
6130
6176
  *
6131
6177
  * This set of methods gathers utility generic-purpose methods usable in any JS project.
@@ -6212,6 +6258,11 @@ window.AORTACServerCell=class AORTACServerCell{
6212
6258
 
6213
6259
  this.clients={};
6214
6260
 
6261
+
6262
+ // OTHER PROTOCOL HANDLERS :
6263
+ this.modificationRequestHandler=new ModificationRequestHandler(this);
6264
+ this.viewChangedRequestHandler=new ViewChangedRequestHandler(this);
6265
+
6215
6266
  }
6216
6267
 
6217
6268
  start(){
@@ -6381,6 +6432,7 @@ window.AORTACServerCell=class AORTACServerCell{
6381
6432
  }
6382
6433
 
6383
6434
  /*private*/handleCommonListeners(){
6435
+
6384
6436
  // HANDLE CELL IS READY SEQUENCE
6385
6437
  this.handleCellIsReadySequence();
6386
6438
  // HANDLE PARTITION SEQUENCE
@@ -6395,6 +6447,10 @@ window.AORTACServerCell=class AORTACServerCell{
6395
6447
  // HANDLE RECONNECTED CLIENT HELLO SEQUENCE
6396
6448
  this.handleReconnectedClientHelloSequence();
6397
6449
 
6450
+
6451
+ this.modificationRequestHandler.handle();
6452
+ this.viewChangedRequestHandler.handle();
6453
+
6398
6454
  }
6399
6455
 
6400
6456
 
@@ -7082,12 +7138,6 @@ window.AORTACServerCell=class AORTACServerCell{
7082
7138
 
7083
7139
 
7084
7140
 
7085
-
7086
-
7087
-
7088
-
7089
-
7090
-
7091
7141
  /*private*/const ServerCellLobule=class{
7092
7142
 
7093
7143
  constructor(){
@@ -7155,7 +7205,6 @@ window.AORTACServerCell=class AORTACServerCell{
7155
7205
  }
7156
7206
 
7157
7207
 
7158
-
7159
7208
  window.getAORTACServerCell=function(quorumNumber=1, selfOrigin="ws://127.0.0.1:40000", outcomingCellsOrigins=[], model, controller){
7160
7209
  //return new AORTACServerNode("node_"+window.getUUID("short"), selfOrigin, outcomingCellsOrigins, model, controller);
7161
7210
  if(window.aortacCServerCellInstance){
@@ -7167,6 +7216,50 @@ window.getAORTACServerCell=function(quorumNumber=1, selfOrigin="ws://127.0.0.1:4
7167
7216
  }
7168
7217
 
7169
7218
 
7219
+ // ******************************************************************
7220
+
7221
+ window.getCurrentLevelConfigForAORTACServerCell=()=>{
7222
+ const allPrototypesConfig=PROTOTYPES_CONFIG.allPrototypes;
7223
+ const levelConfig=allPrototypesConfig.GameLevel;
7224
+
7225
+ const currentLevelPrototypeName=getCurrentLevelPrototypeNameForAORTACServerCell();
7226
+ if(nothing(currentLevelPrototypeName)){
7227
+ // TRACE
7228
+ lognow("WARN : No currentLevelPrototypeName found. Aborting.");
7229
+ return null;
7230
+ }
7231
+ const referenceCurrentLevelConfig=levelConfig[currentLevelPrototypeName];
7232
+ return referenceCurrentLevelConfig;
7233
+ };
7234
+
7235
+ window.getCurrentLevelPrototypeNameForAORTACServerCell=()=>{
7236
+
7237
+ const aortacConfig=GAME_CONFIG.aortac;
7238
+ if(nothing(aortacConfig)){
7239
+ // TRACE
7240
+ lognow("WARN : No AORTAC config, Aborting..");
7241
+ return null;
7242
+ }
7243
+
7244
+ const allPrototypesConfig=PROTOTYPES_CONFIG.allPrototypes;
7245
+ const levelConfig=allPrototypesConfig.GameLevel;
7246
+
7247
+ let currentLevelPrototypeName=aortacConfig.startingLevelPrototypeName;
7248
+ if(nothing(currentLevelPrototypeName)){
7249
+ currentLevelPrototypeName=getKeyAt(levelConfig,0);
7250
+ // TRACE
7251
+ lognow("WARN : No startingLevelPrototypeName specified in AORTAC config, using first level name as default «"+currentLevelPrototypeName+"».");
7252
+ }
7253
+
7254
+ return currentLevelPrototypeName;
7255
+ };
7256
+
7257
+
7258
+
7259
+
7260
+
7261
+
7262
+
7170
7263
 
7171
7264
 
7172
7265
  // ===============================================================================================================================
@@ -7283,46 +7376,6 @@ window.restoreNonProxiedClass=function(classToProxy){
7283
7376
 
7284
7377
 
7285
7378
 
7286
- // ******************************************************************
7287
-
7288
- window.getCurrentLevelConfigForAORTACServerCell=()=>{
7289
- const allPrototypesConfig=PROTOTYPES_CONFIG.allPrototypes;
7290
- const levelConfig=allPrototypesConfig.GameLevel;
7291
-
7292
- const currentLevelPrototypeName=getCurrentLevelPrototypeNameForAORTACServerCell();
7293
- if(nothing(currentLevelPrototypeName)){
7294
- // TRACE
7295
- lognow("WARN : No currentLevelPrototypeName found. Aborting.");
7296
- return null;
7297
- }
7298
- const referenceCurrentLevelConfig=levelConfig[currentLevelPrototypeName];
7299
- return referenceCurrentLevelConfig;
7300
- };
7301
-
7302
- window.getCurrentLevelPrototypeNameForAORTACServerCell=()=>{
7303
-
7304
- const aortacConfig=GAME_CONFIG.aortac;
7305
- if(nothing(aortacConfig)){
7306
- // TRACE
7307
- lognow("WARN : No AORTAC config, Aborting..");
7308
- return null;
7309
- }
7310
-
7311
- const allPrototypesConfig=PROTOTYPES_CONFIG.allPrototypes;
7312
- const levelConfig=allPrototypesConfig.GameLevel;
7313
-
7314
- let currentLevelPrototypeName=aortacConfig.startingLevelPrototypeName;
7315
- if(nothing(currentLevelPrototypeName)){
7316
- currentLevelPrototypeName=getKeyAt(levelConfig,0);
7317
- // TRACE
7318
- lognow("WARN : No startingLevelPrototypeName specified in AORTAC config, using first level name as default «"+currentLevelPrototypeName+"».");
7319
- }
7320
-
7321
- return currentLevelPrototypeName;
7322
- };
7323
-
7324
-
7325
-
7326
7379
 
7327
7380
 
7328
7381
  //
@@ -7375,6 +7428,56 @@ window.getCurrentLevelPrototypeNameForAORTACServerCell=()=>{
7375
7428
 
7376
7429
 
7377
7430
 
7431
+ /* ## Utility methods in a javascript, for AORTAC subsystem (server)
7432
+ *
7433
+ * This set of methods gathers utility generic-purpose methods usable in any JS project.
7434
+ * Several authors of snippets published freely on the Internet contributed to this library.
7435
+ * Feel free to use/modify-enhance/publish them under the terms of its license.
7436
+ *
7437
+ * # Library name : «aotrautils»
7438
+ * # Library license : HGPL(Help Burma) (see aotra README information for details : https://alqemia.com/aotra.js )
7439
+ * # Author name : Jérémie Ratomposon (massively helped by his native country free education system)
7440
+ * # Author email : info@alqemia.com
7441
+ * # Organization name : Alqemia
7442
+ * # Organization email : admin@alqemia.com
7443
+ * # Organization website : https://alqemia.com
7444
+ *
7445
+ *
7446
+ */
7447
+
7448
+
7449
+
7450
+ // COMPATIBILITY browser javascript / nodejs environment :
7451
+ if(typeof(window)==="undefined") window=global;
7452
+
7453
+
7454
+ // ==================================================================================================================
7455
+
7456
+
7457
+ // AORTAC SERVER CENTRALIZED PROTOCOL
7458
+
7459
+
7460
+ // CURRENT 2
7461
+ window.RelocateObjectHandler=class RelocateObjectHandler{
7462
+ constructor(serverCell){
7463
+ this.serverCell=serverCell;
7464
+ }
7465
+ }
7466
+
7467
+ window.ModificationRequestHandler=class ModificationRequestHandler{
7468
+ constructor(serverCell){
7469
+ this.serverCell=serverCell;
7470
+ this.relocateObjectHandler=new RelocateObjectHandler();
7471
+ }
7472
+ }
7473
+
7474
+ window.ViewChangedRequestHandler=class ViewChangedRequestHandler{
7475
+ constructor(serverCell){
7476
+ this.serverCell=serverCell;
7477
+ }
7478
+ }
7479
+
7480
+
7378
7481
  /* ## Utility methods in a javascript, for internationalzation (i18n) subsystem (server & client)
7379
7482
  *
7380
7483
  * This set of methods gathers utility generic-purpose methods usable in any JS project.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.1995",
3
+ "version": "0.0.1997",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "aotrautils-srv",
9
- "version": "0.0.1995",
9
+ "version": "0.0.1997",
10
10
  "license": "HGPL-1.0",
11
11
  "dependencies": {
12
12
  "atob": "^2.1.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.1995",
3
+ "version": "0.0.1997",
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)",