elseware-nodejs 1.7.5 → 1.7.6

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 CHANGED
@@ -284,7 +284,7 @@ var Logger = class {
284
284
  this.output(`\u2705 ${msg}`);
285
285
  }
286
286
  info(msg) {
287
- this.output(`\u2139\uFE0F ${msg}`);
287
+ this.output(`\u{1F539} ${msg}`);
288
288
  }
289
289
  warning(msg) {
290
290
  this.output(`\u26A0\uFE0F ${msg}`);
@@ -328,11 +328,11 @@ function loadEnv(options) {
328
328
  if (!result.success) {
329
329
  handleError(result.error);
330
330
  }
331
- logger.success("\u2705 Env Configurations validated");
331
+ logger.success("Env Configurations validated");
332
332
  return options.transform ? options.transform(result.data) : result.data;
333
333
  }
334
334
  function handleError(error) {
335
- console.error("\u274C ENV VALIDATION FAILED");
335
+ logger.danger("ENV VALIDATION FAILED");
336
336
  const grouped = {};
337
337
  error.issues.forEach((err) => {
338
338
  const key = err.path.join(".") || "unknown";
@@ -340,12 +340,12 @@ function handleError(error) {
340
340
  grouped[key].push(err.message);
341
341
  });
342
342
  Object.entries(grouped).forEach(([key, messages]) => {
343
- console.error(`\u{1F539} ${key}`);
343
+ logger.info(`${key}`);
344
344
  messages.forEach((msg) => {
345
- console.error(` - ${msg}`);
345
+ logger.log(`${msg}`);
346
346
  });
347
347
  });
348
- console.error("\u{1F6AB} Application startup aborted.\n");
348
+ logger.danger("Application startup aborted.\n");
349
349
  process.exit(1);
350
350
  }
351
351
 
@@ -5438,7 +5438,7 @@ var JWTService = class {
5438
5438
  try {
5439
5439
  return jwt.verify(token, this.accessSecret);
5440
5440
  } catch (err) {
5441
- console.error("Access token verification failed:", err.message);
5441
+ logger.danger("Access token verification failed:", err.message);
5442
5442
  return null;
5443
5443
  }
5444
5444
  }
@@ -5446,7 +5446,7 @@ var JWTService = class {
5446
5446
  try {
5447
5447
  return jwt.verify(token, this.refreshSecret);
5448
5448
  } catch (err) {
5449
- console.error("Refresh token verification failed:", err.message);
5449
+ logger.danger("Refresh token verification failed:", err.message);
5450
5450
  return null;
5451
5451
  }
5452
5452
  }