node-automator 1.4.1 → 1.4.2

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.
@@ -32,7 +32,8 @@ class BackupCommand extends BaseCommand {
32
32
  backupFormat,
33
33
  backupFilename,
34
34
  backupRename,
35
- backupEncoding
35
+ backupEncoding,
36
+ backupPrettify,
36
37
  } = bakCfg;
37
38
  const filepath = path.join(sourceFolder, filename);
38
39
  let backupPath = path.join(backupFolder, backupFilename || filename);
@@ -52,6 +53,10 @@ class BackupCommand extends BaseCommand {
52
53
  if (backupFormat) {
53
54
  backupData = await stringify(backupData, backupFormat);
54
55
  }
56
+ if (backupPrettify) {
57
+ backupData = await parse(backupData, backupPrettify.from);
58
+ backupData = await stringify(backupData, backupPrettify.to);
59
+ }
55
60
  if (backupRename) {
56
61
  backupPath = processRename(backupPath, backupRename, backupData);
57
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-automator",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Execute automation with yaml configuration(compatible with json)",
5
5
  "main": "index.js",
6
6
  "repository": {