drapcode-utility 1.7.9 → 1.8.1

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.
@@ -278,6 +278,7 @@ var queryToMongo = function (query, requiredExternal, externalParams, constants,
278
278
  if (currentUserSetting === void 0) { currentUserSetting = {}; }
279
279
  var key = query.key, field = query.field, value = query.value, fieldType = query.fieldType;
280
280
  if ([drapcode_constant_1.EQUALS, drapcode_constant_1.NOT_EQUAL].includes(key) &&
281
+ typeof value === "string" &&
281
282
  drapcode_constant_1.DateRangeConstant.some(function (cnst) { return value.includes(cnst); })) {
282
283
  var final = (0, date_util_1.getDateRangeValue)(key, field, value);
283
284
  console.log("\n ===final getDateRangeValue", final);
@@ -213,7 +213,14 @@ var processFileUploadToS3 = function (file, s3Client, s3Config, publicS3Client,
213
213
  });
214
214
  });
215
215
  };
216
- var imageTypeFiles = ["image/png", "image/jpeg", "image/jpg"];
216
+ var imageTypeFiles = [
217
+ "image/png",
218
+ "image/jpeg",
219
+ "image/jpg",
220
+ "image/heic",
221
+ "image/webp",
222
+ "image/heif",
223
+ ];
217
224
  var processAndRemoveExifDataFromImg = function (files) { return __awaiter(void 0, void 0, void 0, function () {
218
225
  var promises, error_2;
219
226
  return __generator(this, function (_a) {
@@ -333,7 +340,15 @@ var handleIconUpload = function (file, contentType, publicS3Client, publicS3Conf
333
340
  _b.trys.push([1, 6, , 7]);
334
341
  if (!(isGenerateIcons &&
335
342
  fileSize < 157286400 && //150mb
336
- ["image/png", "image/jpeg", "image/gif", "application/pdf"].includes(contentType))) return [3 /*break*/, 4];
343
+ [
344
+ "image/png",
345
+ "image/jpeg",
346
+ "image/gif",
347
+ "image/webp",
348
+ "image/heif",
349
+ "image/heic",
350
+ "application/pdf",
351
+ ].includes(contentType))) return [3 /*break*/, 4];
337
352
  return [4 /*yield*/, generateDynamicIcons(filePath, iconSizes, contentType)];
338
353
  case 2:
339
354
  iconFiles = _b.sent();
@@ -410,6 +425,9 @@ var generateStaticIcons = function (type) {
410
425
  case "image/png":
411
426
  case "image/jpeg":
412
427
  case "image/gif":
428
+ case "image/heif":
429
+ case "image/webp":
430
+ case "image/heic":
413
431
  smallIcon =
414
432
  "https://drapcode-static.s3.amazonaws.com/img/placeholder-img.png";
415
433
  mediumIcon =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "1.7.9",
3
+ "version": "1.8.1",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",