drapcode-utility 2.3.7 → 2.3.9

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.
@@ -17,7 +17,7 @@ const moment_1 = __importDefault(require("moment"));
17
17
  const mime_types_1 = __importDefault(require("mime-types"));
18
18
  const uuid_2 = require("uuid");
19
19
  const aws4_1 = require("aws4");
20
- const mysql = require('mysql2/promise');
20
+ const mysql = require("mysql2/promise");
21
21
  exports.nonFindQuery = ["COUNT", "SUM", "AVG", "MIN", "MAX"];
22
22
  // Constants
23
23
  const DERIVED_FIELD_EXCLUDES = [
@@ -170,10 +170,9 @@ exports.dynamicSort = dynamicSort;
170
170
  * @returns True if the email is valid
171
171
  */
172
172
  const validateEmail = (email) => {
173
- if (!email) {
173
+ if (!email)
174
174
  return false;
175
- }
176
- const regexCode = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/;
175
+ const regexCode = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,24})+$/;
177
176
  return regexCode.test(email);
178
177
  };
179
178
  exports.validateEmail = validateEmail;
@@ -1235,8 +1234,8 @@ const createMySqlConnection = async (config) => {
1235
1234
  database: database,
1236
1235
  port: port,
1237
1236
  });
1238
- const [rows] = await connection.execute('select ?+? as sum', [2, 2]);
1239
- console.log('==> MySQL createMySqlConnection ~ Testing connection...', rows);
1237
+ const [rows] = await connection.execute("select ?+? as sum", [2, 2]);
1238
+ console.log("==> MySQL createMySqlConnection ~ Testing connection...", rows);
1240
1239
  return connection;
1241
1240
  }
1242
1241
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "2.3.7",
3
+ "version": "2.3.9",
4
4
  "description": "DrapCode Utility",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "dompurify": "^3.1.7",
45
45
  "drapcode-constant": "^1.9.7",
46
46
  "drapcode-logger": "^1.3.5",
47
- "drapcode-redis": "^1.4.1",
47
+ "drapcode-redis": "^1.4.3",
48
48
  "exiftool-vendored": "^28.2.1",
49
49
  "express": "^4.17.1",
50
50
  "gm": "^1.25.0",