@gopowerteam/request 0.1.19 → 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 +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
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(
|
|
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(
|
|
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(
|