mas-server 3.0.1 → 3.0.2

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
@@ -63,6 +63,7 @@ beforeMounted) {
63
63
  state_1.state.config = config;
64
64
  // new express
65
65
  const app = (0, express_1.default)();
66
+ beforeMounted && beforeMounted(app);
66
67
  // ip限制
67
68
  if ((_a = config.apiLimit) === null || _a === void 0 ? void 0 : _a.open) {
68
69
  (0, apiLimit_1.default)(app, config.apiLimit || {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-server",
3
- "version": "3.0.01",
3
+ "version": "3.0.02",
4
4
  "description": "一款基于express面向中小型项目的后端框架",
5
5
  "main": "dist/index.js",
6
6
  "typings": "src/index.ts",
package/src/index.ts CHANGED
@@ -48,6 +48,7 @@ export function getApp(
48
48
  state.config = config;
49
49
  // new express
50
50
  const app = express();
51
+ beforeMounted && beforeMounted(app);
51
52
  // ip限制
52
53
  if (config.apiLimit?.open) {
53
54
  apiLimit(app, config.apiLimit || {});
package/test/main.ts CHANGED
@@ -12,6 +12,7 @@ const app = getApp(
12
12
  },
13
13
  (eapp) => {
14
14
  eapp.use((req, res: MasRes, next) => {
15
+ console.log(req.path, "加工之前的111");
15
16
  next();
16
17
  });
17
18
  }
@@ -25,5 +26,4 @@ app.all("*", (_req: MasReq, res: MasRes) => {
25
26
  });
26
27
  app.listen(8087, () => {
27
28
  console.log("http://localhost:8087");
28
- console.log("http://localhost:8087/apidoc");
29
29
  });
package/test/src/debug.ts CHANGED
@@ -2,4 +2,4 @@ import validType from "@/utils/validType";
2
2
  import axios from "axios";
3
3
  import * as sqlform from "./sqlform.json";
4
4
  import { createToken, getApiRouter } from "@/index";
5
- console.log(getApiRouter(), "路由信息");
5
+ // console.log(getApiRouter(), "路由信息");