connectfy-shared 0.0.95 → 0.0.97

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.cjs CHANGED
@@ -10161,21 +10161,36 @@ var signupVerifyMessage = (firstName, lastName, verifyCode, lang = "en" /* EN */
10161
10161
  });
10162
10162
  return `
10163
10163
  <html>
10164
- <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; background-color: #f9f9f9; padding: 20px;">
10165
- <div style="max-width: 600px; margin: 0 auto; background: #ffffff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);">
10166
- <h2 style="text-align: center; color: #2ecc71;">${subject}</h2>
10167
- <p>${greeting} <strong>${firstName} ${lastName}</strong>,</p>
10168
- <p>${thankYou}</p>
10169
- <div style="text-align: center; font-size: 24px; font-weight: bold; color: #2ecc71; background: #f1f8ff; padding: 10px; border-radius: 5px; margin: 20px 0;">
10170
- ${verifyCode}
10164
+ <body style="font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6; color: #334155; background-color: #f8fafc; padding: 20px;">
10165
+ <div style="max-width: 500px; margin: 0 auto; background: #ffffff; padding: 32px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
10166
+
10167
+ <div style="text-align: center; margin-bottom: 24px;">
10168
+ <h2 style="color: #1e293b; margin: 0; font-size: 24px;">${subject}</h2>
10171
10169
  </div>
10172
- <p>${instruction}</p>
10173
- <p>${ignore}</p>
10174
- <p>${support}
10175
- <a href="${supportMailLink}" style="color: #2ecc71; text-decoration: none;">${supportMail}</a>.
10170
+
10171
+ <p style="font-size: 16px; margin-bottom: 8px;">${greeting} <strong>${firstName} ${lastName}</strong>,</p>
10172
+ <p style="font-size: 15px; color: #64748b; margin-top: 0;">${thankYou}</p>
10173
+
10174
+ <p style="font-size: 15px; color: #334155;">${instruction}</p>
10175
+
10176
+ <div style="text-align: center; margin: 32px 0;">
10177
+ <div style="display: inline-block; letter-spacing: 8px; font-size: 36px; font-weight: 800; color: #16a34a; background: #f0fdf4; padding: 16px 32px; border-radius: 12px; border: 2px dashed #bbf7d0;">
10178
+ ${verifyCode}
10179
+ </div>
10180
+ </div>
10181
+
10182
+ <div style="background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px; margin-bottom: 24px;">
10183
+ <p style="font-size: 13px; color: #92400e; margin: 0;">${ignore}</p>
10184
+ </div>
10185
+
10186
+ <p style="font-size: 14px; color: #64748b;">${support}
10187
+ <a href="mailto:${supportMail}" style="color: #2ecc71; text-decoration: none; font-weight: 500;">${supportMail}</a>.
10176
10188
  </p>
10177
- <p>${signature}</p>
10178
- <p style="text-align: center; font-weight: bold; color: #2ecc71;">${team}</p>
10189
+
10190
+ <hr style="border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0;" />
10191
+
10192
+ <p style="font-size: 13px; color: #94a3b8; margin: 0;">${signature}</p>
10193
+ <p style="font-size: 14px; font-weight: bold; color: #1e293b; margin: 4px 0 0 0;">${team}</p>
10179
10194
  </div>
10180
10195
  </body>
10181
10196
  </html>
@@ -11510,17 +11525,26 @@ var BaseRepository = class {
11510
11525
  populate = []
11511
11526
  } = params;
11512
11527
  const virtuals = opts?.lean ?? true;
11513
- return await this.model.findOne(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11528
+ if (virtuals) {
11529
+ return await this.model.findOne(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11530
+ }
11531
+ return await this.model.findOne(query).select(fields).sort(sort).populate(populate).exec();
11514
11532
  }
11515
11533
  async findOneById(_id, params = {}, opts) {
11516
11534
  const { fields = "", sort = { createdAt: -1 }, populate = [] } = params;
11517
11535
  const virtuals = opts?.lean ?? true;
11518
- return await this.model.findOne({ _id }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11536
+ if (virtuals) {
11537
+ return await this.model.findOne({ _id }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11538
+ }
11539
+ return await this.model.findOne({ _id }).select(fields).sort(sort).populate(populate).exec();
11519
11540
  }
11520
11541
  async findOneByUserId(userId, params = {}, opts) {
11521
11542
  const { fields = "", sort = { createdAt: -1 }, populate = [] } = params;
11522
11543
  const virtuals = opts?.lean ?? true;
11523
- return await this.model.findOne({ userId }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11544
+ if (virtuals) {
11545
+ return await this.model.findOne({ userId }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11546
+ }
11547
+ return await this.model.findOne({ userId }).select(fields).sort(sort).populate(populate).exec();
11524
11548
  }
11525
11549
  async findMany(params = {}, opts) {
11526
11550
  const {
@@ -11532,7 +11556,10 @@ var BaseRepository = class {
11532
11556
  limit = 10
11533
11557
  } = params;
11534
11558
  const virtuals = opts?.lean ?? true;
11535
- return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11559
+ if (virtuals) {
11560
+ return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11561
+ }
11562
+ return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).exec();
11536
11563
  }
11537
11564
  async findAll(params = {}, opts) {
11538
11565
  const {
@@ -11542,7 +11569,10 @@ var BaseRepository = class {
11542
11569
  populate = []
11543
11570
  } = params;
11544
11571
  const virtuals = opts?.lean ?? true;
11545
- return await this.model.find(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11572
+ if (virtuals) {
11573
+ return await this.model.find(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11574
+ }
11575
+ return await this.model.find(query).select(fields).sort(sort).populate(populate).exec();
11546
11576
  }
11547
11577
  // ================================================
11548
11578
  // EXIST AND COUNT FUNCTIONS
package/dist/index.mjs CHANGED
@@ -10074,21 +10074,36 @@ var signupVerifyMessage = (firstName, lastName, verifyCode, lang = "en" /* EN */
10074
10074
  });
10075
10075
  return `
10076
10076
  <html>
10077
- <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; background-color: #f9f9f9; padding: 20px;">
10078
- <div style="max-width: 600px; margin: 0 auto; background: #ffffff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);">
10079
- <h2 style="text-align: center; color: #2ecc71;">${subject}</h2>
10080
- <p>${greeting} <strong>${firstName} ${lastName}</strong>,</p>
10081
- <p>${thankYou}</p>
10082
- <div style="text-align: center; font-size: 24px; font-weight: bold; color: #2ecc71; background: #f1f8ff; padding: 10px; border-radius: 5px; margin: 20px 0;">
10083
- ${verifyCode}
10077
+ <body style="font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6; color: #334155; background-color: #f8fafc; padding: 20px;">
10078
+ <div style="max-width: 500px; margin: 0 auto; background: #ffffff; padding: 32px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
10079
+
10080
+ <div style="text-align: center; margin-bottom: 24px;">
10081
+ <h2 style="color: #1e293b; margin: 0; font-size: 24px;">${subject}</h2>
10084
10082
  </div>
10085
- <p>${instruction}</p>
10086
- <p>${ignore}</p>
10087
- <p>${support}
10088
- <a href="${supportMailLink}" style="color: #2ecc71; text-decoration: none;">${supportMail}</a>.
10083
+
10084
+ <p style="font-size: 16px; margin-bottom: 8px;">${greeting} <strong>${firstName} ${lastName}</strong>,</p>
10085
+ <p style="font-size: 15px; color: #64748b; margin-top: 0;">${thankYou}</p>
10086
+
10087
+ <p style="font-size: 15px; color: #334155;">${instruction}</p>
10088
+
10089
+ <div style="text-align: center; margin: 32px 0;">
10090
+ <div style="display: inline-block; letter-spacing: 8px; font-size: 36px; font-weight: 800; color: #16a34a; background: #f0fdf4; padding: 16px 32px; border-radius: 12px; border: 2px dashed #bbf7d0;">
10091
+ ${verifyCode}
10092
+ </div>
10093
+ </div>
10094
+
10095
+ <div style="background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px; margin-bottom: 24px;">
10096
+ <p style="font-size: 13px; color: #92400e; margin: 0;">${ignore}</p>
10097
+ </div>
10098
+
10099
+ <p style="font-size: 14px; color: #64748b;">${support}
10100
+ <a href="mailto:${supportMail}" style="color: #2ecc71; text-decoration: none; font-weight: 500;">${supportMail}</a>.
10089
10101
  </p>
10090
- <p>${signature}</p>
10091
- <p style="text-align: center; font-weight: bold; color: #2ecc71;">${team}</p>
10102
+
10103
+ <hr style="border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0;" />
10104
+
10105
+ <p style="font-size: 13px; color: #94a3b8; margin: 0;">${signature}</p>
10106
+ <p style="font-size: 14px; font-weight: bold; color: #1e293b; margin: 4px 0 0 0;">${team}</p>
10092
10107
  </div>
10093
10108
  </body>
10094
10109
  </html>
@@ -11465,17 +11480,26 @@ var BaseRepository = class {
11465
11480
  populate = []
11466
11481
  } = params;
11467
11482
  const virtuals = opts?.lean ?? true;
11468
- return await this.model.findOne(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11483
+ if (virtuals) {
11484
+ return await this.model.findOne(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11485
+ }
11486
+ return await this.model.findOne(query).select(fields).sort(sort).populate(populate).exec();
11469
11487
  }
11470
11488
  async findOneById(_id, params = {}, opts) {
11471
11489
  const { fields = "", sort = { createdAt: -1 }, populate = [] } = params;
11472
11490
  const virtuals = opts?.lean ?? true;
11473
- return await this.model.findOne({ _id }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11491
+ if (virtuals) {
11492
+ return await this.model.findOne({ _id }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11493
+ }
11494
+ return await this.model.findOne({ _id }).select(fields).sort(sort).populate(populate).exec();
11474
11495
  }
11475
11496
  async findOneByUserId(userId, params = {}, opts) {
11476
11497
  const { fields = "", sort = { createdAt: -1 }, populate = [] } = params;
11477
11498
  const virtuals = opts?.lean ?? true;
11478
- return await this.model.findOne({ userId }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11499
+ if (virtuals) {
11500
+ return await this.model.findOne({ userId }).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11501
+ }
11502
+ return await this.model.findOne({ userId }).select(fields).sort(sort).populate(populate).exec();
11479
11503
  }
11480
11504
  async findMany(params = {}, opts) {
11481
11505
  const {
@@ -11487,7 +11511,10 @@ var BaseRepository = class {
11487
11511
  limit = 10
11488
11512
  } = params;
11489
11513
  const virtuals = opts?.lean ?? true;
11490
- return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11514
+ if (virtuals) {
11515
+ return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11516
+ }
11517
+ return await this.model.find(query).select(fields).skip(skip).limit(limit).sort(sort).populate(populate).exec();
11491
11518
  }
11492
11519
  async findAll(params = {}, opts) {
11493
11520
  const {
@@ -11497,7 +11524,10 @@ var BaseRepository = class {
11497
11524
  populate = []
11498
11525
  } = params;
11499
11526
  const virtuals = opts?.lean ?? true;
11500
- return await this.model.find(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11527
+ if (virtuals) {
11528
+ return await this.model.find(query).select(fields).sort(sort).populate(populate).lean({ virtuals, versionKey: false }).exec();
11529
+ }
11530
+ return await this.model.find(query).select(fields).sort(sort).populate(populate).exec();
11501
11531
  }
11502
11532
  // ================================================
11503
11533
  // EXIST AND COUNT FUNCTIONS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectfy-shared",
3
- "version": "0.0.95",
3
+ "version": "0.0.97",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {