@npora/request 0.2.1 → 0.4.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/README.md +6 -6
- package/dist/index.cjs +14 -77
- package/dist/index.d.cts +0 -24
- package/dist/index.d.ts +0 -24
- package/dist/index.js +14 -77
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -187,8 +187,8 @@ const user = await request.get<User>('/users/1', {
|
|
|
187
187
|
})
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
Plugin configuration belongs under `extensions`.
|
|
191
|
-
|
|
190
|
+
Plugin configuration belongs under `extensions`. Top-level plugin fields are
|
|
191
|
+
not part of `RequestConfig`.
|
|
192
192
|
|
|
193
193
|
---
|
|
194
194
|
|
|
@@ -293,12 +293,12 @@ Supported runtimes:
|
|
|
293
293
|
- Chrome
|
|
294
294
|
- Edge
|
|
295
295
|
- Safari
|
|
296
|
-
- Node.js
|
|
296
|
+
- Node.js 22+
|
|
297
297
|
- Web Workers
|
|
298
298
|
|
|
299
|
-
Automated runtime coverage uses Node.js
|
|
300
|
-
browser tests for Chromium and WebKit. Firefox is
|
|
301
|
-
verification scope.
|
|
299
|
+
Automated runtime coverage uses Node.js 22, 24, and 26 integration and package
|
|
300
|
+
tests plus Playwright browser tests for Chromium and WebKit. Firefox is
|
|
301
|
+
outside the current verification scope.
|
|
302
302
|
|
|
303
303
|
Internet Explorer is **not supported**.
|
|
304
304
|
|
package/dist/index.cjs
CHANGED
|
@@ -542,42 +542,6 @@ var ConfigMerger = class {
|
|
|
542
542
|
config.extensions
|
|
543
543
|
);
|
|
544
544
|
}
|
|
545
|
-
if (defaults.retry !== void 0 || config.retry !== void 0) {
|
|
546
|
-
result.retry = this.mergeRetry(
|
|
547
|
-
defaults.retry,
|
|
548
|
-
config.retry
|
|
549
|
-
);
|
|
550
|
-
}
|
|
551
|
-
if (defaults.cache || config.cache) {
|
|
552
|
-
result.cache = this.mergeObject(
|
|
553
|
-
defaults.cache,
|
|
554
|
-
config.cache
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
if (defaults.auth || config.auth) {
|
|
558
|
-
result.auth = this.mergeObject(
|
|
559
|
-
defaults.auth,
|
|
560
|
-
config.auth
|
|
561
|
-
);
|
|
562
|
-
}
|
|
563
|
-
if (defaults.logger || config.logger) {
|
|
564
|
-
result.logger = this.mergeObject(
|
|
565
|
-
defaults.logger,
|
|
566
|
-
config.logger
|
|
567
|
-
);
|
|
568
|
-
}
|
|
569
|
-
if (defaults.upload || config.upload) {
|
|
570
|
-
result.upload = this.mergeObject(
|
|
571
|
-
defaults.upload,
|
|
572
|
-
config.upload
|
|
573
|
-
);
|
|
574
|
-
}
|
|
575
|
-
if (defaults.download || config.download) {
|
|
576
|
-
result.download = this.mergeObject(
|
|
577
|
-
defaults.download,
|
|
578
|
-
config.download
|
|
579
|
-
);
|
|
580
|
-
}
|
|
581
545
|
if (this.hasBodyConfig(defaults) || this.hasBodyConfig(config)) {
|
|
582
546
|
Object.assign(
|
|
583
547
|
result,
|
|
@@ -646,21 +610,6 @@ var ConfigMerger = class {
|
|
|
646
610
|
...value
|
|
647
611
|
};
|
|
648
612
|
}
|
|
649
|
-
static mergeRetry(defaults, retry) {
|
|
650
|
-
if (retry === void 0) {
|
|
651
|
-
return defaults;
|
|
652
|
-
}
|
|
653
|
-
if (typeof retry === "number") {
|
|
654
|
-
return retry;
|
|
655
|
-
}
|
|
656
|
-
const normalizedDefaults = typeof defaults === "number" ? {
|
|
657
|
-
retries: defaults
|
|
658
|
-
} : defaults;
|
|
659
|
-
return {
|
|
660
|
-
...normalizedDefaults,
|
|
661
|
-
...retry
|
|
662
|
-
};
|
|
663
|
-
}
|
|
664
613
|
static mergeExtensions(defaults, extensions) {
|
|
665
614
|
if (!defaults && !extensions) {
|
|
666
615
|
return void 0;
|
|
@@ -1438,8 +1387,8 @@ function createClient(options = {}) {
|
|
|
1438
1387
|
}
|
|
1439
1388
|
|
|
1440
1389
|
// src/plugins/resolveExtensionConfig.ts
|
|
1441
|
-
function resolveExtensionConfig(config, key
|
|
1442
|
-
return config.extensions?.[key]
|
|
1390
|
+
function resolveExtensionConfig(config, key) {
|
|
1391
|
+
return config.extensions?.[key];
|
|
1443
1392
|
}
|
|
1444
1393
|
|
|
1445
1394
|
// src/plugins/authPlugin.ts
|
|
@@ -1519,8 +1468,7 @@ async function applyAuthorization(config, options) {
|
|
|
1519
1468
|
async function resolveAuthorization(config, options, tokenOverride) {
|
|
1520
1469
|
const requestAuth = resolveExtensionConfig(
|
|
1521
1470
|
config,
|
|
1522
|
-
"auth"
|
|
1523
|
-
config.auth
|
|
1471
|
+
"auth"
|
|
1524
1472
|
);
|
|
1525
1473
|
const token = tokenOverride ?? (requestAuth?.token ? await resolveToken(requestAuth.token) : await resolvePluginToken(options));
|
|
1526
1474
|
return {
|
|
@@ -1585,8 +1533,7 @@ function cachePlugin(options = {}) {
|
|
|
1585
1533
|
syncGeneration();
|
|
1586
1534
|
const cache = resolveExtensionConfig(
|
|
1587
1535
|
requestContext.config,
|
|
1588
|
-
"cache"
|
|
1589
|
-
requestContext.config.cache
|
|
1536
|
+
"cache"
|
|
1590
1537
|
);
|
|
1591
1538
|
if (!cache?.enabled || !isCacheableRequest(requestContext.config, methods)) {
|
|
1592
1539
|
return;
|
|
@@ -1621,8 +1568,7 @@ function cachePlugin(options = {}) {
|
|
|
1621
1568
|
}
|
|
1622
1569
|
const cache = resolveExtensionConfig(
|
|
1623
1570
|
requestContext.config,
|
|
1624
|
-
"cache"
|
|
1625
|
-
requestContext.config.cache
|
|
1571
|
+
"cache"
|
|
1626
1572
|
);
|
|
1627
1573
|
if (!cache?.enabled || !requestContext.response || !isCacheableRequest(requestContext.config, methods)) {
|
|
1628
1574
|
return;
|
|
@@ -2004,8 +1950,7 @@ function downloadPlugin(options = {}) {
|
|
|
2004
1950
|
context.interceptors.request.use((config) => {
|
|
2005
1951
|
const download = resolveExtensionConfig(
|
|
2006
1952
|
config,
|
|
2007
|
-
"download"
|
|
2008
|
-
config.download
|
|
1953
|
+
"download"
|
|
2009
1954
|
);
|
|
2010
1955
|
if (!download) {
|
|
2011
1956
|
return config;
|
|
@@ -2022,8 +1967,7 @@ function downloadPlugin(options = {}) {
|
|
|
2022
1967
|
}
|
|
2023
1968
|
const download = resolveExtensionConfig(
|
|
2024
1969
|
requestContext.config,
|
|
2025
|
-
"download"
|
|
2026
|
-
requestContext.config.download
|
|
1970
|
+
"download"
|
|
2027
1971
|
);
|
|
2028
1972
|
const onProgress = download?.onProgress;
|
|
2029
1973
|
if (!onProgress || !shouldUseXHR(options.transport)) {
|
|
@@ -2056,8 +2000,7 @@ function downloadPlugin(options = {}) {
|
|
|
2056
2000
|
}
|
|
2057
2001
|
const download = resolveExtensionConfig(
|
|
2058
2002
|
response.config,
|
|
2059
|
-
"download"
|
|
2060
|
-
response.config.download
|
|
2003
|
+
"download"
|
|
2061
2004
|
);
|
|
2062
2005
|
const onProgress = download?.onProgress;
|
|
2063
2006
|
if (!download || !onProgress) {
|
|
@@ -2176,8 +2119,7 @@ function loggerPlugin(defaultOptions = {}) {
|
|
|
2176
2119
|
context.interceptors.request.use((config) => {
|
|
2177
2120
|
const logger = resolveExtensionConfig(
|
|
2178
2121
|
config,
|
|
2179
|
-
"logger"
|
|
2180
|
-
config.logger
|
|
2122
|
+
"logger"
|
|
2181
2123
|
) ?? defaultOptions;
|
|
2182
2124
|
if (logger.enabled === false) {
|
|
2183
2125
|
return config;
|
|
@@ -2192,8 +2134,7 @@ function loggerPlugin(defaultOptions = {}) {
|
|
|
2192
2134
|
context.interceptors.response.use((response) => {
|
|
2193
2135
|
const logger = resolveExtensionConfig(
|
|
2194
2136
|
response.config,
|
|
2195
|
-
"logger"
|
|
2196
|
-
response.config.logger
|
|
2137
|
+
"logger"
|
|
2197
2138
|
) ?? defaultOptions;
|
|
2198
2139
|
if (logger.enabled === false) {
|
|
2199
2140
|
return response;
|
|
@@ -2210,8 +2151,7 @@ function loggerPlugin(defaultOptions = {}) {
|
|
|
2210
2151
|
const config = error instanceof RequestError ? error.config : void 0;
|
|
2211
2152
|
const logger = config ? resolveExtensionConfig(
|
|
2212
2153
|
config,
|
|
2213
|
-
"logger"
|
|
2214
|
-
config.logger
|
|
2154
|
+
"logger"
|
|
2215
2155
|
) ?? defaultOptions : defaultOptions;
|
|
2216
2156
|
if (logger.enabled === false) {
|
|
2217
2157
|
return error;
|
|
@@ -2304,8 +2244,7 @@ function retryPlugin(defaultOptions = {}) {
|
|
|
2304
2244
|
const retryOptions = normalizeRetryOptions(
|
|
2305
2245
|
resolveExtensionConfig(
|
|
2306
2246
|
requestContext.config,
|
|
2307
|
-
"retry"
|
|
2308
|
-
requestContext.config.retry
|
|
2247
|
+
"retry"
|
|
2309
2248
|
),
|
|
2310
2249
|
defaultOptions
|
|
2311
2250
|
);
|
|
@@ -2452,8 +2391,7 @@ function uploadPlugin() {
|
|
|
2452
2391
|
context.interceptors.request.use((config) => {
|
|
2453
2392
|
const upload = resolveExtensionConfig(
|
|
2454
2393
|
config,
|
|
2455
|
-
"upload"
|
|
2456
|
-
config.upload
|
|
2394
|
+
"upload"
|
|
2457
2395
|
);
|
|
2458
2396
|
if (!upload) {
|
|
2459
2397
|
return config;
|
|
@@ -2470,8 +2408,7 @@ function uploadPlugin() {
|
|
|
2470
2408
|
}
|
|
2471
2409
|
const upload = resolveExtensionConfig(
|
|
2472
2410
|
requestContext.config,
|
|
2473
|
-
"upload"
|
|
2474
|
-
requestContext.config.upload
|
|
2411
|
+
"upload"
|
|
2475
2412
|
);
|
|
2476
2413
|
if (!upload?.onProgress) {
|
|
2477
2414
|
return;
|
package/dist/index.d.cts
CHANGED
|
@@ -130,30 +130,6 @@ interface RequestConfig {
|
|
|
130
130
|
responseType?: ResponseType;
|
|
131
131
|
validateStatus?: (status: number) => boolean;
|
|
132
132
|
extensions?: RequestExtensions;
|
|
133
|
-
/**
|
|
134
|
-
* @deprecated Use extensions.retry instead.
|
|
135
|
-
*/
|
|
136
|
-
retry?: number | RetryOptions;
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated Use extensions.cache instead.
|
|
139
|
-
*/
|
|
140
|
-
cache?: CacheOptions;
|
|
141
|
-
/**
|
|
142
|
-
* @deprecated Use extensions.auth instead.
|
|
143
|
-
*/
|
|
144
|
-
auth?: AuthOptions;
|
|
145
|
-
/**
|
|
146
|
-
* @deprecated Use extensions.logger instead.
|
|
147
|
-
*/
|
|
148
|
-
logger?: LoggerOptions;
|
|
149
|
-
/**
|
|
150
|
-
* @deprecated Use extensions.upload instead.
|
|
151
|
-
*/
|
|
152
|
-
upload?: UploadOptions;
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated Use extensions.download instead.
|
|
155
|
-
*/
|
|
156
|
-
download?: DownloadOptions;
|
|
157
133
|
}
|
|
158
134
|
|
|
159
135
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -130,30 +130,6 @@ interface RequestConfig {
|
|
|
130
130
|
responseType?: ResponseType;
|
|
131
131
|
validateStatus?: (status: number) => boolean;
|
|
132
132
|
extensions?: RequestExtensions;
|
|
133
|
-
/**
|
|
134
|
-
* @deprecated Use extensions.retry instead.
|
|
135
|
-
*/
|
|
136
|
-
retry?: number | RetryOptions;
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated Use extensions.cache instead.
|
|
139
|
-
*/
|
|
140
|
-
cache?: CacheOptions;
|
|
141
|
-
/**
|
|
142
|
-
* @deprecated Use extensions.auth instead.
|
|
143
|
-
*/
|
|
144
|
-
auth?: AuthOptions;
|
|
145
|
-
/**
|
|
146
|
-
* @deprecated Use extensions.logger instead.
|
|
147
|
-
*/
|
|
148
|
-
logger?: LoggerOptions;
|
|
149
|
-
/**
|
|
150
|
-
* @deprecated Use extensions.upload instead.
|
|
151
|
-
*/
|
|
152
|
-
upload?: UploadOptions;
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated Use extensions.download instead.
|
|
155
|
-
*/
|
|
156
|
-
download?: DownloadOptions;
|
|
157
133
|
}
|
|
158
134
|
|
|
159
135
|
/**
|
package/dist/index.js
CHANGED
|
@@ -503,42 +503,6 @@ var ConfigMerger = class {
|
|
|
503
503
|
config.extensions
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
|
-
if (defaults.retry !== void 0 || config.retry !== void 0) {
|
|
507
|
-
result.retry = this.mergeRetry(
|
|
508
|
-
defaults.retry,
|
|
509
|
-
config.retry
|
|
510
|
-
);
|
|
511
|
-
}
|
|
512
|
-
if (defaults.cache || config.cache) {
|
|
513
|
-
result.cache = this.mergeObject(
|
|
514
|
-
defaults.cache,
|
|
515
|
-
config.cache
|
|
516
|
-
);
|
|
517
|
-
}
|
|
518
|
-
if (defaults.auth || config.auth) {
|
|
519
|
-
result.auth = this.mergeObject(
|
|
520
|
-
defaults.auth,
|
|
521
|
-
config.auth
|
|
522
|
-
);
|
|
523
|
-
}
|
|
524
|
-
if (defaults.logger || config.logger) {
|
|
525
|
-
result.logger = this.mergeObject(
|
|
526
|
-
defaults.logger,
|
|
527
|
-
config.logger
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
if (defaults.upload || config.upload) {
|
|
531
|
-
result.upload = this.mergeObject(
|
|
532
|
-
defaults.upload,
|
|
533
|
-
config.upload
|
|
534
|
-
);
|
|
535
|
-
}
|
|
536
|
-
if (defaults.download || config.download) {
|
|
537
|
-
result.download = this.mergeObject(
|
|
538
|
-
defaults.download,
|
|
539
|
-
config.download
|
|
540
|
-
);
|
|
541
|
-
}
|
|
542
506
|
if (this.hasBodyConfig(defaults) || this.hasBodyConfig(config)) {
|
|
543
507
|
Object.assign(
|
|
544
508
|
result,
|
|
@@ -607,21 +571,6 @@ var ConfigMerger = class {
|
|
|
607
571
|
...value
|
|
608
572
|
};
|
|
609
573
|
}
|
|
610
|
-
static mergeRetry(defaults, retry) {
|
|
611
|
-
if (retry === void 0) {
|
|
612
|
-
return defaults;
|
|
613
|
-
}
|
|
614
|
-
if (typeof retry === "number") {
|
|
615
|
-
return retry;
|
|
616
|
-
}
|
|
617
|
-
const normalizedDefaults = typeof defaults === "number" ? {
|
|
618
|
-
retries: defaults
|
|
619
|
-
} : defaults;
|
|
620
|
-
return {
|
|
621
|
-
...normalizedDefaults,
|
|
622
|
-
...retry
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
574
|
static mergeExtensions(defaults, extensions) {
|
|
626
575
|
if (!defaults && !extensions) {
|
|
627
576
|
return void 0;
|
|
@@ -1399,8 +1348,8 @@ function createClient(options = {}) {
|
|
|
1399
1348
|
}
|
|
1400
1349
|
|
|
1401
1350
|
// src/plugins/resolveExtensionConfig.ts
|
|
1402
|
-
function resolveExtensionConfig(config, key
|
|
1403
|
-
return config.extensions?.[key]
|
|
1351
|
+
function resolveExtensionConfig(config, key) {
|
|
1352
|
+
return config.extensions?.[key];
|
|
1404
1353
|
}
|
|
1405
1354
|
|
|
1406
1355
|
// src/plugins/authPlugin.ts
|
|
@@ -1480,8 +1429,7 @@ async function applyAuthorization(config, options) {
|
|
|
1480
1429
|
async function resolveAuthorization(config, options, tokenOverride) {
|
|
1481
1430
|
const requestAuth = resolveExtensionConfig(
|
|
1482
1431
|
config,
|
|
1483
|
-
"auth"
|
|
1484
|
-
config.auth
|
|
1432
|
+
"auth"
|
|
1485
1433
|
);
|
|
1486
1434
|
const token = tokenOverride ?? (requestAuth?.token ? await resolveToken(requestAuth.token) : await resolvePluginToken(options));
|
|
1487
1435
|
return {
|
|
@@ -1546,8 +1494,7 @@ function cachePlugin(options = {}) {
|
|
|
1546
1494
|
syncGeneration();
|
|
1547
1495
|
const cache = resolveExtensionConfig(
|
|
1548
1496
|
requestContext.config,
|
|
1549
|
-
"cache"
|
|
1550
|
-
requestContext.config.cache
|
|
1497
|
+
"cache"
|
|
1551
1498
|
);
|
|
1552
1499
|
if (!cache?.enabled || !isCacheableRequest(requestContext.config, methods)) {
|
|
1553
1500
|
return;
|
|
@@ -1582,8 +1529,7 @@ function cachePlugin(options = {}) {
|
|
|
1582
1529
|
}
|
|
1583
1530
|
const cache = resolveExtensionConfig(
|
|
1584
1531
|
requestContext.config,
|
|
1585
|
-
"cache"
|
|
1586
|
-
requestContext.config.cache
|
|
1532
|
+
"cache"
|
|
1587
1533
|
);
|
|
1588
1534
|
if (!cache?.enabled || !requestContext.response || !isCacheableRequest(requestContext.config, methods)) {
|
|
1589
1535
|
return;
|
|
@@ -1965,8 +1911,7 @@ function downloadPlugin(options = {}) {
|
|
|
1965
1911
|
context.interceptors.request.use((config) => {
|
|
1966
1912
|
const download = resolveExtensionConfig(
|
|
1967
1913
|
config,
|
|
1968
|
-
"download"
|
|
1969
|
-
config.download
|
|
1914
|
+
"download"
|
|
1970
1915
|
);
|
|
1971
1916
|
if (!download) {
|
|
1972
1917
|
return config;
|
|
@@ -1983,8 +1928,7 @@ function downloadPlugin(options = {}) {
|
|
|
1983
1928
|
}
|
|
1984
1929
|
const download = resolveExtensionConfig(
|
|
1985
1930
|
requestContext.config,
|
|
1986
|
-
"download"
|
|
1987
|
-
requestContext.config.download
|
|
1931
|
+
"download"
|
|
1988
1932
|
);
|
|
1989
1933
|
const onProgress = download?.onProgress;
|
|
1990
1934
|
if (!onProgress || !shouldUseXHR(options.transport)) {
|
|
@@ -2017,8 +1961,7 @@ function downloadPlugin(options = {}) {
|
|
|
2017
1961
|
}
|
|
2018
1962
|
const download = resolveExtensionConfig(
|
|
2019
1963
|
response.config,
|
|
2020
|
-
"download"
|
|
2021
|
-
response.config.download
|
|
1964
|
+
"download"
|
|
2022
1965
|
);
|
|
2023
1966
|
const onProgress = download?.onProgress;
|
|
2024
1967
|
if (!download || !onProgress) {
|
|
@@ -2137,8 +2080,7 @@ function loggerPlugin(defaultOptions = {}) {
|
|
|
2137
2080
|
context.interceptors.request.use((config) => {
|
|
2138
2081
|
const logger = resolveExtensionConfig(
|
|
2139
2082
|
config,
|
|
2140
|
-
"logger"
|
|
2141
|
-
config.logger
|
|
2083
|
+
"logger"
|
|
2142
2084
|
) ?? defaultOptions;
|
|
2143
2085
|
if (logger.enabled === false) {
|
|
2144
2086
|
return config;
|
|
@@ -2153,8 +2095,7 @@ function loggerPlugin(defaultOptions = {}) {
|
|
|
2153
2095
|
context.interceptors.response.use((response) => {
|
|
2154
2096
|
const logger = resolveExtensionConfig(
|
|
2155
2097
|
response.config,
|
|
2156
|
-
"logger"
|
|
2157
|
-
response.config.logger
|
|
2098
|
+
"logger"
|
|
2158
2099
|
) ?? defaultOptions;
|
|
2159
2100
|
if (logger.enabled === false) {
|
|
2160
2101
|
return response;
|
|
@@ -2171,8 +2112,7 @@ function loggerPlugin(defaultOptions = {}) {
|
|
|
2171
2112
|
const config = error instanceof RequestError ? error.config : void 0;
|
|
2172
2113
|
const logger = config ? resolveExtensionConfig(
|
|
2173
2114
|
config,
|
|
2174
|
-
"logger"
|
|
2175
|
-
config.logger
|
|
2115
|
+
"logger"
|
|
2176
2116
|
) ?? defaultOptions : defaultOptions;
|
|
2177
2117
|
if (logger.enabled === false) {
|
|
2178
2118
|
return error;
|
|
@@ -2265,8 +2205,7 @@ function retryPlugin(defaultOptions = {}) {
|
|
|
2265
2205
|
const retryOptions = normalizeRetryOptions(
|
|
2266
2206
|
resolveExtensionConfig(
|
|
2267
2207
|
requestContext.config,
|
|
2268
|
-
"retry"
|
|
2269
|
-
requestContext.config.retry
|
|
2208
|
+
"retry"
|
|
2270
2209
|
),
|
|
2271
2210
|
defaultOptions
|
|
2272
2211
|
);
|
|
@@ -2413,8 +2352,7 @@ function uploadPlugin() {
|
|
|
2413
2352
|
context.interceptors.request.use((config) => {
|
|
2414
2353
|
const upload = resolveExtensionConfig(
|
|
2415
2354
|
config,
|
|
2416
|
-
"upload"
|
|
2417
|
-
config.upload
|
|
2355
|
+
"upload"
|
|
2418
2356
|
);
|
|
2419
2357
|
if (!upload) {
|
|
2420
2358
|
return config;
|
|
@@ -2431,8 +2369,7 @@ function uploadPlugin() {
|
|
|
2431
2369
|
}
|
|
2432
2370
|
const upload = resolveExtensionConfig(
|
|
2433
2371
|
requestContext.config,
|
|
2434
|
-
"upload"
|
|
2435
|
-
requestContext.config.upload
|
|
2372
|
+
"upload"
|
|
2436
2373
|
);
|
|
2437
2374
|
if (!upload?.onProgress) {
|
|
2438
2375
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npora/request",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A modern, TypeScript-first HTTP client powered by the Fetch API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"npora",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
39
|
+
"node": ">=22"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|