bajo-extra 1.1.7 → 1.1.8
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/package.json +1 -1
- package/plugin/factory.js +6 -3
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -2,7 +2,7 @@ import bcrypt from 'bcrypt'
|
|
|
2
2
|
import crypto from 'crypto'
|
|
3
3
|
import { createGzip, createGunzip } from 'zlib'
|
|
4
4
|
import path from 'path'
|
|
5
|
-
import { fetch } from 'undici'
|
|
5
|
+
import { fetch, Agent } from 'undici'
|
|
6
6
|
import { Readable } from 'stream'
|
|
7
7
|
import numbro from 'numbro'
|
|
8
8
|
import { ShortCrypt } from 'short-crypt'
|
|
@@ -118,7 +118,10 @@ async function factory (pkgName) {
|
|
|
118
118
|
this.config = {
|
|
119
119
|
secret: 'hxKY8Eh63Op9js6ovU25qmq2DmCE9dIB',
|
|
120
120
|
fetch: {
|
|
121
|
-
agent: {
|
|
121
|
+
agent: {
|
|
122
|
+
autoSelectFamilyAttemptTimeout: 1000,
|
|
123
|
+
autoSelectFamily: true
|
|
124
|
+
}
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
}
|
|
@@ -271,7 +274,7 @@ async function factory (pkgName) {
|
|
|
271
274
|
if (!has(extra, 'cacheBuster')) extra.cacheBuster = true
|
|
272
275
|
if (extra.cacheBuster) opts.query[extra.cacheBusterKey ?? '_'] = Date.now()
|
|
273
276
|
if (this.config.fetch.agent || extra.agent) {
|
|
274
|
-
|
|
277
|
+
opts.dispatcher = new Agent(extra.agent ?? this.config.fetch.agent)
|
|
275
278
|
}
|
|
276
279
|
if (opts.body && extra.formData) {
|
|
277
280
|
const formData = new FormData()
|