@vtex/api 6.45.16-beta → 6.45.17
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
CHANGED
|
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [6.45.16
|
|
10
|
+
## [6.45.16] - 2023-07-03
|
|
11
|
+
### Changed
|
|
12
|
+
- Bump `prom-client` version
|
|
11
13
|
|
|
12
14
|
## [6.45.15] - 2023-02-01
|
|
13
15
|
### Changed
|
|
@@ -1759,8 +1761,7 @@ instead
|
|
|
1759
1761
|
- `HttpClient` now adds `'Accept-Encoding': 'gzip'` header by default.
|
|
1760
1762
|
|
|
1761
1763
|
|
|
1762
|
-
[Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.
|
|
1763
|
-
[6.45.16-beta]: https://github.com/vtex/node-vtex-api/compare/v6.45.15...v6.45.16-beta
|
|
1764
|
+
[Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.15...HEAD
|
|
1764
1765
|
[6.45.15]: https://github.com/vtex/node-vtex-api/compare/v6.45.14...v6.45.15
|
|
1765
1766
|
[6.45.14]: https://github.com/vtex/node-vtex-api/compare/v6.45.13...v6.45.14
|
|
1766
1767
|
[6.45.13]: https://github.com/vtex/node-vtex-api/compare/v6.45.12...v6.45.13
|
|
@@ -7,6 +7,7 @@ declare type ClientOptions = IOContext & Partial<InstanceOptions>;
|
|
|
7
7
|
export declare class HttpClient {
|
|
8
8
|
name: string;
|
|
9
9
|
private logger;
|
|
10
|
+
private cacheableType;
|
|
10
11
|
private runMiddlewares;
|
|
11
12
|
constructor(opts: ClientOptions);
|
|
12
13
|
get: <T = any>(url: string, config?: RequestConfig) => Promise<T>;
|
|
@@ -96,14 +96,15 @@ class HttpClient {
|
|
|
96
96
|
return context.response;
|
|
97
97
|
};
|
|
98
98
|
this.getConfig = (url, config = {}) => ({
|
|
99
|
-
cacheable:
|
|
99
|
+
cacheable: this.cacheableType,
|
|
100
100
|
memoizable: true,
|
|
101
101
|
...config,
|
|
102
102
|
url,
|
|
103
103
|
});
|
|
104
|
-
const { baseURL, authToken, authType, memoryCache, diskCache, locale, name, metrics, product, serverTiming, recorder, userAgent, timeout = DEFAULT_TIMEOUT_MS, segmentToken, sessionToken, retries, concurrency, headers: defaultHeaders, host, params, operationId, tenant, binding, verbose, cancellation, exponentialTimeoutCoefficient, initialBackoffDelay, exponentialBackoffCoefficient, httpsAgent, tracer, logger, } = opts;
|
|
104
|
+
const { baseURL, authToken, authType, memoryCache, diskCache, locale, name, metrics, product, serverTiming, recorder, userAgent, timeout = DEFAULT_TIMEOUT_MS, segmentToken, sessionToken, retries, concurrency, headers: defaultHeaders, host, params, operationId, tenant, binding, verbose, cancellation, exponentialTimeoutCoefficient, initialBackoffDelay, exponentialBackoffCoefficient, httpsAgent, tracer, logger, cacheableType = cache_1.CacheType.Memory, } = opts;
|
|
105
105
|
this.name = name || baseURL || 'unknown';
|
|
106
106
|
this.logger = logger;
|
|
107
|
+
this.cacheableType = cacheableType;
|
|
107
108
|
const limit = concurrency && concurrency > 0 && p_limit_1.default(concurrency) || undefined;
|
|
108
109
|
const headers = {
|
|
109
110
|
...defaultHeaders,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtex/api",
|
|
3
|
-
"version": "6.45.
|
|
3
|
+
"version": "6.45.17",
|
|
4
4
|
"description": "VTEX I/O API client",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"mime-types": "^2.1.12",
|
|
77
77
|
"opentracing": "^0.14.4",
|
|
78
78
|
"p-limit": "^2.2.0",
|
|
79
|
-
"prom-client": "^
|
|
79
|
+
"prom-client": "^14.2.0",
|
|
80
80
|
"qs": "^6.5.1",
|
|
81
81
|
"querystring": "^0.2.0",
|
|
82
82
|
"ramda": "^0.26.0",
|