Skip to content

Commit

Permalink
Merge pull request #20 from contentstack/latest-cli-changes
Browse files Browse the repository at this point in the history
Latest cli changes
  • Loading branch information
shafeeqd959 authored Apr 16, 2024
2 parents 4e9e587 + f88e4c9 commit c85ac02
Show file tree
Hide file tree
Showing 99 changed files with 7,328 additions and 12,119 deletions.
11,939 changes: 2,485 additions & 9,454 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "csdx",
"version": "1.0.0",
"devDependencies": {
"pnpm": "^7.23.0"
"pnpm": "^7.33.7"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"private": true,
"scripts": {
Expand All @@ -14,7 +14,10 @@
"bootstrap": "pnpm install --no-frozen-lockfile",
"prepack": "pnpm --filter \"./packages/*\" -w prepack",
"package-lock-only": "npm i --package-lock-only --workspaces",
"setup-repo": "npm i && pnpm package-lock-only && pnpm clean && pnpm install --no-frozen-lockfile && pnpm prepack"
"setup-repo-old": "npm i && pnpm package-lock-only && pnpm clean && pnpm install --no-frozen-lockfile && pnpm prepack",
"clean-repo": "rm -rf ./package-lock.json ./node_modules ./packages/**/node_modules ./packages/**/.nyc_output ./packages/**/package-lock.json",
"preinstall-clean": "npm run clean-repo && npm cache clean --force && npx pnpm store prune",
"setup-repo": "npm run preinstall-clean && npm i && npm run package-lock-only && npm run clean && pnpm install --no-frozen-lockfile && npm run prepack"
},
"license": "MIT",
"workspaces": [
Expand Down
146 changes: 78 additions & 68 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.4.1 darwin-arm64 node-v20.8.0
@contentstack/cli-audit/1.5.2 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -36,14 +36,14 @@ USAGE
* [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)
* [`csdx help [COMMANDS]`](#csdx-help-commands)
* [`csdx plugins`](#csdx-plugins)
* [`csdx plugins:install PLUGIN...`](#csdx-pluginsinstall-plugin)
* [`csdx plugins:add PLUGIN`](#csdx-pluginsadd-plugin)
* [`csdx plugins:inspect PLUGIN...`](#csdx-pluginsinspect-plugin)
* [`csdx plugins:install PLUGIN...`](#csdx-pluginsinstall-plugin-1)
* [`csdx plugins:link PLUGIN`](#csdx-pluginslink-plugin)
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin)
* [`csdx plugins:install PLUGIN`](#csdx-pluginsinstall-plugin)
* [`csdx plugins:link PATH`](#csdx-pluginslink-path)
* [`csdx plugins:remove [PLUGIN]`](#csdx-pluginsremove-plugin)
* [`csdx plugins:reset`](#csdx-pluginsreset)
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin-1)
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin-2)
* [`csdx plugins:uninstall [PLUGIN]`](#csdx-pluginsuninstall-plugin)
* [`csdx plugins:unlink [PLUGIN]`](#csdx-pluginsunlink-plugin)
* [`csdx plugins:update`](#csdx-pluginsupdate)

## `csdx audit`
Expand All @@ -53,12 +53,12 @@ Perform audits and find possible errors in the exported Contentstack data
```
USAGE
$ csdx audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries] [--columns <value> | ] [--sort <value>] [--filter <value>] [--csv |
--no-truncate]
content-types|global-fields|entries|extensions|workflows] [--columns <value> | ] [--sort <value>] [--filter <value>]
[--csv | --no-truncate]
FLAGS
--modules=<option>... Provide the list of modules to be audited
<options: content-types|global-fields|entries>
<options: content-types|global-fields|entries|extensions|workflows>
--report-path=<value> Path to store the audit reports
COMMON FLAGS
Expand Down Expand Up @@ -98,17 +98,17 @@ Perform audits and fix possible errors in the exported Contentstack data.
```
USAGE
$ csdx audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries] [--copy-path <value> --copy-dir] [--fix-only
reference|global_field|json:rte|json:extension|blocks|group] [--columns <value> | ] [--sort <value>] [--filter
<value>] [--csv | --no-truncate]
content-types|global-fields|entries|extensions|workflows] [--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]
FLAGS
--copy-dir Create backup from the original data.
--copy-path=<value> Provide the path to backup the copied data
--fix-only=<option>... Provide the list of fix options
<options: reference|global_field|json:rte|json:extension|blocks|group>
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
--modules=<option>... Provide the list of modules to be audited
<options: content-types|global-fields|entries>
<options: content-types|global-fields|entries|extensions|workflows>
--report-path=<value> Path to store the audit reports
COMMON FLAGS
Expand Down Expand Up @@ -150,12 +150,12 @@ Perform audits and find possible errors in the exported Contentstack data
```
USAGE
$ csdx cm:stacks:audit [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries] [--columns <value> | ] [--sort <value>] [--filter <value>] [--csv |
--no-truncate]
content-types|global-fields|entries|extensions|workflows] [--columns <value> | ] [--sort <value>] [--filter <value>]
[--csv | --no-truncate]
FLAGS
--modules=<option>... Provide the list of modules to be audited
<options: content-types|global-fields|entries>
<options: content-types|global-fields|entries|extensions|workflows>
--report-path=<value> Path to store the audit reports
COMMON FLAGS
Expand Down Expand Up @@ -197,17 +197,17 @@ Perform audits and fix possible errors in the exported Contentstack data.
```
USAGE
$ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--report-path <value>] [--modules
content-types|global-fields|entries] [--copy-path <value> --copy-dir] [--fix-only
reference|global_field|json:rte|json:extension|blocks|group] [--columns <value> | ] [--sort <value>] [--filter
<value>] [--csv | --no-truncate]
content-types|global-fields|entries|extensions|workflows] [--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]
FLAGS
--copy-dir Create backup from the original data.
--copy-path=<value> Provide the path to backup the copied data
--fix-only=<option>... Provide the list of fix options
<options: reference|global_field|json:rte|json:extension|blocks|group>
<options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
--modules=<option>... Provide the list of modules to be audited
<options: content-types|global-fields|entries>
<options: content-types|global-fields|entries|extensions|workflows>
--report-path=<value> Path to store the audit reports
COMMON FLAGS
Expand Down Expand Up @@ -285,48 +285,53 @@ EXAMPLES
$ csdx plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/index.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/index.ts)_

## `csdx plugins:install PLUGIN...`
## `csdx plugins:add PLUGIN`

Installs a plugin into the CLI.
Installs a plugin into csdx.

```
USAGE
$ csdx plugins:install PLUGIN...
$ csdx plugins:add PLUGIN [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences yarn output.
-v, --verbose Show verbose yarn output.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installs a plugin into csdx.
Installation of a user-installed plugin will override a core plugin.
Uses bundled npm executable to install plugins into /Users/shafeeq.pp/.local/share/@contentstack/cli-audit
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
Installation of a user-installed plugin will override a core plugin.
Use the CSDX_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the CSDX_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ csdx plugins:add
EXAMPLES
$ csdx plugins:add myplugin
Install a plugin from npm registry.
$ csdx plugins:add myplugin
Install a plugin from a github url.
$ csdx plugins:add https://github.com/someuser/someplugin
$ csdx plugins:add https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ csdx plugins:add someuser/someplugin
$ csdx plugins:add someuser/someplugin
```

## `csdx plugins:inspect PLUGIN...`
Expand Down Expand Up @@ -354,59 +359,64 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/inspect.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/inspect.ts)_

## `csdx plugins:install PLUGIN...`
## `csdx plugins:install PLUGIN`

Installs a plugin into the CLI.
Installs a plugin into csdx.

```
USAGE
$ csdx plugins:install PLUGIN...
$ csdx plugins:install PLUGIN [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN Plugin to install.
FLAGS
-f, --force Run yarn install with force flag.
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences yarn output.
-v, --verbose Show verbose yarn output.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into the CLI.
Can be installed from npm or a git url.
Installs a plugin into csdx.
Installation of a user-installed plugin will override a core plugin.
Uses bundled npm executable to install plugins into /Users/shafeeq.pp/.local/share/@contentstack/cli-audit
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
Installation of a user-installed plugin will override a core plugin.
Use the CSDX_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the CSDX_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ csdx plugins:add
EXAMPLES
$ csdx plugins:install myplugin
Install a plugin from npm registry.
$ csdx plugins:install myplugin
Install a plugin from a github url.
$ csdx plugins:install https://github.com/someuser/someplugin
$ csdx plugins:install https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ csdx plugins:install someuser/someplugin
$ csdx plugins:install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/install.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/install.ts)_

## `csdx plugins:link PLUGIN`
## `csdx plugins:link PATH`

Links a plugin into the CLI for development.

```
USAGE
$ csdx plugins:link PLUGIN
$ csdx plugins:link PATH [-h] [--install] [-v]
ARGUMENTS
PATH [default: .] path to plugin
Expand All @@ -428,15 +438,15 @@ EXAMPLES
$ csdx plugins:link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/link.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/link.ts)_

## `csdx plugins:uninstall PLUGIN...`
## `csdx plugins:remove [PLUGIN]`

Removes a plugin from the CLI.

```
USAGE
$ csdx plugins:uninstall PLUGIN...
$ csdx plugins:remove [PLUGIN] [-h] [-v]
ARGUMENTS
PLUGIN plugin to uninstall
Expand Down Expand Up @@ -469,15 +479,15 @@ FLAGS
--reinstall Reinstall all plugins after uninstalling.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/reset.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/reset.ts)_

## `csdx plugins:uninstall PLUGIN...`
## `csdx plugins:uninstall [PLUGIN]`

Removes a plugin from the CLI.

```
USAGE
$ csdx plugins:uninstall PLUGIN...
$ csdx plugins:uninstall [PLUGIN] [-h] [-v]
ARGUMENTS
PLUGIN plugin to uninstall
Expand All @@ -497,15 +507,15 @@ EXAMPLES
$ csdx plugins:uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/uninstall.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/uninstall.ts)_

## `csdx plugins:uninstall PLUGIN...`
## `csdx plugins:unlink [PLUGIN]`

Removes a plugin from the CLI.

```
USAGE
$ csdx plugins:uninstall PLUGIN...
$ csdx plugins:unlink [PLUGIN] [-h] [-v]
ARGUMENTS
PLUGIN plugin to uninstall
Expand Down Expand Up @@ -541,5 +551,5 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.3.10/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.9/src/commands/plugins/update.ts)_
<!-- commandsstop -->
8 changes: 4 additions & 4 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.4.1",
"version": "1.5.2",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -19,9 +19,9 @@
],
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.12",
"@contentstack/cli-utilities": "~1.6.0",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^4.1.9",
"@oclif/plugin-plugins": "^5.0.0",
"chalk": "^4.1.2",
"fast-csv": "^4.3.6",
"fs-extra": "^11.1.1",
Expand Down Expand Up @@ -86,4 +86,4 @@
"keywords": [
"oclif"
]
}
}
Loading

0 comments on commit c85ac02

Please sign in to comment.