@contentstack/cli-audit 1.0.0 → 1.2.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.
@@ -1,33 +1,124 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.2.0",
3
3
  "commands": {
4
4
  "cm:stacks:audit:fix": {
5
5
  "id": "cm:stacks:audit:fix",
6
- "description": "Audit fix command",
6
+ "description": "Perform audits and fix possible errors in the exported Contentstack data.",
7
7
  "strict": true,
8
8
  "pluginName": "@contentstack/cli-audit",
9
9
  "pluginAlias": "@contentstack/cli-audit",
10
10
  "pluginType": "core",
11
11
  "aliases": [
12
- "cm::stacks:audit:fix"
12
+ "audit:fix",
13
+ "cm:stacks:audit:fix"
13
14
  ],
14
15
  "examples": [
15
- "$ <%= config.bin %> <%= command.id %>"
16
+ "$ <%= config.bin %> <%= command.id %> --copy-dir",
17
+ "$ <%= config.bin %> <%= command.id %> --report-path=<path> --copy-dir",
18
+ "$ <%= config.bin %> <%= command.id %> --report-path=<path> --copy-dir --csv",
19
+ "$ <%= config.bin %> <%= command.id %> --report-path=<path> --filter=\"name=<filter-value>\"",
20
+ "$ <%= config.bin %> <%= command.id %> --report-path=<path> --modules=content-types --filter=\"name=\"<filter-value>\" --copy-dir --copy-path=<path>"
16
21
  ],
17
22
  "flags": {
18
23
  "config": {
19
24
  "name": "config",
20
25
  "type": "option",
21
26
  "char": "c",
22
- "description": "Path of the external config.",
27
+ "description": "Path of the external config",
23
28
  "multiple": false
24
29
  },
25
30
  "data-dir": {
26
31
  "name": "data-dir",
27
32
  "type": "option",
28
33
  "char": "d",
29
- "description": "Path where the data is stored.",
34
+ "description": "Path where the data is stored",
35
+ "multiple": false
36
+ },
37
+ "report-path": {
38
+ "name": "report-path",
39
+ "type": "option",
40
+ "description": "Path to store the audit reports",
30
41
  "multiple": false
42
+ },
43
+ "reference-only": {
44
+ "name": "reference-only",
45
+ "type": "boolean",
46
+ "description": "Checks only for missing references.",
47
+ "hidden": true,
48
+ "allowNo": false
49
+ },
50
+ "modules": {
51
+ "name": "modules",
52
+ "type": "option",
53
+ "description": "Provide the list of modules to be audited",
54
+ "multiple": true,
55
+ "options": [
56
+ "content-types",
57
+ "global-fields",
58
+ "entries"
59
+ ]
60
+ },
61
+ "copy-dir": {
62
+ "name": "copy-dir",
63
+ "type": "boolean",
64
+ "description": "Create backup from the original data.",
65
+ "allowNo": false
66
+ },
67
+ "copy-path": {
68
+ "name": "copy-path",
69
+ "type": "option",
70
+ "description": "Provide the path to backup the copied data",
71
+ "multiple": false,
72
+ "dependsOn": [
73
+ "copy-dir"
74
+ ]
75
+ },
76
+ "yes": {
77
+ "name": "yes",
78
+ "type": "boolean",
79
+ "char": "y",
80
+ "description": "Use this flag to skip confirmation",
81
+ "hidden": true,
82
+ "allowNo": false
83
+ },
84
+ "columns": {
85
+ "name": "columns",
86
+ "type": "option",
87
+ "description": "only show provided columns (comma-separated)",
88
+ "multiple": false,
89
+ "exclusive": [
90
+ "extended"
91
+ ]
92
+ },
93
+ "sort": {
94
+ "name": "sort",
95
+ "type": "option",
96
+ "description": "property to sort by (prepend '-' for descending)",
97
+ "multiple": false
98
+ },
99
+ "filter": {
100
+ "name": "filter",
101
+ "type": "option",
102
+ "description": "filter property by partial string matching, ex: name=foo",
103
+ "multiple": false
104
+ },
105
+ "csv": {
106
+ "name": "csv",
107
+ "type": "boolean",
108
+ "description": "output is csv format [alias: --output=csv]",
109
+ "allowNo": false,
110
+ "exclusive": [
111
+ "no-truncate"
112
+ ]
113
+ },
114
+ "no-truncate": {
115
+ "name": "no-truncate",
116
+ "type": "boolean",
117
+ "description": "do not truncate output to fit screen",
118
+ "allowNo": false,
119
+ "exclusive": [
120
+ "csv"
121
+ ]
31
122
  }
32
123
  },
33
124
  "args": {}
@@ -40,6 +131,7 @@
40
131
  "pluginAlias": "@contentstack/cli-audit",
41
132
  "pluginType": "core",
42
133
  "aliases": [
134
+ "audit",
43
135
  "cm:stacks:audit"
44
136
  ],
45
137
  "examples": [
@@ -54,20 +146,20 @@
54
146
  "name": "config",
55
147
  "type": "option",
56
148
  "char": "c",
57
- "description": "Path of the external config.",
149
+ "description": "Path of the external config",
58
150
  "multiple": false
59
151
  },
60
152
  "data-dir": {
61
153
  "name": "data-dir",
62
154
  "type": "option",
63
155
  "char": "d",
64
- "description": "Path where the data is stored.",
156
+ "description": "Path where the data is stored",
65
157
  "multiple": false
66
158
  },
67
159
  "report-path": {
68
160
  "name": "report-path",
69
161
  "type": "option",
70
- "description": "Path to store the audit reports.",
162
+ "description": "Path to store the audit reports",
71
163
  "multiple": false
72
164
  },
73
165
  "reference-only": {
@@ -80,7 +172,7 @@
80
172
  "modules": {
81
173
  "name": "modules",
82
174
  "type": "option",
83
- "description": "Provide the list of modules to be audited.",
175
+ "description": "Provide the list of modules to be audited",
84
176
  "multiple": true,
85
177
  "options": [
86
178
  "content-types",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/cli-audit",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Contentstack audit plugin",
5
5
  "author": "Contentstack CLI",
6
6
  "homepage": "https://github.com/contentstack/cli",
@@ -18,19 +18,23 @@
18
18
  "/oclif.manifest.json"
19
19
  ],
20
20
  "dependencies": {
21
- "@contentstack/cli-command": "~1.2.11",
22
- "@contentstack/cli-utilities": "~1.5.1",
23
- "@oclif/plugin-help": "^5.2.20",
21
+ "@contentstack/cli-command": "~1.2.14",
22
+ "@contentstack/cli-utilities": "~1.5.4",
23
+ "@oclif/plugin-help": "^5",
24
24
  "@oclif/plugin-plugins": "^3.8.4",
25
25
  "chalk": "^4.1.2",
26
26
  "fast-csv": "^4.3.6",
27
+ "fs-extra": "^11.1.1",
27
28
  "lodash": "^4.17.21",
28
- "winston": "^3.9.0"
29
+ "uuid": "^9.0.1",
30
+ "winston": "^3.10.0"
29
31
  },
30
32
  "devDependencies": {
31
33
  "@oclif/test": "^2.0.3",
32
34
  "@types/chai": "^4.3.5",
35
+ "@types/fs-extra": "^11.0.2",
33
36
  "@types/node": "^20.3.1",
37
+ "@types/uuid": "^9.0.4",
34
38
  "chai": "^4.3.7",
35
39
  "eslint": "^8.43.0",
36
40
  "eslint-config-oclif": "^4.0.0",
@@ -57,11 +61,6 @@
57
61
  "additionalVersionFlags": [
58
62
  "-v"
59
63
  ],
60
- "topics": {
61
- "cm:stacks:audit": {
62
- "description": "Audit and find possible refrence errors in the exported data"
63
- }
64
- },
65
64
  "repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-audit/<%- commandPath %>"
66
65
  },
67
66
  "scripts": {