keq 1.8.0 → 1.8.1
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/CHANGELOG.md +8 -0
- package/README.md +8 -8
- package/ava.config.mjs +5 -0
- package/doc/zh-cn/readme.md +7 -7
- package/index.ts +0 -4
- package/package.json +25 -27
- package/es/images/logo.svg +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +0 -5
- package/es/package.json +0 -93
- package/es/src/exception/exception.d.ts +0 -4
- package/es/src/exception/exception.js +0 -7
- package/es/src/exception/file-expected.exception.d.ts +0 -4
- package/es/src/exception/file-expected.exception.js +0 -6
- package/es/src/exception/file-expected.exception.ts +0 -8
- package/es/src/exception/index.d.ts +0 -4
- package/es/src/exception/index.js +0 -4
- package/es/src/exception/overwrite-array-body.exception.d.ts +0 -4
- package/es/src/exception/overwrite-array-body.exception.js +0 -6
- package/es/src/exception/overwrite-array-body.exception.ts +0 -8
- package/es/src/exception/unknow-content-type.exception.d.ts +0 -4
- package/es/src/exception/unknow-content-type.exception.js +0 -6
- package/es/src/exception/unknow-content-type.exception.ts +0 -8
- package/es/src/form-data-node/index.d.ts +0 -246
- package/es/src/form-data-node/index.js +0 -462
- package/es/src/form-data-node/util/boundary.d.ts +0 -5
- package/es/src/form-data-node/util/boundary.js +0 -7
- package/es/src/form-data-node/util/file.d.ts +0 -16
- package/es/src/form-data-node/util/file.js +0 -75
- package/es/src/form-data-node/util/get-length.d.ts +0 -11
- package/es/src/form-data-node/util/get-length.js +0 -43
- package/es/src/form-data-node/util/get-stream-iterator.d.ts +0 -9
- package/es/src/form-data-node/util/get-stream-iterator.js +0 -16
- package/es/src/form-data-node/util/get-type.d.ts +0 -11
- package/es/src/form-data-node/util/get-type.js +0 -27
- package/es/src/form-data-node/util/read-only.d.ts +0 -2
- package/es/src/form-data-node/util/read-only.js +0 -10
- package/es/src/form-data-node/util/readable-stream-iterator.d.ts +0 -9
- package/es/src/form-data-node/util/readable-stream-iterator.js +0 -31
- package/es/src/form-data-node/util/to-file.d.ts +0 -6
- package/es/src/form-data-node/util/to-file.js +0 -24
- package/es/src/index.d.ts +0 -7
- package/es/src/index.js +0 -7
- package/es/src/keq-url.d.ts +0 -9
- package/es/src/keq-url.js +0 -79
- package/es/src/keq.d.ts +0 -79
- package/es/src/keq.js +0 -395
- package/es/src/middleware.d.ts +0 -5
- package/es/src/middleware.js +0 -40
- package/es/src/mount.d.ts +0 -12
- package/es/src/mount.js +0 -55
- package/es/src/polyfill.d.ts +0 -6
- package/es/src/polyfill.js +0 -4
- package/es/src/request.d.ts +0 -1
- package/es/src/request.js +0 -2
- package/es/src/types/context.d.ts +0 -27
- package/es/src/types/context.js +0 -1
- package/es/src/types/index.d.ts +0 -10
- package/es/src/types/index.js +0 -10
- package/es/src/types/keq-body.d.ts +0 -1
- package/es/src/types/keq-body.js +0 -1
- package/es/src/types/middleware.d.ts +0 -4
- package/es/src/types/middleware.js +0 -1
- package/es/src/types/mounter.d.ts +0 -7
- package/es/src/types/mounter.js +0 -1
- package/es/src/types/options.d.ts +0 -49
- package/es/src/types/options.js +0 -1
- package/es/src/types/request-creator.d.ts +0 -26
- package/es/src/types/request-creator.js +0 -1
- package/es/src/types/request-method.d.ts +0 -1
- package/es/src/types/request-method.js +0 -1
- package/es/src/types/retry-callback.d.ts +0 -1
- package/es/src/types/retry-callback.js +0 -1
- package/es/src/types/serialize-body-fn.d.ts +0 -3
- package/es/src/types/serialize-body-fn.js +0 -1
- package/es/src/types/shorthand-content-type.d.ts +0 -1
- package/es/src/types/shorthand-content-type.js +0 -1
- package/es/src/util/clone.d.ts +0 -1
- package/es/src/util/clone.js +0 -14
- package/es/src/util/create-request.d.ts +0 -2
- package/es/src/util/create-request.js +0 -48
- package/es/src/util/encode-base64.d.ts +0 -1
- package/es/src/util/encode-base64.js +0 -4
- package/es/src/util/fix-content-type.d.ts +0 -2
- package/es/src/util/fix-content-type.js +0 -16
- package/es/src/util/get-boundary-by-content-type.d.ts +0 -1
- package/es/src/util/get-boundary-by-content-type.js +0 -10
- package/es/src/util/index.d.ts +0 -8
- package/es/src/util/index.js +0 -8
- package/es/src/util/infer-content-type-by-body.d.ts +0 -2
- package/es/src/util/infer-content-type-by-body.js +0 -7
- package/es/src/util/is/index.d.ts +0 -11
- package/es/src/util/is/index.js +0 -11
- package/es/src/util/is/is-blob.d.ts +0 -4
- package/es/src/util/is/is-blob.js +0 -16
- package/es/src/util/is/is-browser.d.ts +0 -1
- package/es/src/util/is/is-browser.js +0 -3
- package/es/src/util/is/is-file.d.ts +0 -1
- package/es/src/util/is/is-file.js +0 -7
- package/es/src/util/is/is-form-data.d.ts +0 -1
- package/es/src/util/is/is-form-data.js +0 -12
- package/es/src/util/is/is-function.d.ts +0 -1
- package/es/src/util/is/is-function.js +0 -3
- package/es/src/util/is/is-object.d.ts +0 -1
- package/es/src/util/is/is-object.js +0 -3
- package/es/src/util/is/is-read-stream.d.ts +0 -1
- package/es/src/util/is/is-read-stream.js +0 -12
- package/es/src/util/is/is-readable.d.ts +0 -1
- package/es/src/util/is/is-readable.js +0 -4
- package/es/src/util/is/is-stream.d.ts +0 -4
- package/es/src/util/is/is-stream.js +0 -9
- package/es/src/util/is/is-string.d.ts +0 -1
- package/es/src/util/is/is-string.js +0 -3
- package/es/src/util/is/is-whatwg-readable.d.ts +0 -10
- package/es/src/util/is/is-whatwg-readable.js +0 -20
- package/es/src/util/parse-form-data.d.ts +0 -1
- package/es/src/util/parse-form-data.js +0 -129
- package/es/src/util/serialize-body.d.ts +0 -6
- package/es/src/util/serialize-body.js +0 -53
- package/es/src/util/sleep.d.ts +0 -1
- package/es/src/util/sleep.js +0 -3
- package/lib/images/logo.svg +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -31
- package/lib/package.json +0 -93
- package/lib/src/exception/exception.d.ts +0 -4
- package/lib/src/exception/exception.js +0 -21
- package/lib/src/exception/file-expected.exception.d.ts +0 -4
- package/lib/src/exception/file-expected.exception.js +0 -20
- package/lib/src/exception/file-expected.exception.ts +0 -8
- package/lib/src/exception/index.d.ts +0 -4
- package/lib/src/exception/index.js +0 -30
- package/lib/src/exception/overwrite-array-body.exception.d.ts +0 -4
- package/lib/src/exception/overwrite-array-body.exception.js +0 -20
- package/lib/src/exception/overwrite-array-body.exception.ts +0 -8
- package/lib/src/exception/unknow-content-type.exception.d.ts +0 -4
- package/lib/src/exception/unknow-content-type.exception.js +0 -20
- package/lib/src/exception/unknow-content-type.exception.ts +0 -8
- package/lib/src/form-data-node/index.d.ts +0 -246
- package/lib/src/form-data-node/index.js +0 -474
- package/lib/src/form-data-node/util/boundary.d.ts +0 -5
- package/lib/src/form-data-node/util/boundary.js +0 -19
- package/lib/src/form-data-node/util/file.d.ts +0 -16
- package/lib/src/form-data-node/util/file.js +0 -87
- package/lib/src/form-data-node/util/get-length.d.ts +0 -11
- package/lib/src/form-data-node/util/get-length.js +0 -55
- package/lib/src/form-data-node/util/get-stream-iterator.d.ts +0 -9
- package/lib/src/form-data-node/util/get-stream-iterator.js +0 -28
- package/lib/src/form-data-node/util/get-type.d.ts +0 -11
- package/lib/src/form-data-node/util/get-type.js +0 -39
- package/lib/src/form-data-node/util/read-only.d.ts +0 -2
- package/lib/src/form-data-node/util/read-only.js +0 -22
- package/lib/src/form-data-node/util/readable-stream-iterator.d.ts +0 -9
- package/lib/src/form-data-node/util/readable-stream-iterator.js +0 -43
- package/lib/src/form-data-node/util/to-file.d.ts +0 -6
- package/lib/src/form-data-node/util/to-file.js +0 -36
- package/lib/src/index.d.ts +0 -7
- package/lib/src/index.js +0 -35
- package/lib/src/keq-url.d.ts +0 -9
- package/lib/src/keq-url.js +0 -93
- package/lib/src/keq.d.ts +0 -79
- package/lib/src/keq.js +0 -409
- package/lib/src/middleware.d.ts +0 -5
- package/lib/src/middleware.js +0 -57
- package/lib/src/mount.d.ts +0 -12
- package/lib/src/mount.js +0 -72
- package/lib/src/polyfill.d.ts +0 -6
- package/lib/src/polyfill.js +0 -20
- package/lib/src/request.d.ts +0 -1
- package/lib/src/request.js +0 -15
- package/lib/src/types/context.d.ts +0 -27
- package/lib/src/types/context.js +0 -12
- package/lib/src/types/index.d.ts +0 -10
- package/lib/src/types/index.js +0 -36
- package/lib/src/types/keq-body.d.ts +0 -1
- package/lib/src/types/keq-body.js +0 -12
- package/lib/src/types/middleware.d.ts +0 -4
- package/lib/src/types/middleware.js +0 -12
- package/lib/src/types/mounter.d.ts +0 -7
- package/lib/src/types/mounter.js +0 -12
- package/lib/src/types/options.d.ts +0 -49
- package/lib/src/types/options.js +0 -12
- package/lib/src/types/request-creator.d.ts +0 -26
- package/lib/src/types/request-creator.js +0 -12
- package/lib/src/types/request-method.d.ts +0 -1
- package/lib/src/types/request-method.js +0 -12
- package/lib/src/types/retry-callback.d.ts +0 -1
- package/lib/src/types/retry-callback.js +0 -12
- package/lib/src/types/serialize-body-fn.d.ts +0 -3
- package/lib/src/types/serialize-body-fn.js +0 -12
- package/lib/src/types/shorthand-content-type.d.ts +0 -1
- package/lib/src/types/shorthand-content-type.js +0 -12
- package/lib/src/util/clone.d.ts +0 -1
- package/lib/src/util/clone.js +0 -28
- package/lib/src/util/create-request.d.ts +0 -2
- package/lib/src/util/create-request.js +0 -62
- package/lib/src/util/encode-base64.d.ts +0 -1
- package/lib/src/util/encode-base64.js +0 -18
- package/lib/src/util/fix-content-type.d.ts +0 -2
- package/lib/src/util/fix-content-type.js +0 -30
- package/lib/src/util/get-boundary-by-content-type.d.ts +0 -1
- package/lib/src/util/get-boundary-by-content-type.js +0 -24
- package/lib/src/util/index.d.ts +0 -8
- package/lib/src/util/index.js +0 -34
- package/lib/src/util/infer-content-type-by-body.d.ts +0 -2
- package/lib/src/util/infer-content-type-by-body.js +0 -21
- package/lib/src/util/is/index.d.ts +0 -11
- package/lib/src/util/is/index.js +0 -37
- package/lib/src/util/is/is-blob.d.ts +0 -4
- package/lib/src/util/is/is-blob.js +0 -30
- package/lib/src/util/is/is-browser.d.ts +0 -1
- package/lib/src/util/is/is-browser.js +0 -17
- package/lib/src/util/is/is-file.d.ts +0 -1
- package/lib/src/util/is/is-file.js +0 -21
- package/lib/src/util/is/is-form-data.d.ts +0 -1
- package/lib/src/util/is/is-form-data.js +0 -26
- package/lib/src/util/is/is-function.d.ts +0 -1
- package/lib/src/util/is/is-function.js +0 -17
- package/lib/src/util/is/is-object.d.ts +0 -1
- package/lib/src/util/is/is-object.js +0 -17
- package/lib/src/util/is/is-read-stream.d.ts +0 -1
- package/lib/src/util/is/is-read-stream.js +0 -26
- package/lib/src/util/is/is-readable.d.ts +0 -1
- package/lib/src/util/is/is-readable.js +0 -18
- package/lib/src/util/is/is-stream.d.ts +0 -4
- package/lib/src/util/is/is-stream.js +0 -23
- package/lib/src/util/is/is-string.d.ts +0 -1
- package/lib/src/util/is/is-string.js +0 -17
- package/lib/src/util/is/is-whatwg-readable.d.ts +0 -10
- package/lib/src/util/is/is-whatwg-readable.js +0 -34
- package/lib/src/util/parse-form-data.d.ts +0 -1
- package/lib/src/util/parse-form-data.js +0 -143
- package/lib/src/util/serialize-body.d.ts +0 -6
- package/lib/src/util/serialize-body.js +0 -67
- package/lib/src/util/sleep.d.ts +0 -1
- package/lib/src/util/sleep.js +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.8.1](https://www.github.com/keq-request/keq/compare/v1.8.0...v1.8.1) (2022-04-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* cannot compile by vite ([2727867](https://www.github.com/keq-request/keq/commit/27278676f924428e2598b634577ed8b63a1e935b))
|
|
11
|
+
* wrong return of response.blob() ([ca5a5b5](https://www.github.com/keq-request/keq/commit/ca5a5b5bd64bdde6a476d7ce5e86b9833cd2a43b))
|
|
12
|
+
|
|
5
13
|
## [1.8.0](https://www.github.com/keq-request/keq/compare/v1.7.3...v1.8.0) (2022-03-22)
|
|
6
14
|
|
|
7
15
|
|
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ Add option `resolveWithFullResponse` to get the origin [`Response`][Response MD
|
|
|
91
91
|
import { request } from 'keq'
|
|
92
92
|
|
|
93
93
|
const response = await request
|
|
94
|
-
.get('http://
|
|
94
|
+
.get('http://test.com')
|
|
95
95
|
.option('resolveWithFullResponse')
|
|
96
96
|
|
|
97
97
|
const body = await response.json()
|
|
@@ -311,7 +311,7 @@ No retry by default, invoke `.retry(times[, initialTime[, callback]])` to set r
|
|
|
311
311
|
import { request } from 'keq'
|
|
312
312
|
|
|
313
313
|
await request
|
|
314
|
-
.get('http://
|
|
314
|
+
.get('http://test.com')
|
|
315
315
|
.retry(2, 1000, () => {})
|
|
316
316
|
```
|
|
317
317
|
|
|
@@ -324,7 +324,7 @@ Invoke `.option()` add options.
|
|
|
324
324
|
import { request } from 'keq'
|
|
325
325
|
|
|
326
326
|
await request
|
|
327
|
-
.get('http://
|
|
327
|
+
.get('http://test.com')
|
|
328
328
|
.option('resolveWithFullResponse')
|
|
329
329
|
.option('middlewareOption', 'value')
|
|
330
330
|
```
|
|
@@ -335,7 +335,7 @@ Or as a single object:
|
|
|
335
335
|
import { request } from 'keq'
|
|
336
336
|
|
|
337
337
|
await request
|
|
338
|
-
.get('http://
|
|
338
|
+
.get('http://test.com')
|
|
339
339
|
.options({
|
|
340
340
|
resolveWithFullResponse: true,
|
|
341
341
|
middlewareOption: 'value',
|
|
@@ -390,7 +390,7 @@ request
|
|
|
390
390
|
|
|
391
391
|
// Request Middleware
|
|
392
392
|
await request
|
|
393
|
-
.get('http://
|
|
393
|
+
.get('http://test.com')
|
|
394
394
|
.use(middleware)
|
|
395
395
|
```
|
|
396
396
|
|
|
@@ -416,7 +416,7 @@ Keq's context object has many parameters. The following lists all the built-in c
|
|
|
416
416
|
**Property** | **Type**
|
|
417
417
|
:-----------------------------|:------------------------------------
|
|
418
418
|
`context.request` | Includes request options for Fetch API.
|
|
419
|
-
`context.request.url` | The return type of `url.parse('http://
|
|
419
|
+
`context.request.url` | The return type of `url.parse('http://test.com', true)`.
|
|
420
420
|
`context.request.method` | One of 'get', 'post', 'put', 'patch', 'head', 'delete'.
|
|
421
421
|
`context.request.body` | Object, Array, Stream, Blob or undefined.
|
|
422
422
|
`context.request.headers` | The [`Headers`][Headers MDN] Object.
|
|
@@ -454,7 +454,7 @@ const customRequest = request.create()
|
|
|
454
454
|
customRequest.use(/** some middleware */)
|
|
455
455
|
|
|
456
456
|
const body = await customRequest
|
|
457
|
-
.get('http://
|
|
457
|
+
.get('http://test.com')
|
|
458
458
|
```
|
|
459
459
|
|
|
460
460
|
> The gloabl request instance is created by `request.create()` too.
|
|
@@ -477,7 +477,7 @@ The difference between the two is that when called multiple times.
|
|
|
477
477
|
```javascript
|
|
478
478
|
import { request } from 'keq'
|
|
479
479
|
|
|
480
|
-
const keq = request.get('http://
|
|
480
|
+
const keq = request.get('http://test.com')
|
|
481
481
|
|
|
482
482
|
keq.then(onfulfilled, onrejected)
|
|
483
483
|
// Won't send request, and will use the last request result.
|
package/ava.config.mjs
ADDED
package/doc/zh-cn/readme.md
CHANGED
|
@@ -90,7 +90,7 @@ await request.del('https://example.com/search')
|
|
|
90
90
|
import { request } from 'keq'
|
|
91
91
|
|
|
92
92
|
const response = await request
|
|
93
|
-
.get('http://
|
|
93
|
+
.get('http://test.com')
|
|
94
94
|
.option('resolveWithFullResponse')
|
|
95
95
|
|
|
96
96
|
const body = await response.json()
|
|
@@ -301,7 +301,7 @@ await request
|
|
|
301
301
|
import { request } from 'keq'
|
|
302
302
|
|
|
303
303
|
await request
|
|
304
|
-
.get('http://
|
|
304
|
+
.get('http://test.com')
|
|
305
305
|
.option('resolveWithFullResponse')
|
|
306
306
|
.option('middlewareOption', 'value')
|
|
307
307
|
```
|
|
@@ -312,7 +312,7 @@ await request
|
|
|
312
312
|
import { request } from 'keq'
|
|
313
313
|
|
|
314
314
|
await request
|
|
315
|
-
.get('http://
|
|
315
|
+
.get('http://test.com')
|
|
316
316
|
.options({
|
|
317
317
|
resolveWithFullResponse: true,
|
|
318
318
|
middlewareOption: 'value',
|
|
@@ -353,7 +353,7 @@ request
|
|
|
353
353
|
|
|
354
354
|
// Request Middleware
|
|
355
355
|
await request
|
|
356
|
-
.get('http://
|
|
356
|
+
.get('http://test.com')
|
|
357
357
|
.use(middleware)
|
|
358
358
|
```
|
|
359
359
|
|
|
@@ -379,7 +379,7 @@ Keq的上下文对象有许多可以修改和使用的参数,下面列出了
|
|
|
379
379
|
**Property** | **Type**
|
|
380
380
|
:-----------------------------|:------------------------------------
|
|
381
381
|
`context.request` | 发送fetch请求的参数。
|
|
382
|
-
`context.request.url` | 请求地址,是一个`URL`对象,通过`url.parse('http://
|
|
382
|
+
`context.request.url` | 请求地址,是一个`URL`对象,通过`url.parse('http://test.com', true)`创建。
|
|
383
383
|
`context.request.method` | Request method。
|
|
384
384
|
`context.request.body` | 请求体,根据发送请求的不同,其结构可能是:`Object`(json/form-data/x-www-form-urlencoded), Array(json), Stream(NodeJS发送二进制文件), Blob(浏览器中发送二进制文件), undefined(未携带请求体)中的任意一种。
|
|
385
385
|
`context.request.headers` | 请求头[`Headers`][Headers MDN]对象。
|
|
@@ -409,7 +409,7 @@ Keq的上下文对象有许多可以修改和使用的参数,下面列出了
|
|
|
409
409
|
```javascript
|
|
410
410
|
import { request } from 'keq'
|
|
411
411
|
|
|
412
|
-
const keq = request.get('http://
|
|
412
|
+
const keq = request.get('http://test.com')
|
|
413
413
|
|
|
414
414
|
keq.then(onfulfilled, onrejected)
|
|
415
415
|
// Won't send request, and will use the last request result.
|
|
@@ -438,7 +438,7 @@ const customRequest = request.create()
|
|
|
438
438
|
customRequest.use(/** some middleware */)
|
|
439
439
|
|
|
440
440
|
const body = await customRequest
|
|
441
|
-
.get('http://
|
|
441
|
+
.get('http://test.com')
|
|
442
442
|
```
|
|
443
443
|
|
|
444
444
|
> 全局的`request`实例也是调用`request.create()`方法创建的。
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "keq",
|
|
3
3
|
"main": "lib/index.js",
|
|
4
4
|
"module": "es/index.js",
|
|
5
|
-
"version": "1.8.
|
|
5
|
+
"version": "1.8.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -16,58 +16,56 @@
|
|
|
16
16
|
"release": "standard-version",
|
|
17
17
|
"release:alpha": "standard-version --prerelease alpha",
|
|
18
18
|
"release:first": "standard-version --first-release",
|
|
19
|
-
"prepublishOnly": "npm run build",
|
|
20
19
|
"clean": "rm -rf ./lib/*",
|
|
21
20
|
"prebuild": "npm run clean",
|
|
22
|
-
"build:es": "ttsc -p build/tsconfig.es.json
|
|
23
|
-
"build:lib": "ttsc -p build/tsconfig.lib.json
|
|
21
|
+
"build:es": "ttsc -p build/tsconfig.es.json",
|
|
22
|
+
"build:lib": "ttsc -p build/tsconfig.lib.json",
|
|
24
23
|
"build": "npm run build:lib && npm run build:es",
|
|
25
24
|
"watch": "NODE_ENV=development ttsc -p build/tsconfig.lib.json -w",
|
|
26
|
-
"
|
|
27
|
-
"copyfile:lib": "copyfiles -e \"@(build|es|lib|node_modules|tests|doc)/**/*.!(ts)\" -e \"@(README.md|CHANGELOG.md|ava.config.js|backers.md)\" \"**/*.!(ts)\" lib",
|
|
28
|
-
"prewatch": "npm run copyfile:lib",
|
|
29
|
-
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix",
|
|
25
|
+
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix --quiet",
|
|
30
26
|
"prepare": "is-ci || husky install"
|
|
31
27
|
},
|
|
32
28
|
"devDependencies": {
|
|
33
|
-
"@commitlint/cli": "^
|
|
34
|
-
"@commitlint/config-conventional": "^
|
|
29
|
+
"@commitlint/cli": "^16.2.3",
|
|
30
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
35
31
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
36
|
-
"@types/sinon": "^
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "
|
|
38
|
-
"@typescript-eslint/parser": "
|
|
32
|
+
"@types/sinon": "^10.0.11",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "4",
|
|
34
|
+
"@typescript-eslint/parser": "4",
|
|
39
35
|
"ajv": "^8",
|
|
40
|
-
"ava": "^
|
|
36
|
+
"ava": "^4.2.0",
|
|
41
37
|
"commitizen": "^4.2.4",
|
|
42
|
-
"copyfiles": "^2.4.1",
|
|
43
38
|
"coveralls": "^3.1.0",
|
|
44
39
|
"cz-conventional-changelog": "^3.3.0",
|
|
45
|
-
"eslint": "
|
|
46
|
-
"husky": "^
|
|
40
|
+
"eslint": "7",
|
|
41
|
+
"husky": "^7.0.4",
|
|
47
42
|
"is-ci": "^3.0.0",
|
|
48
|
-
"lint-staged": "^
|
|
43
|
+
"lint-staged": "^12.4.0",
|
|
49
44
|
"mili": "^4",
|
|
50
45
|
"nyc": "^15.1.0",
|
|
51
|
-
"sinon": "^
|
|
46
|
+
"sinon": "^13.0.2",
|
|
52
47
|
"standard-version": "^9.3.0",
|
|
53
|
-
"ts-node": "^
|
|
54
|
-
"ttypescript": "^1.5.
|
|
55
|
-
"typescript": "
|
|
56
|
-
"typescript-transform-paths": "^
|
|
48
|
+
"ts-node": "^10.7.0",
|
|
49
|
+
"ttypescript": "^1.5.13",
|
|
50
|
+
"typescript": "~4.6.3",
|
|
51
|
+
"typescript-transform-paths": "^3.3.1"
|
|
57
52
|
},
|
|
58
53
|
"dependencies": {
|
|
59
|
-
"@types/
|
|
54
|
+
"@types/minimatch": "^3.0.5",
|
|
55
|
+
"@types/node": "^14.18.13",
|
|
60
56
|
"@types/whatwg-url": "^8.2.1",
|
|
61
57
|
"blob": "^0.1.0",
|
|
62
58
|
"clone": "^2.1.2",
|
|
63
|
-
"
|
|
59
|
+
"form-data-encoder": "^1.7.2",
|
|
60
|
+
"formdata-node": "^4.3.2",
|
|
61
|
+
"formdata-polyfill": "^4.0.10",
|
|
64
62
|
"formidable": "^2.0.1",
|
|
65
63
|
"mime-types": "^2.1.27",
|
|
64
|
+
"minimatch": "^5.0.1",
|
|
66
65
|
"nanoid": "^3.1.10",
|
|
66
|
+
"node-fetch": "2",
|
|
67
67
|
"object.fromentries": "^2.0.5",
|
|
68
68
|
"path-to-regexp": "^6.2.0",
|
|
69
|
-
"picomatch": "^2.2.2",
|
|
70
|
-
"querystring": "^0.2.0",
|
|
71
69
|
"ts-custom-error": "^3.2.0",
|
|
72
70
|
"whatwg-url": "^11.0.0"
|
|
73
71
|
},
|
package/es/images/logo.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg enable-background="new 0 0 430 430" height="512" viewBox="0 0 430 430" width="512" xmlns="http://www.w3.org/2000/svg"><g id="isometric"><g><path d="m270.5 279-37-16.8-185 83.7 37 16.7 74-33.4 37 16.7 37-16.7-37-16.8z" fill="#597ba1"/><path d="m196.5 379.3 37-16.7-37-16.7-37 16.7z" fill="#597ba1"/><path d="m196.5 412.8 37-16.7-37-16.8-37 16.8z" fill="#597ba1"/><path d="m233.5 329.2 37 16.7 37-16.7-37-16.8z" fill="#597ba1"/><path d="m307.5 329.2 37 16.7 37-16.7-37-16.8z" fill="#597ba1"/><g fill="#0f4c81"><path d="m196.5 312.4v33.5l37-16.7z"/><path d="m196.5 379.3 37-16.7-37-16.7z"/><path d="m196.5 412.8 37-16.7-37-16.8z"/><path d="m270.5 345.9 37-16.7-37-16.8z"/><path d="m344.5 312.4v33.5l37-16.7z"/><path d="m233.5 262.2v33.5l37-16.7z"/></g><g fill="#597ba1"><path d="m270.5 35-74 33.4 37 16.8 37-16.8z"/><path d="m196.5 101.9 37 16.7v-33.4z"/><path d="m196.5 135.4 37 16.7v-33.5z"/><path d="m196.5 168.8v41.8l37-16.7v-41.8z"/><path d="m270.5 101.9v41.8l37-16.8v-41.7z"/><path d="m344.5 101.9v41.8l37-16.8v-41.7z"/><path d="m159.5 85.2-74 33.4v41.8l74-33.5z"/></g><path d="m159.5 85.2v33.4l37-16.7z" fill="#0f4c81"/><path d="m159.5 118.6v33.5l37-16.7z" fill="#0f4c81"/><path d="m159.5 152.1v41.8l37 16.7v-41.8z" fill="#0f4c81"/><path d="m48.5 101.9v41.8l37 16.7v-41.8z" fill="#0f4c81"/><path d="m233.5 85.2v41.7l37 16.8v-41.8z" fill="#0f4c81"/><path d="m307.5 85.2v41.7l37 16.8v-41.8z" fill="#0f4c81"/><path d="m270.5 35-37-16.8-185 83.7 37 16.7 74-33.4 37 16.7 37-16.7-37-16.8z" fill="#c6d1e0"/><path d="m196.5 135.3 37-16.7-37-16.7-37 16.7z" fill="#c6d1e0"/><path d="m196.5 168.8 37-16.7-37-16.8-37 16.8z" fill="#c6d1e0"/><path d="m233.5 85.2 37 16.7 37-16.7-37-16.8z" fill="#c6d1e0"/><path d="m307.5 85.2 37 16.7 37-16.7-37-16.8z" fill="#c6d1e0"/></g></g><g id="black"><g><path d="m382.9 326.4-37-16.7c-.9-.4-2-.4-2.9 0l-35.6 16.1-35.6-16.1c-.9-.4-2-.4-2.9 0l-35.6 16.1-28.3-12.9 29.9-13.5 37-16.7c2.7-1.1 2.7-5.3 0-6.4l-37-16.7c-.9-.4-2-.4-2.9 0l-185 83.6c-2.7 1.1-2.7 5.3 0 6.4 0 0 37 16.7 37 16.7.5.2 1 .3 1.4.3s1-.1 1.4-.3l72.6-32.8 28.5 12.9-29.9 13.5c-1.3.6-2.1 1.8-2.1 3.2s.8 2.6 2.1 3.2l29.9 13.5-29.9 13.5c-2.7 1.1-2.7 5.3 0 6.4 0 0 37 16.7 37 16.7.9.4 2 .4 2.9 0l37-16.7c2.7-1.1 2.7-5.3 0-6.4l-29.9-13.5 29.9-13.5c1.3-.6 2.1-1.8 2.1-3.2s-.8-2.6-2.1-3.2l-29.9-13.6 28.5-12.9 35.6 16.1c.5.2.9.3 1.4.3s1-.1 1.4-.3l35.6-16.1 35.6 16.1c.5.2 1 .3 1.4.3s1-.1 1.4-.3l37-16.7c2.7-1.1 2.7-5.3 0-6.4zm-157.9 70.1-28.5 12.9-28.5-12.9 25.1-11.3v12.1c0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5v-12zm0-33.4-28.5 12.9-28.5-12.9 25.1-11.3v11.5c0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5v-11.4zm-28.5-20.6-35.6-16.1c-.9-.4-2-.4-2.9 0l-72.6 32.8-28.4-12.9 173-78.2v12.1c0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5v-12.1l25 11.3-66.9 30.3c-1.4.6-2.3 2.3-2 3.8v16.5c.1 4.6 6.9 4.6 7 0v-11.6l24.9 11.3zm74 0-28.5-12.9 25-11.3v11.7c0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5v-11.7l25 11.3zm74 0-28.5-12.9 25-11.3v11.7c0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5v-11.7l25 11.3z"/><path d="m48.5 189.7c1.7 0 3-1.3 3-3v-18.2c0-1.7-1.3-3-3-3s-3 1.3-3 3v18.2c0 1.7 1.3 3 3 3z"/><path d="m307.5 168.2c1.7 0 3-1.3 3-3v-18.2c0-1.7-1.3-3-3-3s-3 1.3-3 3v18.2c0 1.7 1.3 3 3 3z"/><path d="m384.5 147.1c0-1.7-1.3-3-3-3s-3 1.3-3 3v18.2c0 1.7 1.3 3 3 3s3-1.3 3-3z"/><path d="m344.5 220.6c1.7 0 3-1.3 3-3v-54.2c0-1.7-1.3-3-3-3s-3 1.3-3 3v54.2c0 1.6 1.3 3 3 3z"/><path d="m341.5 244.6c0 1.7 1.3 3 3 3s3-1.3 3-3v-9.1c0-1.7-1.3-3-3-3s-3 1.3-3 3z"/><path d="m85.3 239.1c1.7 0 3-1.3 3-3v-53.2c0-1.7-1.3-3-3-3s-3 1.3-3 3v53.2c0 1.7 1.4 3 3 3z"/><path d="m82.3 263.1c0 1.7 1.3 3 3 3s3-1.3 3-3v-9.1c0-1.7-1.3-3-3-3s-3 1.3-3 3z"/><circle cx="381.5" cy="182.4" r="3"/><circle cx="307.5" cy="182.4" r="3"/><path d="m48.5 206.9c1.7 0 3-1.3 3-3s-1.3-3-3-3-3 1.3-3 3 1.3 3 3 3z"/><path d="m383.6 80.6-37-16.7c-.7-.3-1.4-.4-2.1-.4s-1.4.1-2.1.4l-34.9 15.8-32-14.5v-30.2c0-2-1.2-3.7-2.9-4.6l-37-16.7c-.7-.3-1.4-.4-2.1-.4s-1.4.1-2.1.4l-185 83.6c-1.8.8-2.9 2.6-2.9 4.6v41.8c0 2 1.2 3.7 2.9 4.6l37 16.7c.7.3 1.4.4 2.1.4s1.4-.1 2.1-.4l66.9-30.3v59.2c0 2 1.2 3.7 2.9 4.6l37 16.7c.7.3 1.4.4 2.1.4s1.4-.1 2.1-.4l37-16.7c1.8-.8 2.9-2.6 2.9-4.6v-59.2l29.9 13.5c.7.3 1.4.4 2.1.4s1.4-.1 2.1-.4l34.9-15.8 34.9 15.8c.7.3 1.4.4 2.1.4s1.4-.1 2.1-.4l37-16.7c1.8-.8 2.9-2.6 2.9-4.6v-41.7c0-2-1.2-3.8-2.9-4.6zm-300.1 76.7-33-14.9v-37.4l33 14.9zm74-31.6-70 31.6v-37.4l65.6-29.6 4.4-2zm2.2-42.5c-.4-.1-.7 0-1.1.2l-73.2 33.1-32.1-14.5 180.1-81.4 32.2 14.4-70 31.6c-1.5.6-1.5 3 0 3.6l33 14.9-32.1 14.5-36.2-16.4c-.2.1-.3 0-.6 0zm4.7 35.4 32.1-14.5 32.1 14.5-32.1 14.5zm27.2 16.8-30.1 13.6v-22-5.2zm-30.1-19.9v-27.2l30.1 13.6zm33 92-33-14.9v-37.4l33 14.9zm2-40.9-32.1-14.5 32.1-14.5 32.1 14.5zm35 26-33 14.9v-37.4l33-14.9zm0-43.6-30.1-13.6 30.1-13.6zm0-33.5-30.1-13.6 30.1-13.6zm-30.1-47.1 67.1-30.4v29.1l-35 15.8zm67.1 72.2-33-14.9v-7-30.4l33 14.9zm-30.1-55.4 32.1-14.5 32.1 14.5-32.1 14.5zm67.1 40.5-33 14.9v-37.4l33-14.9zm37 14.9-33-14.9v-37.4l33 14.9zm-30.2-55.4 32.1-14.5 32.1 14.5c-1.7.8-29.5 13.4-32.1 14.5zm67.2 40.5-33 14.9v-37.4c1.4-.6 32.5-14.7 33-14.9z"/></g></g></svg>
|
package/es/index.d.ts
DELETED
package/es/index.js
DELETED
package/es/package.json
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "keq",
|
|
3
|
-
"main": "lib/index.js",
|
|
4
|
-
"module": "es/index.js",
|
|
5
|
-
"version": "1.8.0",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"test": "ava",
|
|
10
|
-
"test:debug": "ava --verbose",
|
|
11
|
-
"test:update": "ava -u",
|
|
12
|
-
"report": "nyc --reporter=html --reporter=text-summary --skip-full ava",
|
|
13
|
-
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
|
14
|
-
"ci": "git-cz",
|
|
15
|
-
"ca": "git add -A && git-cz -av",
|
|
16
|
-
"release": "standard-version",
|
|
17
|
-
"release:alpha": "standard-version --prerelease alpha",
|
|
18
|
-
"release:first": "standard-version --first-release",
|
|
19
|
-
"prepublishOnly": "npm run build",
|
|
20
|
-
"clean": "rm -rf ./lib/*",
|
|
21
|
-
"prebuild": "npm run clean",
|
|
22
|
-
"build:es": "ttsc -p build/tsconfig.es.json && npm run copyfile:es",
|
|
23
|
-
"build:lib": "ttsc -p build/tsconfig.lib.json && npm run copyfile:lib",
|
|
24
|
-
"build": "npm run build:lib && npm run build:es",
|
|
25
|
-
"watch": "NODE_ENV=development ttsc -p build/tsconfig.lib.json -w",
|
|
26
|
-
"copyfile:es": "copyfiles -e \"@(build|es|lib|node_modules|tests|doc)/**/*.!(ts)\" -e \"@(README.md|CHANGELOG.md|ava.config.js|backers.md)\" \"**/*.!(ts)\" es",
|
|
27
|
-
"copyfile:lib": "copyfiles -e \"@(build|es|lib|node_modules|tests|doc)/**/*.!(ts)\" -e \"@(README.md|CHANGELOG.md|ava.config.js|backers.md)\" \"**/*.!(ts)\" lib",
|
|
28
|
-
"prewatch": "npm run copyfile:lib",
|
|
29
|
-
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix",
|
|
30
|
-
"prepare": "is-ci || husky install"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@commitlint/cli": "^12.1.4",
|
|
34
|
-
"@commitlint/config-conventional": "^12.1.4",
|
|
35
|
-
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
36
|
-
"@types/sinon": "^9.0.4",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^4.15.2",
|
|
38
|
-
"@typescript-eslint/parser": "^4.15.2",
|
|
39
|
-
"ajv": "^8",
|
|
40
|
-
"ava": "^3.10.1",
|
|
41
|
-
"commitizen": "^4.2.4",
|
|
42
|
-
"copyfiles": "^2.4.1",
|
|
43
|
-
"coveralls": "^3.1.0",
|
|
44
|
-
"cz-conventional-changelog": "^3.3.0",
|
|
45
|
-
"eslint": "^7.20.0",
|
|
46
|
-
"husky": "^5.2.0",
|
|
47
|
-
"is-ci": "^3.0.0",
|
|
48
|
-
"lint-staged": "^11.0.0",
|
|
49
|
-
"mili": "^4",
|
|
50
|
-
"nyc": "^15.1.0",
|
|
51
|
-
"sinon": "^10.0.0",
|
|
52
|
-
"standard-version": "^9.3.0",
|
|
53
|
-
"ts-node": "^9.1.1",
|
|
54
|
-
"ttypescript": "^1.5.12",
|
|
55
|
-
"typescript": "^4.2.2",
|
|
56
|
-
"typescript-transform-paths": "^2.2.3"
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"@types/node": "^14.14.31",
|
|
60
|
-
"@types/whatwg-url": "^8.2.1",
|
|
61
|
-
"blob": "^0.1.0",
|
|
62
|
-
"clone": "^2.1.2",
|
|
63
|
-
"cross-fetch": "^3.0.6",
|
|
64
|
-
"formidable": "^2.0.1",
|
|
65
|
-
"mime-types": "^2.1.27",
|
|
66
|
-
"nanoid": "^3.1.10",
|
|
67
|
-
"object.fromentries": "^2.0.5",
|
|
68
|
-
"path-to-regexp": "^6.2.0",
|
|
69
|
-
"picomatch": "^2.2.2",
|
|
70
|
-
"querystring": "^0.2.0",
|
|
71
|
-
"ts-custom-error": "^3.2.0",
|
|
72
|
-
"whatwg-url": "^11.0.0"
|
|
73
|
-
},
|
|
74
|
-
"description": "Request API write by Typescript for flexibility, readability, and a low learning curve.",
|
|
75
|
-
"directories": {
|
|
76
|
-
"doc": "doc",
|
|
77
|
-
"lib": "lib",
|
|
78
|
-
"test": "tests"
|
|
79
|
-
},
|
|
80
|
-
"repository": {
|
|
81
|
-
"type": "git",
|
|
82
|
-
"url": "git+https://github.com/Val-istar-Guo/keq.git"
|
|
83
|
-
},
|
|
84
|
-
"keywords": [
|
|
85
|
-
"request",
|
|
86
|
-
"superagent"
|
|
87
|
-
],
|
|
88
|
-
"author": "Val.istar.Guo <val.istar.guo@gmail.com>",
|
|
89
|
-
"bugs": {
|
|
90
|
-
"url": "https://github.com/Val-istar-Guo/keq/issues"
|
|
91
|
-
},
|
|
92
|
-
"homepage": "https://github.com/Val-istar-Guo/keq#readme"
|
|
93
|
-
}
|