Skip to content

Commit cdc7d69

Browse files
authored
Migrate CLI Table Utility from oclif v3 to v4 using tty-table
Migrate CLI Table Utility from oclif v3 to v4 using tty-table
2 parents 6baaa21 + c159a77 commit cdc7d69

80 files changed

Lines changed: 3410 additions & 5165 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 963 additions & 2322 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-audit/README.md

Lines changed: 63 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
1919
$ csdx COMMAND
2020
running command...
2121
$ csdx (--version|-v)
22-
@contentstack/cli-audit/1.7.5 darwin-arm64 node-v22.13.1
22+
@contentstack/cli-audit/1.9.0 darwin-arm64 node-v22.13.1
2323
$ csdx --help [COMMAND]
2424
USAGE
2525
$ csdx COMMAND
@@ -53,13 +53,24 @@ Perform audits and find possible errors in the exported Contentstack data
5353
```
5454
USAGE
5555
$ csdx audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
56-
content-types|global-fields|entries|extensions|workflows|custom-roles...]
56+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [-c <value>] [--sort <value>]
57+
[--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
5758
5859
FLAGS
5960
--modules=<option>... Provide the list of modules to be audited
60-
<options: content-types|global-fields|entries|extensions|workflows|custom-roles>
61+
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
6162
--report-path=<value> Path to store the audit reports
6263
64+
TABLE FLAGS
65+
-c, --columns=<value> Specify columns to display, comma-separated.
66+
--csv Output results in CSV format.
67+
--filter=<value> Filter rows by a column value (e.g., name=foo).
68+
--no-header Hide table headers in output.
69+
--no-truncate Prevent truncation of long text in columns.
70+
--output=<option> Specify output format: csv, json, or yaml.
71+
<options: csv|json|yaml>
72+
--sort=<value> Sort the table by a column. Use "-" for descending.
73+
6374
COMMON FLAGS
6475
-c, --config=<value> Path of the external config
6576
-d, --data-dir=<value> Path where the data is stored
@@ -90,18 +101,29 @@ Perform audits and fix possible errors in the exported Contentstack data.
90101
```
91102
USAGE
92103
$ csdx audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
93-
content-types|global-fields|entries|extensions|workflows|custom-roles...] [--copy-path <value> --copy-dir]
94-
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...]
104+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--copy-path <value> --copy-dir]
105+
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [-c <value>] [--sort
106+
<value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
95107
96108
FLAGS
97109
--copy-dir Create backup from the original data.
98110
--copy-path=<value> Provide the path to backup the copied data
99111
--fix-only=<option>... Provide the list of fix options
100112
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
101113
--modules=<option>... Provide the list of modules to be audited
102-
<options: content-types|global-fields|entries|extensions|workflows|custom-roles>
114+
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
103115
--report-path=<value> Path to store the audit reports
104116
117+
TABLE FLAGS
118+
-c, --columns=<value> Specify columns to display, comma-separated.
119+
--csv Output results in CSV format.
120+
--filter=<value> Filter rows by a column value (e.g., name=foo).
121+
--no-header Hide table headers in output.
122+
--no-truncate Prevent truncation of long text in columns.
123+
--output=<option> Specify output format: csv, json, or yaml.
124+
<options: csv|json|yaml>
125+
--sort=<value> Sort the table by a column. Use "-" for descending.
126+
105127
COMMON FLAGS
106128
-c, --config=<value> Path of the external config
107129
-d, --data-dir=<value> Path where the data is stored
@@ -134,13 +156,24 @@ Perform audits and find possible errors in the exported Contentstack data
134156
```
135157
USAGE
136158
$ csdx cm:stacks:audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
137-
content-types|global-fields|entries|extensions|workflows|custom-roles...]
159+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [-c <value>] [--sort <value>]
160+
[--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
138161
139162
FLAGS
140163
--modules=<option>... Provide the list of modules to be audited
141-
<options: content-types|global-fields|entries|extensions|workflows|custom-roles>
164+
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
142165
--report-path=<value> Path to store the audit reports
143166
167+
TABLE FLAGS
168+
-c, --columns=<value> Specify columns to display, comma-separated.
169+
--csv Output results in CSV format.
170+
--filter=<value> Filter rows by a column value (e.g., name=foo).
171+
--no-header Hide table headers in output.
172+
--no-truncate Prevent truncation of long text in columns.
173+
--output=<option> Specify output format: csv, json, or yaml.
174+
<options: csv|json|yaml>
175+
--sort=<value> Sort the table by a column. Use "-" for descending.
176+
144177
COMMON FLAGS
145178
-c, --config=<value> Path of the external config
146179
-d, --data-dir=<value> Path where the data is stored
@@ -173,18 +206,29 @@ Perform audits and fix possible errors in the exported Contentstack data.
173206
```
174207
USAGE
175208
$ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
176-
content-types|global-fields|entries|extensions|workflows|custom-roles...] [--copy-path <value> --copy-dir]
177-
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...]
209+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--copy-path <value> --copy-dir]
210+
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [-c <value>] [--sort
211+
<value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
178212
179213
FLAGS
180214
--copy-dir Create backup from the original data.
181215
--copy-path=<value> Provide the path to backup the copied data
182216
--fix-only=<option>... Provide the list of fix options
183217
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
184218
--modules=<option>... Provide the list of modules to be audited
185-
<options: content-types|global-fields|entries|extensions|workflows|custom-roles>
219+
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
186220
--report-path=<value> Path to store the audit reports
187221
222+
TABLE FLAGS
223+
-c, --columns=<value> Specify columns to display, comma-separated.
224+
--csv Output results in CSV format.
225+
--filter=<value> Filter rows by a column value (e.g., name=foo).
226+
--no-header Hide table headers in output.
227+
--no-truncate Prevent truncation of long text in columns.
228+
--output=<option> Specify output format: csv, json, or yaml.
229+
<options: csv|json|yaml>
230+
--sort=<value> Sort the table by a column. Use "-" for descending.
231+
188232
COMMON FLAGS
189233
-c, --config=<value> Path of the external config
190234
-d, --data-dir=<value> Path where the data is stored
@@ -230,7 +274,7 @@ DESCRIPTION
230274
Display help for csdx.
231275
```
232276

233-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.26/src/commands/help.ts)_
277+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.27/src/commands/help.ts)_
234278

235279
## `csdx plugins`
236280

@@ -253,7 +297,7 @@ EXAMPLES
253297
$ csdx plugins
254298
```
255299

256-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/index.ts)_
300+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/index.ts)_
257301

258302
## `csdx plugins:add PLUGIN`
259303

@@ -327,7 +371,7 @@ EXAMPLES
327371
$ csdx plugins:inspect myplugin
328372
```
329373

330-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/inspect.ts)_
374+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/inspect.ts)_
331375

332376
## `csdx plugins:install PLUGIN`
333377

@@ -376,7 +420,7 @@ EXAMPLES
376420
$ csdx plugins:install someuser/someplugin
377421
```
378422

379-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/install.ts)_
423+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/install.ts)_
380424

381425
## `csdx plugins:link PATH`
382426

@@ -407,7 +451,7 @@ EXAMPLES
407451
$ csdx plugins:link myplugin
408452
```
409453

410-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/link.ts)_
454+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/link.ts)_
411455

412456
## `csdx plugins:remove [PLUGIN]`
413457

@@ -448,7 +492,7 @@ FLAGS
448492
--reinstall Reinstall all plugins after uninstalling.
449493
```
450494

451-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/reset.ts)_
495+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/reset.ts)_
452496

453497
## `csdx plugins:uninstall [PLUGIN]`
454498

@@ -476,7 +520,7 @@ EXAMPLES
476520
$ csdx plugins:uninstall myplugin
477521
```
478522

479-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/uninstall.ts)_
523+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/uninstall.ts)_
480524

481525
## `csdx plugins:unlink [PLUGIN]`
482526

@@ -520,5 +564,5 @@ DESCRIPTION
520564
Update installed plugins.
521565
```
522566

523-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/update.ts)_
567+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.36/src/commands/plugins/update.ts)_
524568
<!-- commandsstop -->

packages/contentstack-audit/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/cli-audit",
3-
"version": "1.7.5",
3+
"version": "1.9.0",
44
"description": "Contentstack audit plugin",
55
"author": "Contentstack CLI",
66
"homepage": "https://github.com/contentstack/cli",
@@ -18,35 +18,35 @@
1818
"/oclif.manifest.json"
1919
],
2020
"dependencies": {
21-
"@contentstack/cli-command": "~1.3.3",
21+
"@contentstack/cli-command": "~1.4.0",
2222
"@oclif/plugin-help": "^6.2.25",
23-
"@contentstack/cli-utilities": "~1.8.2",
23+
"@contentstack/cli-utilities": "~1.9.0",
2424
"@oclif/plugin-plugins": "^5.4.24",
2525
"chalk": "^4.1.2",
2626
"fast-csv": "^4.3.6",
27-
"fs-extra": "^11.2.0",
27+
"fs-extra": "^11.3.0",
2828
"lodash": "^4.17.21",
2929
"uuid": "^9.0.1",
3030
"winston": "^3.17.0"
3131
},
3232
"devDependencies": {
33-
"@oclif/test": "^4.1.6",
33+
"@oclif/test": "^4.1.11",
3434
"@types/chai": "^4.3.20",
3535
"@types/fs-extra": "^11.0.4",
3636
"@types/mocha": "^10.0.10",
37-
"@types/node": "^20.17.10",
37+
"@types/node": "^20.17.19",
3838
"@types/uuid": "^9.0.8",
3939
"chai": "^4.5.0",
4040
"eslint": "^8.57.1",
4141
"eslint-config-oclif": "^6.0.15",
42-
"eslint-config-oclif-typescript": "^3.1.13",
42+
"eslint-config-oclif-typescript": "^3.1.14",
4343
"mocha": "^10.8.2",
4444
"nyc": "^15.1.0",
4545
"oclif": "^4.17.30",
4646
"shx": "^0.3.4",
4747
"sinon": "^19.0.2",
4848
"ts-node": "^10.9.2",
49-
"typescript": "^5.7.2"
49+
"typescript": "^5.7.3"
5050
},
5151
"oclif": {
5252
"bin": "csdx",

0 commit comments

Comments
 (0)