notherbase-fs 4.5.0 → 4.5.2

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/notherbase-fs.js +3 -2
  2. package/package.json +1 -1
package/notherbase-fs.js CHANGED
@@ -21,10 +21,10 @@ class NotherBaseFS {
21
21
  constructor(globals = {}, bases = {}) {
22
22
  this.bases = bases;
23
23
 
24
- this.initServer();
24
+ this.initServer(globals);
25
25
  }
26
26
 
27
- initServer() {
27
+ initServer(globals) {
28
28
  this.app = express();
29
29
  this.server = http.createServer(this.app);
30
30
  this.io = new Server(this.server);
@@ -100,6 +100,7 @@ class NotherBaseFS {
100
100
  this.app.use(async (req, res, next) => {
101
101
  req.Spirit = Spirit;
102
102
  req.SendMail = SendMail;
103
+ req.globals = globals;
103
104
  req.user = req.session?.currentUser ? await req.Spirit.findOne({ service: "user", username: req.session.currentUser }) : null;
104
105
  req.lock = false;
105
106
  // enables sessions only if the protocol is https and we are in production, or if we are in development
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "exports": "./notherbase-fs.js",
6
6
  "scripts": {