@gopowerteam/request 0.1.18 → 0.1.20

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.cjs CHANGED
@@ -205,7 +205,10 @@ var _RequestService = class {
205
205
  throw new Error("\u8BF7\u68C0\u67E5\u8BF7\u6C42\u914D\u7F6E\u662F\u5426\u5B8C\u6210");
206
206
  }
207
207
  if (plugins && plugins.length) {
208
- this.execRequestPlugin(plugins, options);
208
+ this.execRequestPlugin(
209
+ plugins.filter(Boolean),
210
+ options
211
+ );
209
212
  }
210
213
  const baseURL = _RequestService.config.gateway;
211
214
  const pathURL = this.parseRequestPath(
package/dist/index.d.ts CHANGED
@@ -56,7 +56,7 @@ declare class RequestService {
56
56
  * @param {RequestPlugin[]} plugins 请求插件
57
57
  * @returns
58
58
  */
59
- toURL(options: RequestSendOptions, plugins?: RequestPlugin[]): string;
59
+ toURL(options: RequestSendOptions, plugins?: (RequestPlugin | undefined)[]): string;
60
60
  }
61
61
 
62
62
  declare function setup(config: RequestSetupConfig): void;
package/dist/index.js CHANGED
@@ -164,7 +164,10 @@ var _RequestService = class {
164
164
  throw new Error("\u8BF7\u68C0\u67E5\u8BF7\u6C42\u914D\u7F6E\u662F\u5426\u5B8C\u6210");
165
165
  }
166
166
  if (plugins && plugins.length) {
167
- this.execRequestPlugin(plugins, options);
167
+ this.execRequestPlugin(
168
+ plugins.filter(Boolean),
169
+ options
170
+ );
168
171
  }
169
172
  const baseURL = _RequestService.config.gateway;
170
173
  const pathURL = this.parseRequestPath(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gopowerteam/request",
3
3
  "private": false,
4
- "version": "0.1.18",
4
+ "version": "0.1.20",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -33,7 +33,6 @@
33
33
  "@types/qs": "^6.9.7",
34
34
  "jest": "^29.4.3",
35
35
  "ts-jest": "^29.0.5",
36
- "ts-node": "^10.9.1",
37
36
  "tsup": "^6.6.3",
38
37
  "typescript": "^4.9.5"
39
38
  },