gg-express 1.0.152 → 1.0.155

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.
@@ -49,6 +49,7 @@ class GGExpressV3 {
49
49
  // (req: Request, res: Response, next: NextFunction) => next(),
50
50
  // autoTypeMiddleware,
51
51
  (req, res, next) => {
52
+ var _a, _b, _c;
52
53
  // console.log("req.url", req.url)
53
54
  // if (req.query) console.log("req.query", req.query)
54
55
  // if (req.body) console.log("req.body", req.body)
@@ -64,9 +65,9 @@ class GGExpressV3 {
64
65
  }
65
66
  }
66
67
  catch (error) {
67
- if (req.body.data.data)
68
+ if ((_b = (_a = req.body) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.data)
68
69
  console.log(`req.body.data.data`, req.body.data.data);
69
- if (req.query.data)
70
+ if ((_c = req.query) === null || _c === void 0 ? void 0 : _c.data)
70
71
  console.log(`req.query.data`, req.query.data);
71
72
  new Error(error);
72
73
  }
@@ -9,7 +9,7 @@ function generateGGApi_v3(appName, filePathWithFileName) {
9
9
  const tempInterfaceName = `staticRouteInterface_${appName}_v3`;
10
10
  const code = `
11
11
  import axios from "axios"
12
- import { ${tempInterfaceName} } from "./${tempInterfaceName}"
12
+ import type { ${tempInterfaceName} } from "./${tempInterfaceName}"
13
13
 
14
14
  export class GGApi_v3 {
15
15
  urlPrefix : string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg-express",
3
- "version": "1.0.152",
3
+ "version": "1.0.155",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
@@ -126,9 +126,9 @@ export default class GGExpressV3<
126
126
  )
127
127
  }
128
128
  } catch (error) {
129
- if (req.body.data.data)
129
+ if (req.body?.data?.data)
130
130
  console.log(`req.body.data.data`, req.body.data.data)
131
- if (req.query.data) console.log(`req.query.data`, req.query.data)
131
+ if (req.query?.data) console.log(`req.query.data`, req.query.data)
132
132
  new Error(error as any)
133
133
  }
134
134
  next()
@@ -7,7 +7,7 @@ export function generateGGApi_v3(
7
7
  const tempInterfaceName = `staticRouteInterface_${appName}_v3`
8
8
  const code = `
9
9
  import axios from "axios"
10
- import { ${tempInterfaceName} } from "./${tempInterfaceName}"
10
+ import type { ${tempInterfaceName} } from "./${tempInterfaceName}"
11
11
 
12
12
  export class GGApi_v3 {
13
13
  urlPrefix : string