drapcode-utility 2.6.7 → 2.6.8-preview

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.
@@ -132,7 +132,6 @@ const drapcodeEncryptDecrypt = async (data, encrypt) => {
132
132
  };
133
133
  exports.drapcodeEncryptDecrypt = drapcodeEncryptDecrypt;
134
134
  const cryptFile = async (filePath, encryption, decrypt) => {
135
- console.log("encryption cryptFile:>> ", encryption);
136
135
  const data = await (0, file_1.processFileEncryptionDecryption)(filePath, encryption, decrypt);
137
136
  return data;
138
137
  };
@@ -83,7 +83,7 @@ const getSearchObjQuery = (searchObj, searchQueryTypeObj) => {
83
83
  ].includes(searchQueryTypeKey)) {
84
84
  const isDateTime = ["datetime", ...drapcode_constant_1.systemDateField].includes(searchQueryTypeKey);
85
85
  if (key.startsWith("start_") || key.startsWith("end_")) {
86
- let fieldKey = key.replace(/^start_/, "").replace(/^end_/, "");
86
+ let fieldKey = key.replace(/^(start_|end_)/, "");
87
87
  searchAggregateQuery.push({
88
88
  $addFields: {
89
89
  [`_${key}`]: { $toString: `$${fieldKey}` },
@@ -33,7 +33,6 @@ const createS3Client = (awsConfig) => {
33
33
  exports.createS3Client = createS3Client;
34
34
  const fileUploadToS3 = async (files, s3Client, s3Config, publicS3Client, publicS3Config, isGenerateIcons, encryption, options = {}, encrypted = false) => {
35
35
  if (Array.isArray(files)) {
36
- console.log("Multiple file");
37
36
  const fileOptions = [];
38
37
  const s3Key = s3Config.key;
39
38
  for (const file of files) {
@@ -49,21 +48,17 @@ const fileUploadToS3 = async (files, s3Client, s3Config, publicS3Client, publicS
49
48
  return fileOptions;
50
49
  }
51
50
  else {
52
- console.log("Single file");
53
51
  const fileSlug = slugifyFileName(files.originalname);
54
52
  if (s3Config.append) {
55
53
  s3Config.key = `${s3Config.key}/${(0, uuid_1.v4)()}/${fileSlug}`;
56
54
  }
57
- console.log("encryption :>> ", encryption);
58
55
  return await processFileUploadToS3(files, s3Client, s3Config, publicS3Client, publicS3Config, isGenerateIcons, encryption, options, encrypted);
59
56
  }
60
57
  };
61
58
  exports.fileUploadToS3 = fileUploadToS3;
62
59
  const processFileUploadToS3 = async (file, s3Client, s3Config, publicS3Client, publicS3Config, isGenerateIcons, encryption, options = {}, encrypt = false) => {
63
60
  try {
64
- console.log("encrypt :>> ", encrypt);
65
61
  const contentType = mime_types_1.default.lookup(file.originalname) || "";
66
- console.log("s3Config :>> ", s3Config);
67
62
  const { acl, key, bucket } = s3Config;
68
63
  let params = null;
69
64
  let encryptedFilePath = null;
@@ -88,8 +83,6 @@ const processFileUploadToS3 = async (file, s3Client, s3Config, publicS3Client, p
88
83
  ...options,
89
84
  };
90
85
  }
91
- console.log("encryptedFilePath :>> ", encryptedFilePath);
92
- console.log("params :>> ", params);
93
86
  const parallelUploads3 = new lib_storage_1.Upload({ client: s3Client, params });
94
87
  const data = await parallelUploads3.done();
95
88
  const { smallIcon, mediumIcon, largeIcon } = await handleIconUpload(file, contentType, publicS3Client, publicS3Config, isGenerateIcons, key, options);
@@ -333,7 +333,6 @@ const replaceDataValueIntoExpression = (expression, data, user, tenant, userSett
333
333
  const contentList = expression
334
334
  .match(/{{(.*?)}}/g)
335
335
  ?.map((b) => b.replace(/{{(.*?)}}/g, "$1"));
336
- console.log("1 replaceDataValueIntoExpression");
337
336
  contentList?.forEach((prop) => {
338
337
  const needle = `{{${prop}}}`;
339
338
  prop = voca_1.default.trim(prop);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "2.6.7",
4
- "description": "DrapCode Utility",
3
+ "version": "2.6.8-preview",
4
+ "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "files": [