backend-manager 3.0.29 → 3.0.30
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 +1 -1
- package/src/manager/functions/core/actions/api/admin/backup.js +11 -11
- package/src/manager/functions/core/actions/api/admin/create-post.js +2 -2
- package/src/manager/functions/core/actions/api/admin/database-write.js +1 -1
- package/src/manager/functions/core/actions/api/admin/firestore-query.js +2 -2
- package/src/manager/functions/core/actions/api/admin/firestore-read.js +2 -2
- package/src/manager/functions/core/actions/api/admin/firestore-write.js +1 -1
- package/src/manager/functions/core/actions/api/admin/payment-processor.js +2 -2
- package/src/manager/functions/core/actions/api/admin/send-notification.js +4 -4
- package/src/manager/functions/core/actions/api/admin/sync-users.js +4 -4
- package/src/manager/functions/core/actions/api/firebase/get-providers.js +2 -2
- package/src/manager/functions/core/actions/api/general/generate-uuid.js +1 -1
- package/src/manager/functions/core/actions/api/general/send-email.js +3 -3
- package/src/manager/functions/core/actions/api/special/setup-electron-manager-client.js +1 -1
- package/src/manager/functions/core/actions/api/user/get-active-sessions.js +1 -1
- package/src/manager/functions/core/actions/api/user/get-subscription-info.js +2 -2
- package/src/manager/functions/core/actions/api/user/oauth2/discord.js +1 -1
- package/src/manager/functions/core/actions/api/user/oauth2.js +13 -13
- package/src/manager/functions/core/actions/api/user/regenerate-api-keys.js +1 -1
- package/src/manager/functions/core/actions/api/user/sign-out-all-sessions.js +9 -9
- package/src/manager/functions/core/actions/api/user/sign-up.js +4 -4
- package/src/manager/functions/core/actions/api/user/submit-feedback.js +3 -3
- package/src/manager/functions/core/actions/api/user/validate-settings.js +3 -3
- package/src/manager/functions/core/actions/api.js +6 -6
- package/src/manager/functions/core/actions/create-post-handler.js +2 -2
- package/src/manager/functions/core/actions/generate-uuid.js +2 -2
- package/src/manager/functions/core/actions/old/api-2.js +6 -6
- package/src/manager/functions/core/actions/sign-up-handler.js +3 -3
- package/src/manager/functions/core/admin/create-post.js +3 -3
- package/src/manager/functions/core/admin/firestore-write.js +2 -2
- package/src/manager/functions/core/admin/get-stats.js +9 -9
- package/src/manager/functions/core/admin/query.js +5 -5
- package/src/manager/functions/core/admin/send-notification.js +5 -5
- package/src/manager/functions/core/cron/daily.js +3 -3
- package/src/manager/functions/core/events/auth/before-signin.js +2 -2
- package/src/manager/functions/core/events/auth/on-create.js +4 -4
- package/src/manager/functions/core/events/auth/on-delete.js +3 -3
- package/src/manager/functions/core/events/firestore/on-subscription.js +8 -8
- package/src/manager/helpers/assistant.js +1 -2
- package/src/manager/index.js +22 -22
package/src/manager/index.js
CHANGED
|
@@ -123,16 +123,16 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
123
123
|
if (semverUsing !== semverRequired) {
|
|
124
124
|
const msg = `Node.js version mismatch: using ${semverUsing} but asked for ${semverRequired}`;
|
|
125
125
|
if (options.checkNodeVersion) {
|
|
126
|
-
self.assistant.error(new Error(msg)
|
|
126
|
+
self.assistant.error(new Error(msg));
|
|
127
127
|
return process.exit(1);
|
|
128
128
|
} else {
|
|
129
|
-
self.assistant.log(msg
|
|
129
|
+
self.assistant.log(msg);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
if (options.log) {
|
|
135
|
-
// self.assistant.log('process.env', process.env
|
|
135
|
+
// self.assistant.log('process.env', process.env)
|
|
136
136
|
self.assistant.log('Resolved serviceAccountPath', self.project.serviceAccountPath);
|
|
137
137
|
self.assistant.log('Resolved backendManagerConfigPath', self.project.backendManagerConfigPath);
|
|
138
138
|
}
|
|
@@ -153,7 +153,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
153
153
|
release: sentryRelease,
|
|
154
154
|
beforeSend(event, hint) {
|
|
155
155
|
if (self.assistant.meta.environment === 'development' && !self.options.reportErrorsInDev) {
|
|
156
|
-
self.assistant.error(new Error('[Sentry] Skipping Sentry because we\'re in development'), hint
|
|
156
|
+
self.assistant.error(new Error('[Sentry] Skipping Sentry because we\'re in development'), hint)
|
|
157
157
|
return null;
|
|
158
158
|
}
|
|
159
159
|
event.tags = event.tags || {};
|
|
@@ -183,12 +183,12 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
183
183
|
// const loadedProjectId = get(self.libraries.initializedAdmin, 'options_.credential.projectId', null);
|
|
184
184
|
const loadedProjectId = serviceAccount.project_id;
|
|
185
185
|
if (!loadedProjectId || !loadedProjectId.includes(appId)) {
|
|
186
|
-
self.assistant.error(`Loaded app may have wrong service account: ${loadedProjectId} =/= ${appId}
|
|
186
|
+
self.assistant.error(`Loaded app may have wrong service account: ${loadedProjectId} =/= ${appId}`);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
} catch (e) {
|
|
191
|
-
self.assistant.error('Failed to call .initializeApp()', e
|
|
191
|
+
self.assistant.error('Failed to call .initializeApp()', e);
|
|
192
192
|
}
|
|
193
193
|
// admin.firestore().settings({/* your settings... */ timestampsInSnapshots: true})
|
|
194
194
|
}
|
|
@@ -214,7 +214,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
214
214
|
return self._preProcess(Module)
|
|
215
215
|
.then(r => Module.main())
|
|
216
216
|
.catch(e => {
|
|
217
|
-
self.assistant.error(e
|
|
217
|
+
self.assistant.error(e);
|
|
218
218
|
return res.status(500).send(e.message);
|
|
219
219
|
});
|
|
220
220
|
});
|
|
@@ -230,7 +230,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
230
230
|
return self._preProcess(Module)
|
|
231
231
|
.then(r => Module.main())
|
|
232
232
|
.catch(e => {
|
|
233
|
-
self.assistant.error(e
|
|
233
|
+
self.assistant.error(e);
|
|
234
234
|
return res.status(500).send(e.message);
|
|
235
235
|
});
|
|
236
236
|
});
|
|
@@ -245,7 +245,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
245
245
|
return self._preProcess(Module)
|
|
246
246
|
.then(r => Module.main())
|
|
247
247
|
.catch(e => {
|
|
248
|
-
self.assistant.error(e
|
|
248
|
+
self.assistant.error(e);
|
|
249
249
|
return res.status(500).send(e.message);
|
|
250
250
|
});
|
|
251
251
|
});
|
|
@@ -260,7 +260,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
260
260
|
return self._preProcess(Module)
|
|
261
261
|
.then(r => Module.main())
|
|
262
262
|
.catch(e => {
|
|
263
|
-
self.assistant.error(e
|
|
263
|
+
self.assistant.error(e);
|
|
264
264
|
return res.status(500).send(e.message);
|
|
265
265
|
});
|
|
266
266
|
});
|
|
@@ -275,7 +275,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
275
275
|
return self._preProcess(Module)
|
|
276
276
|
.then(r => Module.main())
|
|
277
277
|
.catch(e => {
|
|
278
|
-
self.assistant.error(e
|
|
278
|
+
self.assistant.error(e);
|
|
279
279
|
return res.status(500).send(e.message);
|
|
280
280
|
});
|
|
281
281
|
});
|
|
@@ -290,7 +290,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
290
290
|
return self._preProcess(Module)
|
|
291
291
|
.then(r => Module.main())
|
|
292
292
|
.catch(e => {
|
|
293
|
-
self.assistant.error(e
|
|
293
|
+
self.assistant.error(e);
|
|
294
294
|
return res.status(500).send(e.message);
|
|
295
295
|
});
|
|
296
296
|
});
|
|
@@ -305,7 +305,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
305
305
|
return self._preProcess(Module)
|
|
306
306
|
.then(r => Module.main())
|
|
307
307
|
.catch(e => {
|
|
308
|
-
self.assistant.error(e
|
|
308
|
+
self.assistant.error(e);
|
|
309
309
|
return res.status(500).send(e.message);
|
|
310
310
|
});
|
|
311
311
|
});
|
|
@@ -320,7 +320,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
320
320
|
return self._preProcess(Module)
|
|
321
321
|
.then(r => Module.main())
|
|
322
322
|
.catch(e => {
|
|
323
|
-
self.assistant.error(e
|
|
323
|
+
self.assistant.error(e);
|
|
324
324
|
return res.status(500).send(e.message);
|
|
325
325
|
});
|
|
326
326
|
});
|
|
@@ -336,7 +336,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
336
336
|
return self._preProcess(Module)
|
|
337
337
|
.then(r => Module.main())
|
|
338
338
|
.catch(e => {
|
|
339
|
-
self.assistant.error(e
|
|
339
|
+
self.assistant.error(e);
|
|
340
340
|
return res.status(500).send(e.message);
|
|
341
341
|
});
|
|
342
342
|
});
|
|
@@ -351,7 +351,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
351
351
|
return self._preProcess(Module)
|
|
352
352
|
.then(r => Module.main())
|
|
353
353
|
.catch(e => {
|
|
354
|
-
self.assistant.error(e
|
|
354
|
+
self.assistant.error(e);
|
|
355
355
|
return res.status(500).send(e.message);
|
|
356
356
|
});
|
|
357
357
|
});
|
|
@@ -366,7 +366,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
366
366
|
return self._preProcess(Module)
|
|
367
367
|
.then(r => Module.main())
|
|
368
368
|
.catch(e => {
|
|
369
|
-
self.assistant.error(e
|
|
369
|
+
self.assistant.error(e);
|
|
370
370
|
return res.status(500).send(e.message);
|
|
371
371
|
});
|
|
372
372
|
});
|
|
@@ -429,7 +429,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
429
429
|
try {
|
|
430
430
|
require('dotenv').config();
|
|
431
431
|
} catch (e) {
|
|
432
|
-
self.assistant.error(new Error('Failed to set up environment variables from .env file')
|
|
432
|
+
self.assistant.error(new Error('Failed to set up environment variables from .env file'));
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
// Setup LocalDatabase
|
|
@@ -465,7 +465,7 @@ Manager.prototype._process = function (mod) {
|
|
|
465
465
|
|
|
466
466
|
function _reject(e, log) {
|
|
467
467
|
if (log) {
|
|
468
|
-
// self.assistant.error(e
|
|
468
|
+
// self.assistant.error(e);
|
|
469
469
|
mod.assistant.errorManager(e, {code: 500, sentry: true, send: false, log: true});
|
|
470
470
|
}
|
|
471
471
|
// res.status(500).send(e.message);
|
|
@@ -690,16 +690,16 @@ Manager.prototype.storage = function (options) {
|
|
|
690
690
|
try {
|
|
691
691
|
_setup()
|
|
692
692
|
} catch (e) {
|
|
693
|
-
self.assistant.error(`Could not setup storage: ${dbPath}`, e
|
|
693
|
+
self.assistant.error(`Could not setup storage: ${dbPath}`, e);
|
|
694
694
|
|
|
695
695
|
try {
|
|
696
696
|
if (options.clearInvalid) {
|
|
697
|
-
self.assistant.log(`Clearing invalid storage: ${dbPath}
|
|
697
|
+
self.assistant.log(`Clearing invalid storage: ${dbPath}`);
|
|
698
698
|
jetpack.write(dbPath, {});
|
|
699
699
|
}
|
|
700
700
|
_setup()
|
|
701
701
|
} catch (e) {
|
|
702
|
-
self.assistant.error(`Failed to clear invalid storage: ${dbPath}`, e
|
|
702
|
+
self.assistant.error(`Failed to clear invalid storage: ${dbPath}`, e);
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
}
|