elseware-nodejs 1.8.0 → 1.8.2

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
@@ -344,7 +344,8 @@ function loadEnv(options) {
344
344
  handleError(result.error);
345
345
  }
346
346
  logger.success("Env Configurations validated");
347
- return options.transform ? options.transform(result.data) : result.data;
347
+ const env = result.data;
348
+ return options.transform ? options.transform(env) : env;
348
349
  }
349
350
  function handleError(error) {
350
351
  logger.danger("Env validation failed");
@@ -354,20 +355,17 @@ function handleError(error) {
354
355
  const rawValue = key !== "unknown" ? process.env[key] : void 0;
355
356
  const isSecret = key.toLowerCase().includes("secret");
356
357
  const safeValue = isSecret ? "***" : rawValue;
357
- const messageParts = [
358
+ const message = [
358
359
  `message: ${err.message}`,
359
360
  `code: ${err.code}`,
360
361
  rawValue !== void 0 ? `value: ${JSON.stringify(safeValue)}` : null
361
- ].filter(Boolean);
362
- const fullMessage = messageParts.join(" | ");
362
+ ].filter(Boolean).join(" | ");
363
363
  if (!grouped[key]) grouped[key] = [];
364
- grouped[key].push(fullMessage);
364
+ grouped[key].push(message);
365
365
  });
366
366
  Object.entries(grouped).forEach(([key, messages]) => {
367
- logger.info(`${key}`);
368
- messages.forEach((msg) => {
369
- logger.log(` - ${msg}`);
370
- });
367
+ logger.info(key);
368
+ messages.forEach((msg) => logger.log(` - ${msg}`));
371
369
  });
372
370
  logger.danger("Application startup aborted!");
373
371
  process.exit(1);
@@ -5368,7 +5366,8 @@ var CloudinaryService = class {
5368
5366
  const result = await cloudinary.uploader.upload(filePath, {
5369
5367
  folder: folderPath,
5370
5368
  public_id: options.publicId,
5371
- resource_type: options.resourceType || "auto"
5369
+ resource_type: options.resourceType || "auto",
5370
+ transformation: options.transformation
5372
5371
  });
5373
5372
  return result.public_id;
5374
5373
  }