backend-manager 2.3.3 → 2.3.4

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": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -46,7 +46,7 @@
46
46
  "lowdb": "^1.0.0",
47
47
  "mailchimp-api-v3": "^1.15.0",
48
48
  "mocha": "^9.2.2",
49
- "moment": "^2.29.3",
49
+ "moment": "^2.29.4",
50
50
  "node-fetch": "^2.6.7",
51
51
  "node-powertools": "^0.0.14",
52
52
  "npm-api": "^1.0.1",
@@ -58,7 +58,7 @@
58
58
  "ultimate-jekyll-poster": "^0.0.11",
59
59
  "universal-analytics": "^0.5.3",
60
60
  "uuid": "^8.3.2",
61
- "wonderful-fetch": "^0.0.5",
61
+ "wonderful-fetch": "^0.0.11",
62
62
  "yargs": "^17.5.1"
63
63
  },
64
64
  "files": [
@@ -66,4 +66,4 @@
66
66
  "src/",
67
67
  "templates/"
68
68
  ]
69
- }
69
+ }
@@ -42,7 +42,6 @@ Module.prototype.main = function () {
42
42
  // https://firebase.google.com/docs/reference/rest/auth#section-sign-in-with-oauth-credential
43
43
  fetch(`https://identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key=${payload.data.payload.firebaseApiKey}`, {
44
44
  method: 'post',
45
- json: true,
46
45
  body: {
47
46
  postBody: `${prefix}providerId=${provider.name}`,
48
47
  requestUri: 'http://localhost',
@@ -35,8 +35,8 @@ Module.prototype.main = function () {
35
35
  // Create invoice
36
36
  const createdInvoice = await fetch('https://us-central1-itw-creative-works.cloudfunctions.net/wrapper', {
37
37
  method: 'POST',
38
- json: true,
39
- body: JSON.stringify({
38
+ response: 'json',
39
+ body: {
40
40
  authenticationToken: Manager.config.backend_manager.key,
41
41
  method: 'post',
42
42
  service: 'paypal',
@@ -69,7 +69,7 @@ Module.prototype.main = function () {
69
69
  },
70
70
  ],
71
71
  }
72
- }),
72
+ },
73
73
  })
74
74
  .then(response => response)
75
75
  .catch(e => e);
@@ -82,15 +82,15 @@ Module.prototype.main = function () {
82
82
  const createdInvoiceId = _.get(createdInvoice, 'href', '').split('/').pop();
83
83
  const sentInvoice = await fetch('https://us-central1-itw-creative-works.cloudfunctions.net/wrapper', {
84
84
  method: 'POST',
85
- json: true,
86
- body: JSON.stringify({
85
+ response: 'json',
86
+ body: {
87
87
  authenticationToken: Manager.config.backend_manager.key,
88
88
  service: 'paypal',
89
89
  command: `v2/invoicing/invoices/${createdInvoiceId}/send`,
90
90
  method: 'post',
91
91
  body: {
92
92
  }
93
- }),
93
+ },
94
94
  })
95
95
  .then(response => response)
96
96
  .catch(e => e);
@@ -110,8 +110,8 @@ Module.prototype.main = function () {
110
110
  // Send notification
111
111
  const sentNotification = fetch(`https://us-central1-${Manager.project.projectId}.cloudfunctions.net/bm_api`, {
112
112
  method: 'POST',
113
- json: true,
114
- body: JSON.stringify({
113
+ response: 'json',
114
+ body: {
115
115
  authenticationToken: Manager.config.backend_manager.key,
116
116
  command: `admin:send-notification`,
117
117
  payload: {
@@ -121,7 +121,7 @@ Module.prototype.main = function () {
121
121
  click_action: `${Manager.config.brand.url}/blog`,
122
122
  icon: Manager.config.brand.brandmark,
123
123
  }
124
- }),
124
+ },
125
125
  })
126
126
  .then(response => response)
127
127
  .catch(e => e);
@@ -67,7 +67,7 @@ Module.prototype.main = function () {
67
67
  method: 'post',
68
68
  timeout: 30000,
69
69
  tries: 3,
70
- json: true,
70
+ response: 'json',
71
71
  body: {
72
72
  id: app,
73
73
  },