elseware-nodejs 1.7.5 → 1.7.7

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
@@ -299,7 +299,7 @@ var Logger = class {
299
299
  this.output(`\u2705 ${msg}`);
300
300
  }
301
301
  info(msg) {
302
- this.output(`\u2139\uFE0F ${msg}`);
302
+ this.output(`\u{1F539} ${msg}`);
303
303
  }
304
304
  warning(msg) {
305
305
  this.output(`\u26A0\uFE0F ${msg}`);
@@ -337,17 +337,17 @@ async function connectMongoDB(config) {
337
337
  process.exit(1);
338
338
  }
339
339
  }
340
- dotenv__default.default.config();
340
+ dotenv__default.default.config({ quiet: true });
341
341
  function loadEnv(options) {
342
342
  const result = options.schema.safeParse(process.env);
343
343
  if (!result.success) {
344
344
  handleError(result.error);
345
345
  }
346
- logger.success("\u2705 Env Configurations validated");
346
+ logger.success("Env Configurations validated");
347
347
  return options.transform ? options.transform(result.data) : result.data;
348
348
  }
349
349
  function handleError(error) {
350
- console.error("\u274C ENV VALIDATION FAILED");
350
+ logger.danger("ENV VALIDATION FAILED");
351
351
  const grouped = {};
352
352
  error.issues.forEach((err) => {
353
353
  const key = err.path.join(".") || "unknown";
@@ -355,12 +355,12 @@ function handleError(error) {
355
355
  grouped[key].push(err.message);
356
356
  });
357
357
  Object.entries(grouped).forEach(([key, messages]) => {
358
- console.error(`\u{1F539} ${key}`);
358
+ logger.info(`${key}`);
359
359
  messages.forEach((msg) => {
360
- console.error(` - ${msg}`);
360
+ logger.log(`${msg}`);
361
361
  });
362
362
  });
363
- console.error("\u{1F6AB} Application startup aborted.\n");
363
+ logger.danger("Application startup aborted.\n");
364
364
  process.exit(1);
365
365
  }
366
366
 
@@ -5453,7 +5453,7 @@ var JWTService = class {
5453
5453
  try {
5454
5454
  return jwt__default.default.verify(token, this.accessSecret);
5455
5455
  } catch (err) {
5456
- console.error("Access token verification failed:", err.message);
5456
+ logger.danger("Access token verification failed:", err.message);
5457
5457
  return null;
5458
5458
  }
5459
5459
  }
@@ -5461,7 +5461,7 @@ var JWTService = class {
5461
5461
  try {
5462
5462
  return jwt__default.default.verify(token, this.refreshSecret);
5463
5463
  } catch (err) {
5464
- console.error("Refresh token verification failed:", err.message);
5464
+ logger.danger("Refresh token verification failed:", err.message);
5465
5465
  return null;
5466
5466
  }
5467
5467
  }