@reachu/database 1.0.97 → 1.0.98

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.
@@ -1,2 +1,2 @@
1
- declare const getCurrentDate: () => Promise<void>;
1
+ declare const getCurrentDate: () => Promise<string>;
2
2
  export { getCurrentDate };
@@ -17,9 +17,8 @@ const getCurrentDate = () => __awaiter(void 0, void 0, void 0, function* () {
17
17
  try {
18
18
  yield queryRunner.connect();
19
19
  const result = yield queryRunner.query('SELECT NOW() as date');
20
- console.log(`getCurrentDate result: ${JSON.stringify(result)}`);
21
20
  const currentDate = result[0].date;
22
- console.log(`getCurrentDate: ${currentDate}`);
21
+ return currentDate;
23
22
  }
24
23
  catch (error) {
25
24
  console.error('getCurrentDate: Error:', error);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/querys/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwC;AAExC,MAAM,cAAc,GAAG,GAAS,EAAE;IAChC,MAAM,UAAU,GAAG,uBAAa,EAAE,CAAC;IACnC,MAAM,WAAW,GAAG,UAAU,CAAC,iBAAiB,EAAE,CAAC;IACnD,IAAI;QACF,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,0BAA0B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAChE,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,mBAAmB,WAAW,EAAE,CAAC,CAAC;KAC/C;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;KAChD;YAAS;QACR,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;KAC7B;AACH,CAAC,CAAA,CAAC;AAEO,wCAAc"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/querys/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwC;AAExC,MAAM,cAAc,GAAG,GAA0B,EAAE;IACjD,MAAM,UAAU,GAAG,uBAAa,EAAE,CAAC;IACnC,MAAM,WAAW,GAAG,UAAU,CAAC,iBAAiB,EAAE,CAAC;IACnD,IAAI;QACF,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC/D,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACnC,OAAO,WAAW,CAAC;KACpB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;KAChD;YAAS;QACR,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;KAC7B;AACH,CAAC,CAAA,CAAC;AAEO,wCAAc"}
@@ -2987,8 +2987,8 @@
2987
2987
  "affectsGlobalScope": false
2988
2988
  },
2989
2989
  "../src/helpers/querys/index.ts": {
2990
- "version": "ab2befcd1372f06609cfda17b110c31f1b76cd9092033ba59b7bd33bcb6fe90b",
2991
- "signature": "eb80b6c7eae67e57701b07fcd4afe0de1d9ba7098ff3b7ab70828646e76fbad2",
2990
+ "version": "d064daff31b4dbf5bc3b9b05580c32cda536aaab20d52656e21ca9cf55f5cbe2",
2991
+ "signature": "2b4d95c63556d70c165b44312ac7e5bb76706e5a99f1dfcb010e8a06fcf91f40",
2992
2992
  "affectsGlobalScope": false
2993
2993
  },
2994
2994
  "../src/helpers/index.ts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.97",
3
+ "version": "1.0.98",
4
4
  "description": "reachu-database",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "author": "reachu",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@reachu/logger": "1.0.97",
25
- "@reachu/utils": "1.0.97",
24
+ "@reachu/logger": "1.0.98",
25
+ "@reachu/utils": "1.0.98",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -1,14 +1,13 @@
1
1
  import { getConnection } from 'typeorm';
2
2
 
3
- const getCurrentDate = async () => {
3
+ const getCurrentDate = async (): Promise<string> => {
4
4
  const connection = getConnection();
5
5
  const queryRunner = connection.createQueryRunner();
6
6
  try {
7
7
  await queryRunner.connect();
8
8
  const result = await queryRunner.query('SELECT NOW() as date');
9
- console.log(`getCurrentDate result: ${JSON.stringify(result)}`);
10
9
  const currentDate = result[0].date;
11
- console.log(`getCurrentDate: ${currentDate}`);
10
+ return currentDate;
12
11
  } catch (error) {
13
12
  console.error('getCurrentDate: Error:', error);
14
13
  } finally {