@gustavo-valsechi/node 1.0.28 → 1.0.29

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.js CHANGED
@@ -82,6 +82,7 @@ var databaseInit = (entities) => {
82
82
  };
83
83
 
84
84
  // src/tools/response.ts
85
+ var import_zod = require("zod");
85
86
  var import_utils = __toESM(require("@gustavo-valsechi/utils"));
86
87
  var responseWrapper = async (res, promise) => {
87
88
  return promise.then(async (data) => {
@@ -90,6 +91,9 @@ var responseWrapper = async (res, promise) => {
90
91
  var _a;
91
92
  const status = error.statusCode || 500;
92
93
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
94
+ if (error instanceof import_zod.ZodError) {
95
+ console.log("AQQQ");
96
+ }
93
97
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
94
98
  return res.status(status).send({ statusCode: status, code: error.code, response });
95
99
  });
package/dist/index.mjs CHANGED
@@ -41,6 +41,7 @@ var databaseInit = (entities) => {
41
41
  };
42
42
 
43
43
  // src/tools/response.ts
44
+ import { ZodError } from "zod";
44
45
  import Utils from "@gustavo-valsechi/utils";
45
46
  var responseWrapper = async (res, promise) => {
46
47
  return promise.then(async (data) => {
@@ -49,6 +50,9 @@ var responseWrapper = async (res, promise) => {
49
50
  var _a;
50
51
  const status = error.statusCode || 500;
51
52
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
53
+ if (error instanceof ZodError) {
54
+ console.log("AQQQ");
55
+ }
52
56
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
53
57
  return res.status(status).send({ statusCode: status, code: error.code, response });
54
58
  });
@@ -36,6 +36,7 @@ __export(router_exports, {
36
36
  module.exports = __toCommonJS(router_exports);
37
37
 
38
38
  // src/tools/response.ts
39
+ var import_zod = require("zod");
39
40
  var import_utils = __toESM(require("@gustavo-valsechi/utils"));
40
41
  var responseWrapper = async (res, promise) => {
41
42
  return promise.then(async (data) => {
@@ -44,6 +45,9 @@ var responseWrapper = async (res, promise) => {
44
45
  var _a;
45
46
  const status = error.statusCode || 500;
46
47
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
48
+ if (error instanceof import_zod.ZodError) {
49
+ console.log("AQQQ");
50
+ }
47
51
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
48
52
  return res.status(status).send({ statusCode: status, code: error.code, response });
49
53
  });
@@ -1,4 +1,5 @@
1
1
  // src/tools/response.ts
2
+ import { ZodError } from "zod";
2
3
  import Utils from "@gustavo-valsechi/utils";
3
4
  var responseWrapper = async (res, promise) => {
4
5
  return promise.then(async (data) => {
@@ -7,6 +8,9 @@ var responseWrapper = async (res, promise) => {
7
8
  var _a;
8
9
  const status = error.statusCode || 500;
9
10
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
11
+ if (error instanceof ZodError) {
12
+ console.log("AQQQ");
13
+ }
10
14
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
11
15
  return res.status(status).send({ statusCode: status, code: error.code, response });
12
16
  });
@@ -37,6 +37,7 @@ module.exports = __toCommonJS(server_exports);
37
37
  var import_fastify = __toESM(require("fastify"));
38
38
 
39
39
  // src/tools/response.ts
40
+ var import_zod = require("zod");
40
41
  var import_utils = __toESM(require("@gustavo-valsechi/utils"));
41
42
  var responseWrapper = async (res, promise) => {
42
43
  return promise.then(async (data) => {
@@ -45,6 +46,9 @@ var responseWrapper = async (res, promise) => {
45
46
  var _a;
46
47
  const status = error.statusCode || 500;
47
48
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
49
+ if (error instanceof import_zod.ZodError) {
50
+ console.log("AQQQ");
51
+ }
48
52
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
49
53
  return res.status(status).send({ statusCode: status, code: error.code, response });
50
54
  });
@@ -2,6 +2,7 @@
2
2
  import fastify from "fastify";
3
3
 
4
4
  // src/tools/response.ts
5
+ import { ZodError } from "zod";
5
6
  import Utils from "@gustavo-valsechi/utils";
6
7
  var responseWrapper = async (res, promise) => {
7
8
  return promise.then(async (data) => {
@@ -10,6 +11,9 @@ var responseWrapper = async (res, promise) => {
10
11
  var _a;
11
12
  const status = error.statusCode || 500;
12
13
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
14
+ if (error instanceof ZodError) {
15
+ console.log("AQQQ");
16
+ }
13
17
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
14
18
  return res.status(status).send({ statusCode: status, code: error.code, response });
15
19
  });
@@ -41,6 +41,7 @@ __export(tools_exports, {
41
41
  module.exports = __toCommonJS(tools_exports);
42
42
 
43
43
  // src/tools/response.ts
44
+ var import_zod = require("zod");
44
45
  var import_utils = __toESM(require("@gustavo-valsechi/utils"));
45
46
  var responseWrapper = async (res, promise) => {
46
47
  return promise.then(async (data) => {
@@ -49,6 +50,9 @@ var responseWrapper = async (res, promise) => {
49
50
  var _a;
50
51
  const status = error.statusCode || 500;
51
52
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
53
+ if (error instanceof import_zod.ZodError) {
54
+ console.log("AQQQ");
55
+ }
52
56
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
53
57
  return res.status(status).send({ statusCode: status, code: error.code, response });
54
58
  });
@@ -6,6 +6,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
6
6
  });
7
7
 
8
8
  // src/tools/response.ts
9
+ import { ZodError } from "zod";
9
10
  import Utils from "@gustavo-valsechi/utils";
10
11
  var responseWrapper = async (res, promise) => {
11
12
  return promise.then(async (data) => {
@@ -14,6 +15,9 @@ var responseWrapper = async (res, promise) => {
14
15
  var _a;
15
16
  const status = error.statusCode || 500;
16
17
  let response = ((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) || (error == null ? void 0 : error.message) || error;
18
+ if (error instanceof ZodError) {
19
+ console.log("AQQQ");
20
+ }
17
21
  console.error("\u{1F534} Request error", (error == null ? void 0 : error.response) || response);
18
22
  return res.status(status).send({ statusCode: status, code: error.code, response });
19
23
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/node",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",