Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ jobs:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-import-setup/package.json
access: public
tag: beta
- name: Installing dependencies of export to csv
id: export-to-csv-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}}
Expand Down
30,682 changes: 13,681 additions & 17,001 deletions package-lock.json

Large diffs are not rendered by default.

134 changes: 81 additions & 53 deletions packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-audit/1.9.1 darwin-arm64 node-v22.14.0
@contentstack/cli-audit/1.10.0 darwin-arm64 node-v22.13.1
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -34,7 +34,7 @@ USAGE
* [`csdx audit:fix`](#csdx-auditfix)
* [`csdx cm:stacks:audit`](#csdx-cmstacksaudit)
* [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)
* [`csdx help [COMMANDS]`](#csdx-help-commands)
* [`csdx help [COMMAND]`](#csdx-help-command)
* [`csdx plugins`](#csdx-plugins)
* [`csdx plugins:add PLUGIN`](#csdx-pluginsadd-plugin)
* [`csdx plugins:inspect PLUGIN...`](#csdx-pluginsinspect-plugin)
Expand All @@ -52,21 +52,28 @@ Perform audits and find possible errors in the exported Contentstack data

```
USAGE
$ csdx audit [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--columns <value> | ] [--sort
<value>] [--filter <value>] [--csv | --no-truncate]
$ csdx audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--columns <value>] [--sort
<value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]

FLAGS
--modules=<option>... Provide the list of modules to be audited
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
--report-path=<value> Path to store the audit reports

COMMON FLAGS
-c, --config=<value> Path of the external config
-d, --data-dir=<value> Path where the data is stored

TABLE FLAGS
--columns=<value> Show only the specified columns (comma-separated)
--csv The output is in the CSV format [alias: --output=csv]
--filter=<value> Filter property by partial string matching. For example: name=foo
--no-truncate The output is not truncated to fit the screen
--sort=<value> Property to sort by (prepend '-' for descending)
--columns=<value> Specify columns to display, comma-separated.
--csv Output results in CSV format.
--filter=<value> Filter rows by a column value (e.g., name=foo).
--no-header Hide table headers in output.
--no-truncate Prevent truncation of long text in columns.
--output=<option> Specify output format: csv, json, or yaml.
<options: csv|json|yaml>
--sort=<value> Sort the table by a column. Use "-" for descending.

DESCRIPTION
Perform audits and find possible errors in the exported Contentstack data
Expand All @@ -93,10 +100,10 @@ Perform audits and fix possible errors in the exported Contentstack data.

```
USAGE
$ csdx audit:fix [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--copy-path <value> --copy-dir]
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types] [--columns <value> | ]
[--sort <value>] [--filter <value>] [--csv | --no-truncate]
$ csdx audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--copy-path <value> --copy-dir]
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns <value>]
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]

FLAGS
--copy-dir Create backup from the original data.
Expand All @@ -107,12 +114,19 @@ FLAGS
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
--report-path=<value> Path to store the audit reports

COMMON FLAGS
-c, --config=<value> Path of the external config
-d, --data-dir=<value> Path where the data is stored

TABLE FLAGS
--columns=<value> Show only the specified columns (comma-separated)
--csv The output is in the CSV format [alias: --output=csv]
--filter=<value> Filter property by partial string matching. For example: name=foo
--no-truncate The output is not truncated to fit the screen
--sort=<value> Property to sort by (prepend '-' for descending)
--columns=<value> Specify columns to display, comma-separated.
--csv Output results in CSV format.
--filter=<value> Filter rows by a column value (e.g., name=foo).
--no-header Hide table headers in output.
--no-truncate Prevent truncation of long text in columns.
--output=<option> Specify output format: csv, json, or yaml.
<options: csv|json|yaml>
--sort=<value> Sort the table by a column. Use "-" for descending.

DESCRIPTION
Perform audits and fix possible errors in the exported Contentstack data.
Expand Down Expand Up @@ -141,21 +155,28 @@ Perform audits and find possible errors in the exported Contentstack data

```
USAGE
$ csdx cm:stacks:audit [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--columns <value> | ] [--sort
<value>] [--filter <value>] [--csv | --no-truncate]
$ csdx cm:stacks:audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--columns <value>] [--sort
<value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]

FLAGS
--modules=<option>... Provide the list of modules to be audited
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
--report-path=<value> Path to store the audit reports

COMMON FLAGS
-c, --config=<value> Path of the external config
-d, --data-dir=<value> Path where the data is stored

TABLE FLAGS
--columns=<value> Show only the specified columns (comma-separated)
--csv The output is in the CSV format [alias: --output=csv]
--filter=<value> Filter property by partial string matching. For example: name=foo
--no-truncate The output is not truncated to fit the screen
--sort=<value> Property to sort by (prepend '-' for descending)
--columns=<value> Specify columns to display, comma-separated.
--csv Output results in CSV format.
--filter=<value> Filter rows by a column value (e.g., name=foo).
--no-header Hide table headers in output.
--no-truncate Prevent truncation of long text in columns.
--output=<option> Specify output format: csv, json, or yaml.
<options: csv|json|yaml>
--sort=<value> Sort the table by a column. Use "-" for descending.

DESCRIPTION
Perform audits and find possible errors in the exported Contentstack data
Expand Down Expand Up @@ -184,10 +205,10 @@ Perform audits and fix possible errors in the exported Contentstack data.

```
USAGE
$ csdx cm:stacks:audit:fix [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets] [--copy-path <value> --copy-dir]
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types] [--columns <value> | ]
[--sort <value>] [--filter <value>] [--csv | --no-truncate]
$ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries|extensions|workflows|custom-roles|assets...] [--copy-path <value> --copy-dir]
[--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns <value>]
[--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]

FLAGS
--copy-dir Create backup from the original data.
Expand All @@ -198,12 +219,19 @@ FLAGS
<options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets>
--report-path=<value> Path to store the audit reports

COMMON FLAGS
-c, --config=<value> Path of the external config
-d, --data-dir=<value> Path where the data is stored

TABLE FLAGS
--columns=<value> Show only the specified columns (comma-separated)
--csv The output is in the CSV format [alias: --output=csv]
--filter=<value> Filter property by partial string matching. For example: name=foo
--no-truncate The output is not truncated to fit the screen
--sort=<value> Property to sort by (prepend '-' for descending)
--columns=<value> Specify columns to display, comma-separated.
--csv Output results in CSV format.
--filter=<value> Filter rows by a column value (e.g., name=foo).
--no-header Hide table headers in output.
--no-truncate Prevent truncation of long text in columns.
--output=<option> Specify output format: csv, json, or yaml.
<options: csv|json|yaml>
--sort=<value> Sort the table by a column. Use "-" for descending.

DESCRIPTION
Perform audits and fix possible errors in the exported Contentstack data.
Expand All @@ -228,16 +256,16 @@ EXAMPLES

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

## `csdx help [COMMANDS]`
## `csdx help [COMMAND]`

Display help for csdx.

```
USAGE
$ csdx help [COMMANDS] [-n]
$ csdx help [COMMAND...] [-n]

ARGUMENTS
COMMANDS Command to show help for.
COMMAND... Command to show help for.

FLAGS
-n, --nested-commands Include all nested commands in the output.
Expand All @@ -246,7 +274,7 @@ DESCRIPTION
Display help for csdx.
```

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

## `csdx plugins`

Expand Down Expand Up @@ -277,10 +305,10 @@ Installs a plugin into csdx.

```
USAGE
$ csdx plugins:add PLUGIN [--json] [-f] [-h] [-s | -v]
$ csdx plugins:add PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
PLUGIN Plugin to install.
PLUGIN... Plugin to install.

FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
Expand Down Expand Up @@ -327,7 +355,7 @@ USAGE
$ csdx plugins:inspect PLUGIN...

ARGUMENTS
PLUGIN [default: .] Plugin to inspect.
PLUGIN... [default: .] Plugin to inspect.

FLAGS
-h, --help Show CLI help.
Expand All @@ -351,10 +379,10 @@ Installs a plugin into csdx.

```
USAGE
$ csdx plugins:install PLUGIN [--json] [-f] [-h] [-s | -v]
$ csdx plugins:install PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
PLUGIN Plugin to install.
PLUGIN... Plugin to install.

FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
Expand Down Expand Up @@ -406,9 +434,9 @@ ARGUMENTS
PATH [default: .] path to plugin

FLAGS
-h, --help Show CLI help.
-h, --help Show CLI help.
-v, --verbose
--[no-]install Install dependencies after linking the plugin.
--[no-]install Install dependencies after linking the plugin.

DESCRIPTION
Links a plugin into the CLI for development.
Expand All @@ -431,10 +459,10 @@ Removes a plugin from the CLI.

```
USAGE
$ csdx plugins:remove [PLUGIN] [-h] [-v]
$ csdx plugins:remove [PLUGIN...] [-h] [-v]

ARGUMENTS
PLUGIN plugin to uninstall
PLUGIN... plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -472,10 +500,10 @@ Removes a plugin from the CLI.

```
USAGE
$ csdx plugins:uninstall [PLUGIN] [-h] [-v]
$ csdx plugins:uninstall [PLUGIN...] [-h] [-v]

ARGUMENTS
PLUGIN plugin to uninstall
PLUGIN... plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand All @@ -500,10 +528,10 @@ Removes a plugin from the CLI.

```
USAGE
$ csdx plugins:unlink [PLUGIN] [-h] [-v]
$ csdx plugins:unlink [PLUGIN...] [-h] [-v]

ARGUMENTS
PLUGIN plugin to uninstall
PLUGIN... plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down
16 changes: 8 additions & 8 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "~1.3.3",
"@contentstack/cli-utilities": "~1.9.0",
"@oclif/plugin-help": "^5.2.20",
"@oclif/plugin-plugins": "^5.4.34",
"@contentstack/cli-command": "~1.4.0",
"@oclif/plugin-help": "^6.2.25",
"@contentstack/cli-utilities": "~1.10.0",
"@oclif/plugin-plugins": "^5.4.24",
"chalk": "^4.1.2",
"fast-csv": "^4.3.6",
"fs-extra": "^11.3.0",
Expand All @@ -30,19 +30,19 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.12",
"@oclif/test": "^4.1.11",
"@types/chai": "^4.3.20",
"@types/fs-extra": "^11.0.4",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.28",
"@types/node": "^20.17.19",
"@types/uuid": "^9.0.8",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
"eslint-config-oclif": "^6.0.15",
"eslint-config-oclif-typescript": "^3.1.14",
"mocha": "^10.8.2",
"nyc": "^15.1.0",
"oclif": "^3.17.2",
"oclif": "^4.17.30",
"shx": "^0.3.4",
"sinon": "^19.0.5",
"ts-node": "^10.9.2",
Expand Down
Loading
Loading