@faasjs/request 1.1.0 → 1.2.0

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.d.mts CHANGED
@@ -30,6 +30,7 @@ type RequestOptions = {
30
30
  body?: {
31
31
  [key: string]: any;
32
32
  } | string;
33
+ /** Timeout in milliseconds, @default 5000 */
33
34
  timeout?: number;
34
35
  /**
35
36
  * The authentication credentials to use for the request.
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ type RequestOptions = {
30
30
  body?: {
31
31
  [key: string]: any;
32
32
  } | string;
33
+ /** Timeout in milliseconds, @default 5000 */
33
34
  timeout?: number;
34
35
  /**
35
36
  * The authentication credentials to use for the request.
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ async function request(url$1, {
115
115
  method: method ? method.toUpperCase() : "GET",
116
116
  path: uri.pathname + uri.search,
117
117
  port: uri.port || (uri.protocol === "https:" ? "443" : "80"),
118
- timeout,
118
+ timeout: timeout || 5e3,
119
119
  auth,
120
120
  pfx,
121
121
  passphrase,
package/dist/index.mjs CHANGED
@@ -92,7 +92,7 @@ async function request(url, {
92
92
  method: method ? method.toUpperCase() : "GET",
93
93
  path: uri.pathname + uri.search,
94
94
  port: uri.port || (uri.protocol === "https:" ? "443" : "80"),
95
- timeout,
95
+ timeout: timeout || 5e3,
96
96
  auth,
97
97
  pfx,
98
98
  passphrase,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/request",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,10 +21,10 @@
21
21
  "dist"
22
22
  ],
23
23
  "peerDependencies": {
24
- "@faasjs/logger": "1.1.0"
24
+ "@faasjs/logger": "1.2.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@faasjs/logger": "1.1.0"
27
+ "@faasjs/logger": "1.2.0"
28
28
  },
29
29
  "engines": {
30
30
  "npm": ">=9.0.0",