@e-mc/request 0.11.16 → 0.11.18
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/README.md +5 -5
- package/http/adapter/index.js +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/util.d.ts +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.11.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.11.18/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { IModule, ModuleConstructor } from "./index";
|
|
@@ -209,12 +209,12 @@ instance.get("http://hostname/path/config.yml", options).then(data => {
|
|
|
209
209
|
|
|
210
210
|
## References
|
|
211
211
|
|
|
212
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
213
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
214
|
-
- https://www.unpkg.com/@e-mc/types@0.11.
|
|
212
|
+
- https://www.unpkg.com/@e-mc/types@0.11.18/lib/http.d.ts
|
|
213
|
+
- https://www.unpkg.com/@e-mc/types@0.11.18/lib/request.d.ts
|
|
214
|
+
- https://www.unpkg.com/@e-mc/types@0.11.18/lib/settings.d.ts
|
|
215
215
|
|
|
216
216
|
* https://www.npmjs.com/package/@types/node
|
|
217
217
|
|
|
218
218
|
## LICENSE
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
MIT
|
package/http/adapter/index.js
CHANGED
|
@@ -375,7 +375,7 @@ class HttpAdapter {
|
|
|
375
375
|
if (updating) {
|
|
376
376
|
this.updateProgress(0, this.contentLength);
|
|
377
377
|
}
|
|
378
|
-
if (enabled && this.instance.readExpect === 'always' && !empty) {
|
|
378
|
+
if (enabled && this.instance.readExpect === 'always' && !empty || opts.throwsEmpty) {
|
|
379
379
|
this.terminate("No data received");
|
|
380
380
|
return;
|
|
381
381
|
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/request",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.18",
|
|
4
4
|
"description": "Request constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/module": "0.11.
|
|
24
|
-
"@e-mc/types": "0.11.
|
|
23
|
+
"@e-mc/module": "0.11.18",
|
|
24
|
+
"@e-mc/types": "0.11.18",
|
|
25
25
|
"combined-stream": "^1.0.8",
|
|
26
26
|
"js-yaml": "^4.1.1",
|
|
27
|
-
"picomatch": "^4.0.
|
|
27
|
+
"picomatch": "^4.0.4",
|
|
28
28
|
"which": "^4.0.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/util.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare namespace util {
|
|
|
13
13
|
function hasBasicAuth(value: string): boolean;
|
|
14
14
|
function checkRetryable(err: unknown): boolean;
|
|
15
15
|
function isRetryable(value: number, timeout?: boolean): boolean;
|
|
16
|
-
function parseHttpProxy(value?: string): HttpProxySettings | undefined;
|
|
16
|
+
function parseHttpProxy(value?: string, ignoreEnv?: boolean): HttpProxySettings | undefined;
|
|
17
17
|
function trimPath(value: string): string;
|
|
18
18
|
function asInt(value: unknown): number;
|
|
19
19
|
function asFloat(value: unknown): number;
|