backend-plus 2.0.0-rc.11 → 2.0.0-rc.12

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.
Files changed (2) hide show
  1. package/lib/backend-plus.js +16 -13
  2. package/package.json +4 -4
@@ -98,6 +98,12 @@ class AppBackend{
98
98
  this.appStack=[];
99
99
  /** @type {{message:string; fun:()=>void}[]} */
100
100
  this.shutdownCallbackList=[];
101
+ this.sessionStores={
102
+ file: SessionFileStore,
103
+ memory: memorystore,
104
+ memoryDevel: BindMemoryPerodicallySaved(this),
105
+ "memory-saved": BindMemoryPerodicallySaved(this),
106
+ }
101
107
  if(!this.rootPath){
102
108
  console.log('ATENCIÓN hay que poner be.rootPath antes de llamar a super()');
103
109
  this.rootPath=Path.resolve(__dirname,'..');
@@ -358,6 +364,8 @@ AppBackend.prototype.i18n.messages.es={
358
364
  }
359
365
  };
360
366
 
367
+ function BindMemoryPerodicallySaved(be){
368
+ return (
361
369
  /**
362
370
  * @param {Express.Session} session
363
371
  */
@@ -425,14 +433,7 @@ function MemoryPerodicallySaved(session){
425
433
  }
426
434
  }
427
435
  return MemoryDevelConstructor;
428
- }
429
-
430
- var sessionStores={
431
- file: SessionFileStore,
432
- memory: memorystore,
433
- memoryDevel: MemoryPerodicallySaved,
434
- "memory-saved": MemoryPerodicallySaved,
435
- }
436
+ })}
436
437
 
437
438
  /**
438
439
  * @param {string} text
@@ -508,6 +509,11 @@ AppBackend.prototype.canChangePass = async function canChangePass(reqOrContext,
508
509
  return be.isAdmin(reqOrContext);
509
510
  }
510
511
 
512
+ AppBackend.prototype.shutdownCallbackListAdd = function(messageFun){
513
+ this.shutdownCallbackList.push(messageFun);
514
+ }
515
+
516
+
511
517
  AppBackend.prototype._Browsers = {
512
518
  Edge: {short:'Ed' , minVer:14 , polly:true},
513
519
  Konqueror: {short:'Kq' , minVer:null, polly:true},
@@ -630,9 +636,6 @@ AppBackend.prototype.start = function start(opts){
630
636
  // @ts-ignore : only for testing */
631
637
  this.getMainApp = function getMainApp(){ return mainApp; };
632
638
  }
633
- this.shutdownCallbackListAdd = function(messageFun){
634
- this.shutdownCallbackList.push(messageFun);
635
- }
636
639
  this.shutdownBackend = async function shutdownBackend(){
637
640
  console.log('shooting down:');
638
641
  var waitFor = [
@@ -690,10 +693,10 @@ AppBackend.prototype.start = function start(opts){
690
693
  }
691
694
  var sessionStoreName=be.config.server["session-store"];
692
695
  if(sessionStoreName){
693
- if(config.devel && sessionStores[sessionStoreName+'Devel']){
696
+ if(config.devel && be.sessionStores[sessionStoreName+'Devel']){
694
697
  sessionStoreName+='Devel';
695
698
  }
696
- var storeModule = sessionStores[sessionStoreName];
699
+ var storeModule = be.sessionStores[sessionStoreName];
697
700
  be.config.login.plus.store.module = storeModule;
698
701
  }
699
702
  be.config.install.dump.db.owner=coalesce(be.config.db.owner,be.config.install.dump.db.owner,be.config.db.user);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for the anti Pareto rule",
4
- "version": "2.0.0-rc.11",
4
+ "version": "2.0.0-rc.12",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",
@@ -82,7 +82,7 @@
82
82
  "@types/js-yaml": "^4.0.9",
83
83
  "@types/mocha": "^10.0.6",
84
84
  "@types/multiparty": "~0.0.36",
85
- "@types/node": "^20.12.2",
85
+ "@types/node": "^20.12.5",
86
86
  "@types/nodemailer": "^6.4.14",
87
87
  "@types/numeral": "~2.0.5",
88
88
  "@types/session-file-store": "^1.2.5",
@@ -99,11 +99,11 @@
99
99
  "kill-9": "~0.4.3",
100
100
  "mocha": "^10.4.0",
101
101
  "nyc": "^15.1.0",
102
- "puppeteer": "^22.6.1",
102
+ "puppeteer": "^22.6.3",
103
103
  "sinon": "^17.0.1",
104
104
  "supertest": "^6.3.4",
105
105
  "types.d.ts": "~0.6.21",
106
- "typescript": "^5.4.3",
106
+ "typescript": "^5.4.4",
107
107
  "why-is-node-running": "^2.2.2"
108
108
  },
109
109
  "engines": {