@midwayjs/web 3.13.2 → 3.13.4-beta.1

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.
@@ -15,7 +15,10 @@ module.exports = {
15
15
  if (this.app.config.egg.queryParseMode === 'simple') {
16
16
  const str = this.querystring;
17
17
  const c = (this._querycache = this._querycache || {});
18
- return c[str] || (c[str] = qs.parse(str));
18
+ return (
19
+ c[str] ||
20
+ (c[str] = qs.parse(str, this.app.config.egg.queryParseOptions || {}))
21
+ );
19
22
  } else {
20
23
  return this._customQuery(_querycache, firstValue);
21
24
  }
@@ -3,6 +3,7 @@ import { Context as EggContext, Application as EggApplication } from 'egg';
3
3
  import { IMidwayContainer, IMidwayContext, IMidwayApplication, IConfigurationOptions, NextFunction as BaseNextFunction } from '@midwayjs/core';
4
4
  import { DefaultState, Middleware } from 'koa';
5
5
  import { ILogger, LoggerOptions } from '@midwayjs/logger';
6
+ import { IParseOptions } from 'qs';
6
7
  export declare const RUN_IN_AGENT_KEY = "egg:run_in_agent";
7
8
  export declare const EGG_AGENT_APP_KEY = "egg_agent_app";
8
9
  export interface State extends DefaultState {
@@ -110,6 +111,10 @@ export interface IMidwayWebConfigurationOptions extends IConfigurationOptions {
110
111
  * http query parser mode, default is extended
111
112
  */
112
113
  queryParseMode?: 'simple' | 'extended';
114
+ /**
115
+ * http query parse options, used when 'simple' mode is used
116
+ */
117
+ queryParseOptions?: IParseOptions;
113
118
  }
114
119
  /**
115
120
  * @deprecated since version 3.0.0
package/dist/logger.js CHANGED
@@ -87,7 +87,7 @@ class MidwayLoggers extends Map {
87
87
  let loggerConfig = configService.getConfiguration('midwayLogger');
88
88
  // 这里属于 hack 了,cluster 模式下会先走这里,找不到默认值
89
89
  // 先合并一遍默认配置
90
- configService.addObject(logger_1.loggers.getDefaultMidwayLoggerConfig(configService.getAppInfo()));
90
+ configService.addObject(logger_1.loggers.getDefaultMidwayLoggerConfig(configService.getAppInfo()), true);
91
91
  loggerConfig = configService.getConfiguration('midwayLogger');
92
92
  // 这里利用了 loggers 缓存的特性,提前初始化 logger
93
93
  if (loggerConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/web",
3
- "version": "3.13.2",
3
+ "version": "3.13.4-beta.1",
4
4
  "description": "Midway Web Framework for Egg.js",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=12"
62
62
  },
63
- "gitHead": "c9ebd3f575ca3f6756da33bcb53a477a9cfd3f71"
63
+ "gitHead": "a603d2348d6141f8f723901498f03a162a037708"
64
64
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2013 - Now midwayjs
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.