Skip to content

Commit 6406fca

Browse files
authored
Merge pull request #1808 from contentstack/feature/oclif-v4-migration-base
[Oclif v4 Migration] Upgrade CLI to oclif v4
2 parents 649544b + e1f8f13 commit 6406fca

File tree

73 files changed

+19085
-22978
lines changed

Some content is hidden

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

73 files changed

+19085
-22978
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ jobs:
186186
token: ${{ secrets.NPM_TOKEN }}
187187
package: ./packages/contentstack-import-setup/package.json
188188
access: public
189-
tag: beta
190189
- name: Installing dependencies of export to csv
191190
id: export-to-csv-installation
192191
if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}}

package-lock.json

Lines changed: 13681 additions & 17001 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: 81 additions & 53 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.9.1 darwin-arm64 node-v22.14.0
22+
@contentstack/cli-audit/1.10.0 darwin-arm64 node-v22.13.1
2323
$ csdx --help [COMMAND]
2424
USAGE
2525
$ csdx COMMAND
@@ -34,7 +34,7 @@ USAGE
3434
* [`csdx audit:fix`](#csdx-auditfix)
3535
* [`csdx cm:stacks:audit`](#csdx-cmstacksaudit)
3636
* [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)
37-
* [`csdx help [COMMANDS]`](#csdx-help-commands)
37+
* [`csdx help [COMMAND]`](#csdx-help-command)
3838
* [`csdx plugins`](#csdx-plugins)
3939
* [`csdx plugins:add PLUGIN`](#csdx-pluginsadd-plugin)
4040
* [`csdx plugins:inspect PLUGIN...`](#csdx-pluginsinspect-plugin)
@@ -52,21 +52,28 @@ Perform audits and find possible errors in the exported Contentstack data
5252

5353
```
5454
USAGE
55-
$ csdx audit [--report-path <value>] [--modules
56-
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--columns <value> | ] [--sort
57-
<value>] [--filter <value>] [--csv | --no-truncate]
55+
$ csdx audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
56+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--columns <value>] [--sort
57+
<value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
5858
5959
FLAGS
6060
--modules=<option>... Provide the list of modules to be audited
6161
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
6262
--report-path=<value> Path to store the audit reports
6363
64+
COMMON FLAGS
65+
-c, --config=<value> Path of the external config
66+
-d, --data-dir=<value> Path where the data is stored
67+
6468
TABLE FLAGS
65-
--columns=<value> Show only the specified columns (comma-separated)
66-
--csv The output is in the CSV format [alias: --output=csv]
67-
--filter=<value> Filter property by partial string matching. For example: name=foo
68-
--no-truncate The output is not truncated to fit the screen
69-
--sort=<value> Property to sort by (prepend '-' for descending)
69+
--columns=<value> Specify columns to display, comma-separated.
70+
--csv Output results in CSV format.
71+
--filter=<value> Filter rows by a column value (e.g., name=foo).
72+
--no-header Hide table headers in output.
73+
--no-truncate Prevent truncation of long text in columns.
74+
--output=<option> Specify output format: csv, json, or yaml.
75+
<options: csv|json|yaml>
76+
--sort=<value> Sort the table by a column. Use "-" for descending.
7077
7178
DESCRIPTION
7279
Perform audits and find possible errors in the exported Contentstack data
@@ -93,10 +100,10 @@ Perform audits and fix possible errors in the exported Contentstack data.
93100

94101
```
95102
USAGE
96-
$ csdx audit:fix [--report-path <value>] [--modules
97-
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--copy-path <value> --copy-dir]
98-
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types] [--columns <value> | ]
99-
[--sort <value>] [--filter <value>] [--csv | --no-truncate]
103+
$ csdx audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
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...] [--columns <value>]
106+
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
100107
101108
FLAGS
102109
--copy-dir Create backup from the original data.
@@ -107,12 +114,19 @@ FLAGS
107114
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
108115
--report-path=<value> Path to store the audit reports
109116
117+
COMMON FLAGS
118+
-c, --config=<value> Path of the external config
119+
-d, --data-dir=<value> Path where the data is stored
120+
110121
TABLE FLAGS
111-
--columns=<value> Show only the specified columns (comma-separated)
112-
--csv The output is in the CSV format [alias: --output=csv]
113-
--filter=<value> Filter property by partial string matching. For example: name=foo
114-
--no-truncate The output is not truncated to fit the screen
115-
--sort=<value> Property to sort by (prepend '-' for descending)
122+
--columns=<value> Specify columns to display, comma-separated.
123+
--csv Output results in CSV format.
124+
--filter=<value> Filter rows by a column value (e.g., name=foo).
125+
--no-header Hide table headers in output.
126+
--no-truncate Prevent truncation of long text in columns.
127+
--output=<option> Specify output format: csv, json, or yaml.
128+
<options: csv|json|yaml>
129+
--sort=<value> Sort the table by a column. Use "-" for descending.
116130
117131
DESCRIPTION
118132
Perform audits and fix possible errors in the exported Contentstack data.
@@ -141,21 +155,28 @@ Perform audits and find possible errors in the exported Contentstack data
141155

142156
```
143157
USAGE
144-
$ csdx cm:stacks:audit [--report-path <value>] [--modules
145-
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--columns <value> | ] [--sort
146-
<value>] [--filter <value>] [--csv | --no-truncate]
158+
$ csdx cm:stacks:audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
159+
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--columns <value>] [--sort
160+
<value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
147161
148162
FLAGS
149163
--modules=<option>... Provide the list of modules to be audited
150164
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
151165
--report-path=<value> Path to store the audit reports
152166
167+
COMMON FLAGS
168+
-c, --config=<value> Path of the external config
169+
-d, --data-dir=<value> Path where the data is stored
170+
153171
TABLE FLAGS
154-
--columns=<value> Show only the specified columns (comma-separated)
155-
--csv The output is in the CSV format [alias: --output=csv]
156-
--filter=<value> Filter property by partial string matching. For example: name=foo
157-
--no-truncate The output is not truncated to fit the screen
158-
--sort=<value> Property to sort by (prepend '-' for descending)
172+
--columns=<value> Specify columns to display, comma-separated.
173+
--csv Output results in CSV format.
174+
--filter=<value> Filter rows by a column value (e.g., name=foo).
175+
--no-header Hide table headers in output.
176+
--no-truncate Prevent truncation of long text in columns.
177+
--output=<option> Specify output format: csv, json, or yaml.
178+
<options: csv|json|yaml>
179+
--sort=<value> Sort the table by a column. Use "-" for descending.
159180
160181
DESCRIPTION
161182
Perform audits and find possible errors in the exported Contentstack data
@@ -184,10 +205,10 @@ Perform audits and fix possible errors in the exported Contentstack data.
184205

185206
```
186207
USAGE
187-
$ csdx cm:stacks:audit:fix [--report-path <value>] [--modules
188-
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--copy-path <value> --copy-dir]
189-
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types] [--columns <value> | ]
190-
[--sort <value>] [--filter <value>] [--csv | --no-truncate]
208+
$ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
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...] [--columns <value>]
211+
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
191212
192213
FLAGS
193214
--copy-dir Create backup from the original data.
@@ -198,12 +219,19 @@ FLAGS
198219
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
199220
--report-path=<value> Path to store the audit reports
200221
222+
COMMON FLAGS
223+
-c, --config=<value> Path of the external config
224+
-d, --data-dir=<value> Path where the data is stored
225+
201226
TABLE FLAGS
202-
--columns=<value> Show only the specified columns (comma-separated)
203-
--csv The output is in the CSV format [alias: --output=csv]
204-
--filter=<value> Filter property by partial string matching. For example: name=foo
205-
--no-truncate The output is not truncated to fit the screen
206-
--sort=<value> Property to sort by (prepend '-' for descending)
227+
--columns=<value> Specify columns to display, comma-separated.
228+
--csv Output results in CSV format.
229+
--filter=<value> Filter rows by a column value (e.g., name=foo).
230+
--no-header Hide table headers in output.
231+
--no-truncate Prevent truncation of long text in columns.
232+
--output=<option> Specify output format: csv, json, or yaml.
233+
<options: csv|json|yaml>
234+
--sort=<value> Sort the table by a column. Use "-" for descending.
207235
208236
DESCRIPTION
209237
Perform audits and fix possible errors in the exported Contentstack data.
@@ -228,16 +256,16 @@ EXAMPLES
228256

229257
_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)_
230258

231-
## `csdx help [COMMANDS]`
259+
## `csdx help [COMMAND]`
232260

233261
Display help for csdx.
234262

235263
```
236264
USAGE
237-
$ csdx help [COMMANDS] [-n]
265+
$ csdx help [COMMAND...] [-n]
238266
239267
ARGUMENTS
240-
COMMANDS Command to show help for.
268+
COMMAND... Command to show help for.
241269
242270
FLAGS
243271
-n, --nested-commands Include all nested commands in the output.
@@ -246,7 +274,7 @@ DESCRIPTION
246274
Display help for csdx.
247275
```
248276

249-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.20/src/commands/help.ts)_
277+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.27/src/commands/help.ts)_
250278

251279
## `csdx plugins`
252280

@@ -277,10 +305,10 @@ Installs a plugin into csdx.
277305

278306
```
279307
USAGE
280-
$ csdx plugins:add PLUGIN [--json] [-f] [-h] [-s | -v]
308+
$ csdx plugins:add PLUGIN... [--json] [-f] [-h] [-s | -v]
281309
282310
ARGUMENTS
283-
PLUGIN Plugin to install.
311+
PLUGIN... Plugin to install.
284312
285313
FLAGS
286314
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
@@ -327,7 +355,7 @@ USAGE
327355
$ csdx plugins:inspect PLUGIN...
328356
329357
ARGUMENTS
330-
PLUGIN [default: .] Plugin to inspect.
358+
PLUGIN... [default: .] Plugin to inspect.
331359
332360
FLAGS
333361
-h, --help Show CLI help.
@@ -351,10 +379,10 @@ Installs a plugin into csdx.
351379

352380
```
353381
USAGE
354-
$ csdx plugins:install PLUGIN [--json] [-f] [-h] [-s | -v]
382+
$ csdx plugins:install PLUGIN... [--json] [-f] [-h] [-s | -v]
355383
356384
ARGUMENTS
357-
PLUGIN Plugin to install.
385+
PLUGIN... Plugin to install.
358386
359387
FLAGS
360388
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
@@ -406,9 +434,9 @@ ARGUMENTS
406434
PATH [default: .] path to plugin
407435
408436
FLAGS
409-
-h, --help Show CLI help.
437+
-h, --help Show CLI help.
410438
-v, --verbose
411-
--[no-]install Install dependencies after linking the plugin.
439+
--[no-]install Install dependencies after linking the plugin.
412440
413441
DESCRIPTION
414442
Links a plugin into the CLI for development.
@@ -431,10 +459,10 @@ Removes a plugin from the CLI.
431459

432460
```
433461
USAGE
434-
$ csdx plugins:remove [PLUGIN] [-h] [-v]
462+
$ csdx plugins:remove [PLUGIN...] [-h] [-v]
435463
436464
ARGUMENTS
437-
PLUGIN plugin to uninstall
465+
PLUGIN... plugin to uninstall
438466
439467
FLAGS
440468
-h, --help Show CLI help.
@@ -472,10 +500,10 @@ Removes a plugin from the CLI.
472500

473501
```
474502
USAGE
475-
$ csdx plugins:uninstall [PLUGIN] [-h] [-v]
503+
$ csdx plugins:uninstall [PLUGIN...] [-h] [-v]
476504
477505
ARGUMENTS
478-
PLUGIN plugin to uninstall
506+
PLUGIN... plugin to uninstall
479507
480508
FLAGS
481509
-h, --help Show CLI help.
@@ -500,10 +528,10 @@ Removes a plugin from the CLI.
500528

501529
```
502530
USAGE
503-
$ csdx plugins:unlink [PLUGIN] [-h] [-v]
531+
$ csdx plugins:unlink [PLUGIN...] [-h] [-v]
504532
505533
ARGUMENTS
506-
PLUGIN plugin to uninstall
534+
PLUGIN... plugin to uninstall
507535
508536
FLAGS
509537
-h, --help Show CLI help.

packages/contentstack-audit/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"/oclif.manifest.json"
1919
],
2020
"dependencies": {
21-
"@contentstack/cli-command": "~1.3.3",
22-
"@contentstack/cli-utilities": "~1.9.0",
23-
"@oclif/plugin-help": "^5.2.20",
24-
"@oclif/plugin-plugins": "^5.4.34",
21+
"@contentstack/cli-command": "~1.4.0",
22+
"@oclif/plugin-help": "^6.2.25",
23+
"@contentstack/cli-utilities": "~1.10.0",
24+
"@oclif/plugin-plugins": "^5.4.24",
2525
"chalk": "^4.1.2",
2626
"fast-csv": "^4.3.6",
2727
"fs-extra": "^11.3.0",
@@ -30,19 +30,19 @@
3030
"winston": "^3.17.0"
3131
},
3232
"devDependencies": {
33-
"@oclif/test": "^4.1.12",
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.28",
37+
"@types/node": "^20.17.19",
3838
"@types/uuid": "^9.0.8",
3939
"chai": "^4.5.0",
4040
"eslint": "^8.57.1",
41-
"eslint-config-oclif": "^4.0.0",
41+
"eslint-config-oclif": "^6.0.15",
4242
"eslint-config-oclif-typescript": "^3.1.14",
4343
"mocha": "^10.8.2",
4444
"nyc": "^15.1.0",
45-
"oclif": "^3.17.2",
45+
"oclif": "^4.17.30",
4646
"shx": "^0.3.4",
4747
"sinon": "^19.0.5",
4848
"ts-node": "^10.9.2",

0 commit comments

Comments
 (0)