backend-manager 3.0.20 → 3.0.22
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.0.
|
|
3
|
+
"version": "3.0.22",
|
|
4
4
|
"description": "Quick tools for developing Firebase functions",
|
|
5
5
|
"main": "src/manager/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"moment": "^2.29.4",
|
|
54
54
|
"nanoid": "^3.3.7",
|
|
55
55
|
"node-fetch": "^2.7.0",
|
|
56
|
-
"node-powertools": "^1.1.
|
|
56
|
+
"node-powertools": "^1.1.1",
|
|
57
57
|
"npm-api": "^1.0.1",
|
|
58
58
|
"paypal-server-api": "^1.0.3",
|
|
59
59
|
"pushid": "^1.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"ultimate-jekyll-poster": "^0.0.15",
|
|
66
66
|
"universal-analytics": "^0.5.3",
|
|
67
67
|
"uuid": "^9.0.1",
|
|
68
|
-
"wonderful-fetch": "^1.0.
|
|
68
|
+
"wonderful-fetch": "^1.0.1",
|
|
69
69
|
"wonderful-log": "^1.0.5",
|
|
70
70
|
"yargs": "^17.7.2"
|
|
71
71
|
}
|
package/src/cli/cli.js
CHANGED
|
@@ -374,6 +374,13 @@ Main.prototype.setup = async function () {
|
|
|
374
374
|
// let mine = (self.package.devDependencies[pkg] || '0.0.0').replace('^', '').replace('~', '');
|
|
375
375
|
// return isLocal(mine) || !(semver.gt(latest, mine));
|
|
376
376
|
// }, fix_mocha);
|
|
377
|
+
await self.test(`has "npm start" script`, function () {
|
|
378
|
+
return self.package.scripts.start
|
|
379
|
+
}, fix_startScript);
|
|
380
|
+
|
|
381
|
+
await self.test(`has "npm dist" script`, function () {
|
|
382
|
+
return self.package.scripts.dist
|
|
383
|
+
}, fix_distScript);
|
|
377
384
|
|
|
378
385
|
await self.test('using proper .runtimeconfig', async function () {
|
|
379
386
|
let runtimeconfig = JSON.parse(jetpack.read(`${self.firebaseProjectPath}/functions/.runtimeconfig.json`) || '{}');
|
|
@@ -750,6 +757,30 @@ async function fix_serviceAccount(self) {
|
|
|
750
757
|
// });
|
|
751
758
|
// }
|
|
752
759
|
|
|
760
|
+
function fix_startScript(self) {
|
|
761
|
+
return new Promise(function(resolve, reject) {
|
|
762
|
+
_.set(self.package, 'scripts.start', 'firebase serve');
|
|
763
|
+
jetpack.write(`${self.firebaseProjectPath}/functions/package.json`, JSON.stringify(self.package, null, 2) );
|
|
764
|
+
resolve();
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
function fix_distScript(self) {
|
|
769
|
+
return new Promise(function(resolve, reject) {
|
|
770
|
+
_.set(self.package, 'scripts.dist', 'firebase deploy');
|
|
771
|
+
jetpack.write(`${self.firebaseProjectPath}/functions/package.json`, JSON.stringify(self.package, null, 2) );
|
|
772
|
+
resolve();
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
function fix_setupScript(self) {
|
|
777
|
+
return new Promise(function(resolve, reject) {
|
|
778
|
+
_.set(self.package, 'scripts.setup', 'npx bm setup');
|
|
779
|
+
jetpack.write(`${self.firebaseProjectPath}/functions/package.json`, JSON.stringify(self.package, null, 2) );
|
|
780
|
+
resolve();
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
|
|
753
784
|
function fix_nodeVersion(self) {
|
|
754
785
|
return new Promise(function(resolve, reject) {
|
|
755
786
|
if (false) {
|
|
@@ -33,15 +33,15 @@ module.exports = function (payload, config) {
|
|
|
33
33
|
city: 'Redondo Beach',
|
|
34
34
|
state: 'CA',
|
|
35
35
|
zip: '90278',
|
|
36
|
-
'unsubscribe-link': `https://itwcreativeworks.com/email-preferences
|
|
36
|
+
'unsubscribe-link': `https://itwcreativeworks.com/email-preferences?email=${encodeURIComponent(payload.email)}&asmId=${encodeURIComponent(groupId)}&templateId=${encodeURIComponent(templateId)}&appName=${encodeURIComponent(config.brand.name)}`,
|
|
37
37
|
},
|
|
38
|
-
},
|
|
38
|
+
},
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
from: {
|
|
42
42
|
name: config.brand.name,
|
|
43
43
|
email: config.brand.email,
|
|
44
|
-
},
|
|
44
|
+
},
|
|
45
45
|
reply_to: {
|
|
46
46
|
name: config.brand.name,
|
|
47
47
|
email: config.brand.email,
|
|
@@ -44,7 +44,7 @@ let Module = {
|
|
|
44
44
|
// label: '',
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
assistant.log('Creating campagin with data', assistant.request.data)
|
|
47
|
+
assistant.log('Creating campagin with data', assistant.request.data)
|
|
48
48
|
|
|
49
49
|
if (!user.roles.admin) {
|
|
50
50
|
response.status = 401;
|
|
@@ -102,7 +102,7 @@ let Module = {
|
|
|
102
102
|
})
|
|
103
103
|
.then(async (campaign) => {
|
|
104
104
|
assistant.log('Created campaign', campaign);
|
|
105
|
-
await fetch(`https://email.itwcreativeworks.com/general/mailchimp-blog-syndication
|
|
105
|
+
await fetch(`https://email.itwcreativeworks.com/general/mailchimp-blog-syndication?cb=${Math.random()}`)
|
|
106
106
|
.then(async (fetchResponse) => {
|
|
107
107
|
if (fetchResponse.status >= 200 && fetchResponse.status < 300) {
|
|
108
108
|
let html = await fetchResponse.text();
|