Skip to content

Commit

Permalink
Merge pull request #30 from contentstack/feat/CS-32562
Browse files Browse the repository at this point in the history
Type fix and version bumped
  • Loading branch information
netrajpatel authored Jun 12, 2023
2 parents 3604bce + d03833c commit 9bbc025
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 121 deletions.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,65 +8,66 @@ Validate Fields with Regex Property of Content Type and Global Field in a Stack
[![License](https://img.shields.io/npm/l/cli-cm-regex-validate.svg)](https://github.com/contentstack/cli-cm-regex-validate/blob/master/package.json)

<!-- toc -->

- [Usage](#usage)
- [Commands](#commands)
* [cli-cm-regex-validate](#cli-cm-regex-validate)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->

# Usage

<!-- usage -->

```sh-session
$ npm install -g @contentstack/cli
$ csdx plugins:install @contentstack/cli-cm-regex-validate
$ npm install -g @contentstack/cli-cm-regex-validate
$ csdx COMMAND
running command...
$ csdx (-v|--version|version)
@contentstack/cli-cm-regex-validate/1.0.2 darwin-x64 node-v16.17.0
$ csdx (--version)
@contentstack/cli-cm-regex-validate/1.1.4 darwin-arm64 node-v16.19.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
...
```

<!-- usagestop -->

# Commands

<!-- commands -->

- [`csdx cm:stacks:validate-regex`](#csdx-cmstacksvalidate-regex)
* [`csdx cm:stacks:validate-regex`](#csdx-cmstacksvalidate-regex)

## `csdx cm:stacks:validate-regex`

This command is used to find all the invalid regexes present in the content types and global fields of your stack.

```
USAGE
$ csdx cm:stacks:validate-regex
OPTIONS
-a, --alias=alias Alias (name) assigned to the management token
-c, --contentType To find invalid regexes within the content types
-f, --filePath=filePath [optional] The path or the location in your file system where the CSV output file should be
stored.
$ csdx cm:stacks:validate-regex [-h] [-a <value>] [-c] [-g] [-f <value>]
-g, --globalField To find invalid regexes within the global fields
FLAGS
-a, --alias=<value> Alias (name) assigned to the management token
-c, --contentType To find invalid regexes within the content types
-f, --filePath=<value> [optional] The path or the location in your file system where the CSV output file should be
stored.
-g, --globalField To find invalid regexes within the global fields
-h, --help To show the flags that can be used with this CLI command
-h, --help To show the flags that can be used with this CLI command
DESCRIPTION
This command is used to find all the invalid regexes present in the content types and global fields of your stack.
EXAMPLES
$ csdx cm:stacks:validate-regex
$ csdx cm:stacks:validate-regex -a <management_token_alias>
$ csdx cm:stacks:validate-regex -c
$ csdx cm:stacks:validate-regex -g
$ csdx cm:stacks:validate-regex -f <path/to/the/directory>
$ csdx cm:stacks:validate-regex -a <management_token_alias> -c -g
$ csdx cm:stacks:validate-regex -a <management_token_alias> -c -g -f <path/to/the/directory>
```

_See code: [src/commands/cm/stacks/validate-regex.ts](https://github.com/contentstack/cli-cm-regex-validate/blob/v1.0.2/src/commands/cm/stacks/validate-regex.ts)_

_See code: [src/commands/cm/stacks/validate-regex.ts](https://github.com/contentstack/cli-cm-regex-validate/blob/v1.1.4/src/commands/cm/stacks/validate-regex.ts)_
<!-- commandsstop -->
Loading

0 comments on commit 9bbc025

Please sign in to comment.