@ccci/micro-server 1.0.161 → 1.0.162
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 +8 -8
- package/package.json +1 -1
- package/dist/utils/KafkaServer.d.ts +0 -34
package/dist/index.js
CHANGED
|
@@ -298242,9 +298242,9 @@ class DatabaseConnector {
|
|
|
298242
298242
|
static async checkConnection(connection) {
|
|
298243
298243
|
try {
|
|
298244
298244
|
await connection.authenticate();
|
|
298245
|
-
|
|
298245
|
+
Logger.info(`Connection has been established successfully: ${connection.config.database}`);
|
|
298246
298246
|
} catch (error) {
|
|
298247
|
-
|
|
298247
|
+
Logger.error(error);
|
|
298248
298248
|
}
|
|
298249
298249
|
}
|
|
298250
298250
|
async initializeModels() {
|
|
@@ -303688,14 +303688,14 @@ class Mailer {
|
|
|
303688
303688
|
try {
|
|
303689
303689
|
if (this.hasValidConfig(options)) {
|
|
303690
303690
|
Logger.info("Connecting to SMTP Server...");
|
|
303691
|
-
let account = await import_nodemailer.default.createTestAccount();
|
|
303692
303691
|
this.transporter = import_nodemailer.default.createTransport({
|
|
303693
|
-
|
|
303694
|
-
|
|
303695
|
-
|
|
303692
|
+
service: "Gmail",
|
|
303693
|
+
host: options.smtpHost,
|
|
303694
|
+
port: 465,
|
|
303695
|
+
secure: true,
|
|
303696
303696
|
auth: {
|
|
303697
|
-
user:
|
|
303698
|
-
pass:
|
|
303697
|
+
user: options.smtpUser,
|
|
303698
|
+
pass: options.smtpPassword
|
|
303699
303699
|
}
|
|
303700
303700
|
});
|
|
303701
303701
|
this.sender = import_nodemailer.default.createTransport({
|
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ApplicationOptionType } from '@/types/ApplicationOptionType';
|
|
2
|
-
/**
|
|
3
|
-
* KafkaServer class to manage Kafka consumers and producers.
|
|
4
|
-
* It automatically loads and starts consumers and producers from specified directories.
|
|
5
|
-
*/
|
|
6
|
-
export declare class KafkaServer {
|
|
7
|
-
private consumersPath;
|
|
8
|
-
private producersPath;
|
|
9
|
-
private consumers;
|
|
10
|
-
private producers;
|
|
11
|
-
private kafkaBroker;
|
|
12
|
-
/**
|
|
13
|
-
* @param config - Configuration for Kafka.
|
|
14
|
-
*/
|
|
15
|
-
constructor(config: ApplicationOptionType);
|
|
16
|
-
/**
|
|
17
|
-
* Starts all consumers automatically by dynamically importing and instantiating consumer classes
|
|
18
|
-
* from the specified consumers directory.
|
|
19
|
-
* Each consumer is connected with a clientId and groupId generated from the file name.
|
|
20
|
-
*/
|
|
21
|
-
startConsumers(): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Starts all producers automatically by dynamically importing and instantiating producer classes
|
|
24
|
-
* from the specified producers directory.
|
|
25
|
-
* Each producer is connected with a clientId generated from the file name.
|
|
26
|
-
*/
|
|
27
|
-
startProducers(): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Disconnects all consumers and producers.
|
|
30
|
-
* This method ensures that all active consumers and producers are disconnected.
|
|
31
|
-
*/
|
|
32
|
-
disconnectAll(): Promise<void>;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=KafkaServer.d.ts.map
|