backend-manager 3.2.174 → 3.2.175
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-manager",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.175",
|
|
4
4
|
"description": "Quick tools for developing Firebase functions",
|
|
5
5
|
"main": "src/manager/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@firebase/rules-unit-testing": "^2.0.7",
|
|
45
|
-
"@google-cloud/storage": "^7.11.
|
|
45
|
+
"@google-cloud/storage": "^7.11.3",
|
|
46
46
|
"@octokit/rest": "^19.0.13",
|
|
47
47
|
"@sendgrid/mail": "^7.7.0",
|
|
48
48
|
"@sentry/node": "^6.19.7",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"cors": "^2.8.5",
|
|
53
53
|
"dotenv": "^16.4.5",
|
|
54
54
|
"express": "^4.19.2",
|
|
55
|
-
"firebase-admin": "^12.
|
|
55
|
+
"firebase-admin": "^12.2.0",
|
|
56
56
|
"firebase-functions": "^5.0.1",
|
|
57
57
|
"fs-jetpack": "^5.1.0",
|
|
58
|
-
"glob": "^
|
|
58
|
+
"glob": "^11.0.0",
|
|
59
59
|
"hcaptcha": "^0.1.1",
|
|
60
60
|
"inquirer": "^8.2.5",
|
|
61
|
-
"itwcw-package-analytics": "^1.0.
|
|
61
|
+
"itwcw-package-analytics": "^1.0.6",
|
|
62
62
|
"json5": "^2.2.3",
|
|
63
63
|
"jwt-decode": "^3.1.2",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
@@ -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.4.
|
|
72
|
+
"node-powertools": "^1.4.5",
|
|
73
73
|
"npm-api": "^1.0.1",
|
|
74
74
|
"paypal-server-api": "^2.0.14",
|
|
75
75
|
"pushid": "^1.0.0",
|
|
@@ -85,6 +85,6 @@
|
|
|
85
85
|
"yargs": "^17.7.2"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"prepare-package": "^1.1.
|
|
88
|
+
"prepare-package": "^1.1.13"
|
|
89
89
|
}
|
|
90
|
-
}
|
|
90
|
+
}
|
|
@@ -434,8 +434,8 @@ Module.prototype.sendWelcomeEmail = function (user) {
|
|
|
434
434
|
I'm Ian, the founder and CEO of <strong>${Manager.config.brand.name}</strong>, and I'm thrilled to have you with us.
|
|
435
435
|
Your journey begins today, and we are committed to supporting you every step of the way.
|
|
436
436
|
<br><br>
|
|
437
|
+
We are dedicated to ensuring your experience is exceptional.
|
|
437
438
|
Feel free to reply directly to this email with any questions you may have.
|
|
438
|
-
Our team and I are dedicated to ensuring your experience is exceptional.
|
|
439
439
|
<br><br>
|
|
440
440
|
Thank you for choosing <strong>${Manager.config.brand.name}</strong>. Here's to new beginnings!
|
|
441
441
|
`
|
|
@@ -88,10 +88,10 @@ function Analytics(Manager, options) {
|
|
|
88
88
|
: 'None',
|
|
89
89
|
},
|
|
90
90
|
country: {
|
|
91
|
-
value: self.request.country
|
|
91
|
+
value: self.request.country,
|
|
92
92
|
},
|
|
93
93
|
city: {
|
|
94
|
-
value: self.request.city
|
|
94
|
+
value: self.request.city,
|
|
95
95
|
},
|
|
96
96
|
gender: {
|
|
97
97
|
value: authUser?.personal?.gender
|
|
@@ -228,7 +228,7 @@ Analytics.prototype.event = function (payload) {
|
|
|
228
228
|
payload = payload || {};
|
|
229
229
|
|
|
230
230
|
// Fix event name
|
|
231
|
-
payload.name =
|
|
231
|
+
payload.name = `${payload.name}`
|
|
232
232
|
// Replace anything not a letter, number, or underscore with an underscore
|
|
233
233
|
.replace(/[^a-zA-Z0-9_]/g, '_')
|
|
234
234
|
// Remove leading and trailing underscores
|
|
@@ -4,6 +4,8 @@ const powertools = require('node-powertools');
|
|
|
4
4
|
const _ = require('lodash');
|
|
5
5
|
const JSON5 = require('json5');
|
|
6
6
|
|
|
7
|
+
// Constants
|
|
8
|
+
const DEFAULT_MODEL = 'gpt-4o';
|
|
7
9
|
const TOKEN_COST_TABLE = {
|
|
8
10
|
// May 13th, 2024
|
|
9
11
|
'gpt-4o': {
|
|
@@ -142,7 +144,7 @@ OpenAI.prototype.request = function (options) {
|
|
|
142
144
|
return new Promise(async function(resolve, reject) {
|
|
143
145
|
options = _.merge({}, options);
|
|
144
146
|
|
|
145
|
-
options.model = typeof options.model === 'undefined' ?
|
|
147
|
+
options.model = typeof options.model === 'undefined' ? DEFAULT_MODEL : options.model;
|
|
146
148
|
options.timeout = typeof options.timeout === 'undefined' ? 120000 : options.timeout;
|
|
147
149
|
options.moderate = typeof options.moderate === 'undefined' ? true : options.moderate;
|
|
148
150
|
options.log = typeof options.log === 'undefined' ? false : options.log;
|