@ccci/micro-server 1.0.127 → 1.0.128
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/dist/index.js +7 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -245371,14 +245371,14 @@ class DatabaseConnector {
|
|
|
245371
245371
|
for (let i = 0;i < files.length; i++) {
|
|
245372
245372
|
let file = files[i];
|
|
245373
245373
|
await import(`${DatabaseConnector.rootDir}/models/${file}`).then((model) => {
|
|
245374
|
-
|
|
245374
|
+
Logger.info("Initializing Model :>> ", model.default);
|
|
245375
245375
|
if (model && model.default && model.default.associate) {
|
|
245376
245376
|
model.default.associate();
|
|
245377
245377
|
}
|
|
245378
245378
|
});
|
|
245379
245379
|
}
|
|
245380
245380
|
} catch (error) {
|
|
245381
|
-
|
|
245381
|
+
Logger.error(error);
|
|
245382
245382
|
}
|
|
245383
245383
|
}
|
|
245384
245384
|
getConnections() {
|
|
@@ -245400,19 +245400,18 @@ class DatabaseConnector {
|
|
|
245400
245400
|
return DatabaseConnector.connection.models[modelName];
|
|
245401
245401
|
}
|
|
245402
245402
|
static async sync(modelName, force = false) {
|
|
245403
|
-
console.log("syncing model :>> ", modelName);
|
|
245404
245403
|
try {
|
|
245405
245404
|
await DatabaseConnector.connection.models[modelName].sync({ force });
|
|
245405
|
+
Logger.info("Syncing Database table: ", modelName);
|
|
245406
245406
|
} catch (error) {
|
|
245407
|
-
|
|
245407
|
+
Logger.error(error);
|
|
245408
245408
|
}
|
|
245409
245409
|
}
|
|
245410
245410
|
static async syncAll(force = false) {
|
|
245411
|
-
console.log("syncing ALL models :>> ");
|
|
245412
245411
|
try {
|
|
245413
245412
|
await DatabaseConnector.connection.sync({ force });
|
|
245414
245413
|
} catch (error) {
|
|
245415
|
-
|
|
245414
|
+
Logger.error(error);
|
|
245416
245415
|
}
|
|
245417
245416
|
}
|
|
245418
245417
|
static disconnect() {
|
|
@@ -250758,11 +250757,9 @@ class Uploader {
|
|
|
250758
250757
|
objectName: filename,
|
|
250759
250758
|
mimeType: file.mimetype
|
|
250760
250759
|
});
|
|
250761
|
-
console.log("response :>> ", response4);
|
|
250762
250760
|
}
|
|
250763
250761
|
return response4;
|
|
250764
250762
|
} catch (error) {
|
|
250765
|
-
console.log("UPLOAD error :>> ", error);
|
|
250766
250763
|
throw error;
|
|
250767
250764
|
}
|
|
250768
250765
|
}
|
|
@@ -250871,7 +250868,6 @@ class Mailer {
|
|
|
250871
250868
|
|
|
250872
250869
|
// src/utils/PushNotifier.ts
|
|
250873
250870
|
var import_firebase_admin = __toESM(require_lib18(), 1);
|
|
250874
|
-
|
|
250875
250871
|
class PushNotifier {
|
|
250876
250872
|
static FirebaseAdmin = import_firebase_admin.default;
|
|
250877
250873
|
static instance = 0;
|
|
@@ -250901,7 +250897,7 @@ class PushNotifier {
|
|
|
250901
250897
|
let result = await PushNotifier.FirebaseAdmin.messaging().sendEach(params);
|
|
250902
250898
|
return result;
|
|
250903
250899
|
} catch (error) {
|
|
250904
|
-
|
|
250900
|
+
Logger.error(error);
|
|
250905
250901
|
}
|
|
250906
250902
|
}
|
|
250907
250903
|
static async sendNotification(token, message, metadata = {}, options) {
|
|
@@ -250914,7 +250910,7 @@ class PushNotifier {
|
|
|
250914
250910
|
let result = await PushNotifier.FirebaseAdmin.messaging().send(params);
|
|
250915
250911
|
return result;
|
|
250916
250912
|
} catch (error) {
|
|
250917
|
-
|
|
250913
|
+
Logger.error(error);
|
|
250918
250914
|
}
|
|
250919
250915
|
}
|
|
250920
250916
|
}
|