@contentstack/cli-variants 1.1.4 → 1.1.6
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/lib/utils/logger.js +4 -1
- package/package.json +5 -9
- package/src/utils/logger.ts +5 -2
package/lib/utils/logger.js
CHANGED
|
@@ -53,7 +53,10 @@ function returnString(args) {
|
|
|
53
53
|
.map(function (item) {
|
|
54
54
|
if (item && typeof item === 'object') {
|
|
55
55
|
try {
|
|
56
|
-
|
|
56
|
+
const redactedObject = (0, cli_utilities_1.redactObject)(item);
|
|
57
|
+
if (redactedObject && typeof redactedObject === 'object') {
|
|
58
|
+
return JSON.stringify(redactedObject);
|
|
59
|
+
}
|
|
57
60
|
}
|
|
58
61
|
catch (error) { }
|
|
59
62
|
return item;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-variants",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Variants plugin",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -18,19 +18,15 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@contentstack/cli-dev-dependencies": "^1.2.4",
|
|
21
|
-
"@oclif/test": "^4.1.
|
|
22
|
-
"@types/
|
|
23
|
-
"@types/node": "^20.17.9",
|
|
24
|
-
"chai": "^4.5.0",
|
|
21
|
+
"@oclif/test": "^4.1.9",
|
|
22
|
+
"@types/node": "^20.17.17",
|
|
25
23
|
"mocha": "^10.8.2",
|
|
26
24
|
"nyc": "^15.1.0",
|
|
27
|
-
"sinon": "^19.0.2",
|
|
28
25
|
"ts-node": "^10.9.2",
|
|
29
|
-
"
|
|
30
|
-
"typescript": "^5.6.3"
|
|
26
|
+
"typescript": "^5.7.3"
|
|
31
27
|
},
|
|
32
28
|
"dependencies": {
|
|
33
|
-
"@contentstack/cli-utilities": "
|
|
29
|
+
"@contentstack/cli-utilities": "~1.9.0",
|
|
34
30
|
"lodash": "^4.17.21",
|
|
35
31
|
"mkdirp": "^1.0.4",
|
|
36
32
|
"winston": "^3.17.0"
|
package/src/utils/logger.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as winston from 'winston';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import mkdirp from 'mkdirp';
|
|
4
|
-
import { sanitizePath } from '@contentstack/cli-utilities';
|
|
4
|
+
import { sanitizePath, redactObject } from '@contentstack/cli-utilities';
|
|
5
5
|
import { ExportConfig, ImportConfig } from '../types';
|
|
6
6
|
|
|
7
7
|
const slice = Array.prototype.slice;
|
|
@@ -18,7 +18,10 @@ function returnString(args: unknown[]) {
|
|
|
18
18
|
.map(function (item) {
|
|
19
19
|
if (item && typeof item === 'object') {
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
const redactedObject = redactObject(item);
|
|
22
|
+
if(redactedObject && typeof redactedObject === 'object') {
|
|
23
|
+
return JSON.stringify(redactedObject);
|
|
24
|
+
}
|
|
22
25
|
} catch (error) {}
|
|
23
26
|
return item;
|
|
24
27
|
}
|