backend-manager 3.2.180 → 4.0.0

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.
package/CHANGELOG.md CHANGED
@@ -15,6 +15,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
15
15
  - `Security` in case of vulnerabilities.
16
16
 
17
17
  ---
18
+ ## [4.0.0] - 2024-05-08
19
+ ### ⚠️ BREAKING
20
+ - Updated `firebase-functions` to `6.0.1` (now need to require `firebase-functions/v1` to use v1 functions or `firebase-functions/v2` to use v2 functions)
21
+
18
22
  ## [3.2.109] - 2024-05-08
19
23
  ### Changed
20
24
  - Replaced all `methods` references with `routes`. This should be changed in your code as well.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "3.2.180",
3
+ "version": "4.0.0",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  "prepare:watch": "nodemon -w ./src -e '*' --exec 'npm run prepare'"
19
19
  },
20
20
  "engines": {
21
- "node": "16"
21
+ "node": "18"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
@@ -42,18 +42,18 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@firebase/rules-unit-testing": "^2.0.7",
45
- "@google-cloud/storage": "^7.12.0",
45
+ "@google-cloud/storage": "^7.13.0",
46
46
  "@octokit/rest": "^19.0.13",
47
47
  "@sendgrid/mail": "^7.7.0",
48
48
  "@sentry/node": "^6.19.7",
49
- "body-parser": "^1.20.2",
49
+ "body-parser": "^1.20.3",
50
50
  "busboy": "^1.6.0",
51
51
  "chalk": "^4.1.2",
52
52
  "cors": "^2.8.5",
53
53
  "dotenv": "^16.4.5",
54
- "express": "^4.19.2",
55
- "firebase-admin": "^12.3.0",
56
- "firebase-functions": "^5.0.1",
54
+ "express": "^4.21.0",
55
+ "firebase-admin": "^12.5.0",
56
+ "firebase-functions": "^6.0.1",
57
57
  "fs-jetpack": "^5.1.0",
58
58
  "glob": "^11.0.0",
59
59
  "hcaptcha": "^0.1.1",
@@ -69,7 +69,7 @@
69
69
  "moment": "^2.30.1",
70
70
  "nanoid": "^3.3.7",
71
71
  "node-fetch": "^2.7.0",
72
- "node-powertools": "^1.5.7",
72
+ "node-powertools": "^1.5.9",
73
73
  "npm-api": "^1.0.1",
74
74
  "paypal-server-api": "^2.0.14",
75
75
  "pushid": "^1.0.0",
@@ -77,7 +77,7 @@ Manager.prototype.init = function (exporter, options) {
77
77
  self.libraries = {
78
78
  // Third-party
79
79
  functions: options.projectType === 'firebase'
80
- ? require('firebase-functions')
80
+ ? require('firebase-functions/v1')
81
81
  : null,
82
82
  admin: require('firebase-admin'),
83
83
  cors: require('cors')({ origin: true }),
@@ -641,8 +641,12 @@ Manager.prototype.install = function (controller, options) {
641
641
  }
642
642
  };
643
643
 
644
- Manager.prototype.require = function (p) {
645
- return require(p);
644
+ // Require
645
+ Manager.prototype.require = function (name) {
646
+ return require(name);
647
+ };
648
+ Manager.require = function (name) {
649
+ return require(name);
646
650
  };
647
651
 
648
652
  Manager.prototype.debug = function () {
@@ -34,7 +34,7 @@ ServerManager.prototype.monitor = function (command, options) {
34
34
  serverProcess.on('exit', (code) => {
35
35
  const string = `(code=${code}, timestamp=${new Date().toISOString()})`;
36
36
  if (code !== 0) {
37
- error(`Server crashed (${string})`);
37
+ error(`Server crashed ${string}`);
38
38
  error(`Restarting in 1 second...`);
39
39
 
40
40
  // Restart the server
@@ -43,7 +43,7 @@ ServerManager.prototype.monitor = function (command, options) {
43
43
  self.monitor();
44
44
  }, 1000);
45
45
  } else {
46
- log(`Server stopped safely (${string})`);
46
+ log(`Server stopped safely ${string}`);
47
47
  }
48
48
  });
49
49
  })