Skip to content

Commit 7f86e8f

Browse files
docs: update README with new audit and fix command usage details
1 parent 75ffd88 commit 7f86e8f

File tree

1 file changed

+218
-0
lines changed

1 file changed

+218
-0
lines changed

packages/contentstack-audit/README.md

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ USAGE
3030
# Commands
3131

3232
<!-- commands -->
33+
* [`csdx audit`](#csdx-audit)
34+
* [`csdx audit:fix`](#csdx-auditfix)
35+
* [`csdx cm:stacks:audit`](#csdx-cmstacksaudit)
36+
* [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)
3337
* [`csdx help [COMMAND]`](#csdx-help-command)
3438
* [`csdx plugins`](#csdx-plugins)
3539
* [`csdx plugins:add PLUGIN`](#csdx-pluginsadd-plugin)
@@ -42,6 +46,220 @@ USAGE
4246
* [`csdx plugins:unlink [PLUGIN]`](#csdx-pluginsunlink-plugin)
4347
* [`csdx plugins:update`](#csdx-pluginsupdate)
4448

49+
## `csdx audit`
50+
51+
Perform audits and find possible errors in the exported Contentstack data
52+
53+
```
54+
USAGE
55+
$ csdx audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
56+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--columns <value>]
57+
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
58+
59+
FLAGS
60+
--modules=<option>... Provide the list of modules to be audited
61+
<options:
62+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
63+
--report-path=<value> Path to store the audit reports
64+
65+
COMMON FLAGS
66+
-c, --config=<value> Path of the external config
67+
-d, --data-dir=<value> Path where the data is stored
68+
69+
TABLE FLAGS
70+
--columns=<value> Specify columns to display, comma-separated.
71+
--csv Output results in CSV format.
72+
--filter=<value> Filter rows by a column value (e.g., name=foo).
73+
--no-header Hide table headers in output.
74+
--no-truncate Prevent truncation of long text in columns.
75+
--output=<option> Specify output format: csv, json, or yaml.
76+
<options: csv|json|yaml>
77+
--sort=<value> Sort the table by a column. Use "-" for descending.
78+
79+
DESCRIPTION
80+
Perform audits and find possible errors in the exported Contentstack data
81+
82+
ALIASES
83+
$ csdx audit
84+
$ csdx cm:stacks:audit
85+
86+
EXAMPLES
87+
$ csdx audit
88+
89+
$ csdx audit --report-path=<path>
90+
91+
$ csdx audit --report-path=<path> --csv
92+
93+
$ csdx audit --report-path=<path> --filter="name=<filter-value>"
94+
95+
$ csdx audit --report-path=<path> --modules=content-types --filter="name="<filter-value>"
96+
```
97+
98+
## `csdx audit:fix`
99+
100+
Perform audits and fix possible errors in the exported Contentstack data.
101+
102+
```
103+
USAGE
104+
$ csdx audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
105+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--copy-path <value>
106+
--copy-dir] [--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns
107+
<value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
108+
109+
FLAGS
110+
--copy-dir Create backup from the original data.
111+
--copy-path=<value> Provide the path to backup the copied data
112+
--fix-only=<option>... Provide the list of fix options
113+
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
114+
--modules=<option>... Provide the list of modules to be audited
115+
<options:
116+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
117+
--report-path=<value> Path to store the audit reports
118+
119+
COMMON FLAGS
120+
-c, --config=<value> Path of the external config
121+
-d, --data-dir=<value> Path where the data is stored
122+
123+
TABLE FLAGS
124+
--columns=<value> Specify columns to display, comma-separated.
125+
--csv Output results in CSV format.
126+
--filter=<value> Filter rows by a column value (e.g., name=foo).
127+
--no-header Hide table headers in output.
128+
--no-truncate Prevent truncation of long text in columns.
129+
--output=<option> Specify output format: csv, json, or yaml.
130+
<options: csv|json|yaml>
131+
--sort=<value> Sort the table by a column. Use "-" for descending.
132+
133+
DESCRIPTION
134+
Perform audits and fix possible errors in the exported Contentstack data.
135+
136+
ALIASES
137+
$ csdx audit:fix
138+
$ csdx cm:stacks:audit:fix
139+
140+
EXAMPLES
141+
$ csdx audit:fix --copy-dir
142+
143+
$ csdx audit:fix --report-path=<path> --copy-dir
144+
145+
$ csdx audit:fix --report-path=<path> --copy-dir --csv
146+
147+
$ csdx audit:fix --fix-only=reference,global_field --copy-dir
148+
149+
$ csdx audit:fix --report-path=<path> --filter="name=<filter-value>"
150+
151+
$ csdx audit:fix --report-path=<path> --modules=content-types --filter="name="<filter-value>" --copy-dir --copy-path=<path>
152+
```
153+
154+
## `csdx cm:stacks:audit`
155+
156+
Perform audits and find possible errors in the exported Contentstack data
157+
158+
```
159+
USAGE
160+
$ csdx cm:stacks:audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
161+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--columns <value>]
162+
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
163+
164+
FLAGS
165+
--modules=<option>... Provide the list of modules to be audited
166+
<options:
167+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
168+
--report-path=<value> Path to store the audit reports
169+
170+
COMMON FLAGS
171+
-c, --config=<value> Path of the external config
172+
-d, --data-dir=<value> Path where the data is stored
173+
174+
TABLE FLAGS
175+
--columns=<value> Specify columns to display, comma-separated.
176+
--csv Output results in CSV format.
177+
--filter=<value> Filter rows by a column value (e.g., name=foo).
178+
--no-header Hide table headers in output.
179+
--no-truncate Prevent truncation of long text in columns.
180+
--output=<option> Specify output format: csv, json, or yaml.
181+
<options: csv|json|yaml>
182+
--sort=<value> Sort the table by a column. Use "-" for descending.
183+
184+
DESCRIPTION
185+
Perform audits and find possible errors in the exported Contentstack data
186+
187+
ALIASES
188+
$ csdx audit
189+
$ csdx cm:stacks:audit
190+
191+
EXAMPLES
192+
$ csdx cm:stacks:audit
193+
194+
$ csdx cm:stacks:audit --report-path=<path>
195+
196+
$ csdx cm:stacks:audit --report-path=<path> --csv
197+
198+
$ csdx cm:stacks:audit --report-path=<path> --filter="name=<filter-value>"
199+
200+
$ csdx cm:stacks:audit --report-path=<path> --modules=content-types --filter="name="<filter-value>"
201+
```
202+
203+
_See code: [src/commands/cm/stacks/audit/index.ts](https://github.com/contentstack/audit/blob/main/packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts)_
204+
205+
## `csdx cm:stacks:audit:fix`
206+
207+
Perform audits and fix possible errors in the exported Contentstack data.
208+
209+
```
210+
USAGE
211+
$ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
212+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--copy-path <value>
213+
--copy-dir] [--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns
214+
<value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
215+
216+
FLAGS
217+
--copy-dir Create backup from the original data.
218+
--copy-path=<value> Provide the path to backup the copied data
219+
--fix-only=<option>... Provide the list of fix options
220+
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
221+
--modules=<option>... Provide the list of modules to be audited
222+
<options:
223+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
224+
--report-path=<value> Path to store the audit reports
225+
226+
COMMON FLAGS
227+
-c, --config=<value> Path of the external config
228+
-d, --data-dir=<value> Path where the data is stored
229+
230+
TABLE FLAGS
231+
--columns=<value> Specify columns to display, comma-separated.
232+
--csv Output results in CSV format.
233+
--filter=<value> Filter rows by a column value (e.g., name=foo).
234+
--no-header Hide table headers in output.
235+
--no-truncate Prevent truncation of long text in columns.
236+
--output=<option> Specify output format: csv, json, or yaml.
237+
<options: csv|json|yaml>
238+
--sort=<value> Sort the table by a column. Use "-" for descending.
239+
240+
DESCRIPTION
241+
Perform audits and fix possible errors in the exported Contentstack data.
242+
243+
ALIASES
244+
$ csdx audit:fix
245+
$ csdx cm:stacks:audit:fix
246+
247+
EXAMPLES
248+
$ csdx cm:stacks:audit:fix --copy-dir
249+
250+
$ csdx cm:stacks:audit:fix --report-path=<path> --copy-dir
251+
252+
$ csdx cm:stacks:audit:fix --report-path=<path> --copy-dir --csv
253+
254+
$ csdx cm:stacks:audit:fix --fix-only=reference,global_field --copy-dir
255+
256+
$ csdx cm:stacks:audit:fix --report-path=<path> --filter="name=<filter-value>"
257+
258+
$ csdx cm:stacks:audit:fix --report-path=<path> --modules=content-types --filter="name="<filter-value>" --copy-dir --copy-path=<path>
259+
```
260+
261+
_See code: [src/commands/cm/stacks/audit/fix.ts](https://github.com/contentstack/audit/blob/main/packages/contentstack-audit/src/commands/cm/stacks/audit/fix.ts)_
262+
45263
## `csdx help [COMMAND]`
46264

47265
Display help for csdx.

0 commit comments

Comments
 (0)