@optimiser/common 1.0.361 → 1.0.362

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.
Files changed (2) hide show
  1. package/dist/lib/event.js +13 -8
  2. package/package.json +1 -1
package/dist/lib/event.js CHANGED
@@ -129,7 +129,7 @@ var Event = /** @class */ (function () {
129
129
  return [3 /*break*/, 6];
130
130
  case 6: return [3 /*break*/, 8];
131
131
  case 7:
132
- console.log('Not able to INITIALISE THE FIREBASE ADMIN APP--');
132
+ console.log('Attention!!-- We are not sending mobile notifications due to lack of FIREBASE ADMIN APP configurations.\n Please provide firebaseSet-up.JSON file.');
133
133
  _a.label = 8;
134
134
  case 8:
135
135
  // if (userId && data.SocketObj && !data.SocketObj.userId) {
@@ -228,14 +228,19 @@ var Event = /** @class */ (function () {
228
228
  accessKeyId: eventConfig.SQS_ACCESSKEY_ID,
229
229
  secretAccessKey: eventConfig.SQS_SECRET_KEY
230
230
  });
231
- this.FCMMobileServiceAccountKey = eventConfig.FCM_NOTIFICATION_SERVICE_ACCOUNT_KEY;
232
- try {
233
- admin.initializeApp({
234
- credential: admin.credential.cert(this.FCMMobileServiceAccountKey)
235
- });
231
+ this.FCMMobileServiceAccountKey = eventConfig === null || eventConfig === void 0 ? void 0 : eventConfig.FCM_NOTIFICATION_SERVICE_ACCOUNT_KEY;
232
+ if (eventConfig === null || eventConfig === void 0 ? void 0 : eventConfig.FCM_NOTIFICATION_SERVICE_ACCOUNT_KEY) { // scope added by komal, to handle the firebase warning,
233
+ try {
234
+ admin.initializeApp({
235
+ credential: admin.credential.cert(this.FCMMobileServiceAccountKey)
236
+ });
237
+ }
238
+ catch (error) {
239
+ console.log('Error while INITIALIZING FIREBASE ADMIN APP\n Please check firebaseSet-up.JSON file.\n This will impact mobile app notifications -----', error);
240
+ }
236
241
  }
237
- catch (error) {
238
- console.log('Error while INITIALIZING FIREBASE ADMIN APP\n Please check service-accountKey.JSON file.\n This will impact mobile app notifications -----', error);
242
+ else {
243
+ console.log('We are not INITIALIZING mobile notifications due to lack of FIREBASE ADMIN APP configurations.\n Please provide firebaseSet-up.JSON file.');
239
244
  }
240
245
  }
241
246
  return Event;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.361",
3
+ "version": "1.0.362",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {