mm_os 1.7.6 → 1.7.7

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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 应用
3
+ * @param {Object} server 服务
4
+ * @param {Object} config 配置参数
5
+ */
6
+ module.exports = function(server, config) {
7
+ /* 跨域限制(web防火墙) */
8
+ server.use(async (ctx, next) => {
9
+ var url = ctx.path + ctx.querystring;
10
+ var body = "";
11
+ if (ctx.request.body) {
12
+ body = JSON.stringify(ctx.request.body);
13
+ }
14
+ $.log.http(`${ctx.method} ${url} ${body}`);
15
+ await next();
16
+ });
17
+ return server;
18
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "web_log",
3
+ "title": "web请求日志",
4
+ "description": "用于记录http请求",
5
+ "version": "1.0",
6
+ "sort": 13
7
+ }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "mode": "mqtt",
3
3
  "name": "mqtt_base",
4
- "title": "示例中间件",
5
- "description": "描述该中间件的作用",
4
+ "title": "MQTT通讯器",
5
+ "description": "用于MQTT通讯",
6
6
  "version": "1.0",
7
7
  "sort": 3
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -36,14 +36,14 @@
36
36
  "koa-websocket": "^7.0.0",
37
37
  "mm_check": "^1.4.4",
38
38
  "mm_excel": "^1.1.1",
39
- "mm_expand": "^1.6.5",
39
+ "mm_expand": "^1.6.6",
40
40
  "mm_html": "^1.1.1",
41
41
  "mm_koa_proxy": "^1.0.0",
42
- "mm_logs": "^1.1.0",
42
+ "mm_logs": "^1.1.2",
43
43
  "mm_machine": "^1.6.0",
44
44
  "mm_mongodb": "^1.3.9",
45
45
  "mm_mqtt": "^1.0.5",
46
- "mm_mysql": "^1.7.1",
46
+ "mm_mysql": "^1.7.2",
47
47
  "mm_redis": "^1.3.9",
48
48
  "mm_ret": "^1.3.7",
49
49
  "mm_session": "^1.4.1",