@vtex/api 6.45.8 → 6.45.11-beta
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 +20 -0
- package/lib/utils/json.js +3 -3
- package/lib/utils/log.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [6.45.11-beta] - 2022-03-30
|
|
11
|
+
|
|
12
|
+
## [6.45.10] - 2022-03-15
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Update sensitive fields.
|
|
17
|
+
- Add 'authorization', rawheaders', 'x-vtex-credential' and 'x-vtex-session'.
|
|
18
|
+
- Lowercase fields before comparison in cleanJson.
|
|
19
|
+
|
|
20
|
+
## [6.45.9] - 2022-03-08
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fix cleanJson utility.
|
|
25
|
+
|
|
10
26
|
## [6.45.8] - 2022-02-25
|
|
11
27
|
|
|
12
28
|
### Fixed
|
|
@@ -1707,3 +1723,7 @@ instead
|
|
|
1707
1723
|
### Changed
|
|
1708
1724
|
|
|
1709
1725
|
- `HttpClient` now adds `'Accept-Encoding': 'gzip'` header by default.
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
[Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.11-beta...HEAD
|
|
1729
|
+
[6.45.11-beta]: https://github.com/vtex/node-vtex-api/compare/v6.45.10...v6.45.11-beta
|
package/lib/utils/json.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
function cleanJson(json, targetFields) {
|
|
4
|
-
for (const key of
|
|
4
|
+
for (const key of Object.keys(json)) {
|
|
5
5
|
let deleted = false;
|
|
6
6
|
for (const field of targetFields) {
|
|
7
|
-
if (key === field) {
|
|
7
|
+
if (key.toLowerCase() === field) {
|
|
8
8
|
delete json[key];
|
|
9
9
|
deleted = true;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
if (!deleted && typeof json[key] === 'object') {
|
|
12
|
+
if (!deleted && json[key] && typeof json[key] === 'object') {
|
|
13
13
|
json[key] = cleanJson(json[key], targetFields);
|
|
14
14
|
}
|
|
15
15
|
}
|
package/lib/utils/log.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const json_1 = require("./json");
|
|
4
|
-
const SENSITIVE_FIELDS = ['cookie', '
|
|
4
|
+
const SENSITIVE_FIELDS = ['authorization', 'cookie', 'vtexidclientautcookie', 'rawheaders', 'x-vtex-credential', 'x-vtex-session', 'error'];
|
|
5
5
|
exports.cleanLog = (log) => {
|
|
6
6
|
return json_1.cleanJson(log, SENSITIVE_FIELDS);
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtex/api",
|
|
3
|
-
"version": "6.45.
|
|
3
|
+
"version": "6.45.11-beta",
|
|
4
4
|
"description": "VTEX I/O API client",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"graphql": "^14.5.8",
|
|
67
67
|
"graphql-tools": "^4.0.6",
|
|
68
68
|
"graphql-upload": "^8.1.0",
|
|
69
|
-
"jaeger-client": "^3.
|
|
69
|
+
"jaeger-client": "^3.19.0",
|
|
70
70
|
"js-base64": "^2.5.1",
|
|
71
71
|
"koa": "^2.11.0",
|
|
72
72
|
"koa-compose": "^4.1.0",
|
|
@@ -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.0.1",
|
|
80
80
|
"qs": "^6.5.1",
|
|
81
81
|
"querystring": "^0.2.0",
|
|
82
82
|
"ramda": "^0.26.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@types/fs-extra": "^5.0.0",
|
|
99
99
|
"@types/graphql": "^14.5.0",
|
|
100
100
|
"@types/graphql-upload": "^8.0.3",
|
|
101
|
-
"@types/jaeger-client": "^3.
|
|
101
|
+
"@types/jaeger-client": "^3.18.3",
|
|
102
102
|
"@types/jest": "^25.1.4",
|
|
103
103
|
"@types/js-base64": "^2.3.1",
|
|
104
104
|
"@types/koa-compress": "^2.0.9",
|