@itdigitalwing/aladdin-common 1.0.288 → 1.0.290

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.
@@ -4,6 +4,7 @@ export interface UserCreatedEvent {
4
4
  data: {
5
5
  userId: string;
6
6
  user_name?: string;
7
+ full_name?: string;
7
8
  country_code?: number;
8
9
  phone?: number;
9
10
  email?: string;
@@ -30,14 +30,15 @@ function connectToMongoDB() {
30
30
  return null;
31
31
  }
32
32
  try {
33
- // Create and connect the client only if not already connected
34
33
  mongoClient = new MongoClient(MONGO_URI, {
35
- useNewUrlParser: true,
36
- useUnifiedTopology: true,
37
- maxPoolSize: 10, // Limit the connection pool size
34
+ // ✅ removed useNewUrlParser and useUnifiedTopology
35
+ maxPoolSize: 10,
36
+ serverSelectionTimeoutMS: 30000,
37
+ connectTimeoutMS: 10000,
38
+ retryWrites: true, // ✅ add this
38
39
  });
39
40
  yield mongoClient.connect();
40
- console.log("Connected to MongoDB with a single instance");
41
+ console.log("Connected to MongoDB with a single instance");
41
42
  return mongoClient;
42
43
  }
43
44
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itdigitalwing/aladdin-common",
3
- "version": "1.0.288",
3
+ "version": "1.0.290",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [