@e-mc/request 0.11.9 → 0.11.11

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.
Files changed (3) hide show
  1. package/README.md +4 -4
  2. package/index.js +8 -4
  3. package/package.json +3 -3
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.9/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.11.11/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { IModule, ModuleConstructor } from "./index";
@@ -209,9 +209,9 @@ 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.9/lib/http.d.ts
213
- - https://www.unpkg.com/@e-mc/types@0.11.9/lib/request.d.ts
214
- - https://www.unpkg.com/@e-mc/types@0.11.9/lib/settings.d.ts
212
+ - https://www.unpkg.com/@e-mc/types@0.11.11/lib/http.d.ts
213
+ - https://www.unpkg.com/@e-mc/types@0.11.11/lib/request.d.ts
214
+ - https://www.unpkg.com/@e-mc/types@0.11.11/lib/settings.d.ts
215
215
 
216
216
  * https://www.npmjs.com/package/@types/node
217
217
 
package/index.js CHANGED
@@ -37,7 +37,7 @@ const kStatusOn = Symbol('statusOn');
37
37
  const kHeadersOn = Symbol('headersOn');
38
38
  const kAdapter = Symbol('adapter');
39
39
  const SUPPORTED_NODE20 = (0, types_1.supported)(20);
40
- const SUPPORTED_ZSTD = (0, types_1.supported)(23, 8) && typeof zlib.createZstdDecompress === 'function';
40
+ const SUPPORTED_ZSTD = (0, types_1.supported)(23, 8) || (0, types_1.supported)(22, 15, 0, true);
41
41
  const REGEXP_PEMCERT = /^-{3,}[ \t]*BEGIN[ \t].+\n-{3,}[ \t]*END[ \t][^-]+-{3,}$/s;
42
42
  const REGEXP_GLOBWITHIN = /\\\?|(?:(?<!\\)(?:\*|\[!?[^!\]]+\]|\{(?:[^,]+,)+[^}]+\}|[!?+*@]\((?:[^|]+\|)*[^)]+\)|\?.*\?|\?$))/;
43
43
  const HTTP = {
@@ -570,7 +570,7 @@ class Request extends module_1 {
570
570
  break;
571
571
  }
572
572
  if (expires !== undefined) {
573
- if (typeof expires === 'string') {
573
+ if ((0, types_1.isString)(expires)) {
574
574
  expires = (0, types_1.parseExpires)(expires);
575
575
  }
576
576
  if (expires >= 0) {
@@ -807,8 +807,12 @@ class Request extends module_1 {
807
807
  }
808
808
  break;
809
809
  case 'readExpect':
810
- if ((0, types_1.isString)(value)) {
811
- this[name] = value;
810
+ switch (value) {
811
+ case 'string':
812
+ case 'always':
813
+ case 'none':
814
+ this[name] = value;
815
+ break;
812
816
  }
813
817
  break;
814
818
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/request",
3
- "version": "0.11.9",
3
+ "version": "0.11.11",
4
4
  "description": "Request constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "license": "BSD-3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/module": "0.11.9",
24
- "@e-mc/types": "0.11.9",
23
+ "@e-mc/module": "0.11.11",
24
+ "@e-mc/types": "0.11.11",
25
25
  "combined-stream": "^1.0.8",
26
26
  "js-yaml": "^4.1.0",
27
27
  "picomatch": "^4.0.2",