Skip to content

Commit 0c41fc9

Browse files
authored
Merge pull request #13 from contentstack/fix/CS-31074
Fixed issue CS - 31074
2 parents 48e114c + 12d092b commit 0c41fc9

File tree

9 files changed

+17674
-3954
lines changed

9 files changed

+17674
-3954
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*-debug.log
22
*-error.log
3+
*.log
4+
.dccache
35
/.nyc_output
46
/dist
57
/lib

.talismanrc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
fileignoreconfig:
2-
- filename: messages/index.json
3-
checksum: 3f5de31da9c8956bf1d313a027faa78c1695eff7d6c0104d48e9f6aa45d7a083
4-
- filename: package-lock.json
5-
checksum: 6e24ee1a7e5a38f46df585bcf0a5711b7f05f3343dda84f5dd657b9baa867b9a
6-
- filename: src/commands/cm/stacks/validate-regex.ts
7-
checksum: 60a38392c57ddfd834c0b8204a7b766d53e47681e11e7eb1936bf624a09ee70e
8-
- filename: src/utils/connect-stack.ts
9-
checksum: 93a3bfe4672280d58668be94baeeb3c254cf2850e9c51af79951fcf3cad916cb
10-
- filename: test/utils/connect-stack.test.ts
11-
checksum: 42b14b635cef68608fb7835e91a4123731accf660c7e6a897672f28a277e27ea
12-
- filename: test/utils/get-management-token.test.ts
13-
checksum: 27bf7650b7264db640f23aa75ce21c4ecfa4f32ddc5caed48952dc12e9c59f41
2+
- filename: package-lock.json
3+
checksum: 4dc3e113527983251f6351c3fbfb9bc6129331c3ee85a78f10d72cdcc9de8186
4+
- filename: src/commands/cm/stacks/validate-regex.ts
5+
checksum: 883813675c599a981450130bcd377eb44aad27bf86628c56bfc89a7f1ac47d5e
6+
- filename: messages/index.json
7+
checksum: 01e9c9b943bfa1ebe6e7d6bede86b55b08641d64b9cc8af6cedea5c0a6273468
8+
version: ""

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Contentstack
3+
Copyright (c) 2022 Contentstack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
cli-cm-regex-validate
2-
=====================
1+
# cli-cm-regex-validate
32

43
Validate Fields with Regex Property of Content Type and Global Field in a Stack
54

@@ -9,26 +8,35 @@ Validate Fields with Regex Property of Content Type and Global Field in a Stack
98
[![License](https://img.shields.io/npm/l/cli-cm-regex-validate.svg)](https://github.com/contentstack/cli-cm-regex-validate/blob/master/package.json)
109

1110
<!-- toc -->
12-
* [Usage](#usage)
13-
* [Commands](#commands)
11+
12+
- [Usage](#usage)
13+
- [Commands](#commands)
1414
<!-- tocstop -->
15+
1516
# Usage
17+
1618
<!-- usage -->
19+
1720
```sh-session
18-
$ npm install -g @contentstack/cli-cm-regex-validate
21+
$ npm install -g @contentstack/cli
22+
$ csdx plugins:install @contentstack/cli-cm-regex-validate
1923
$ csdx COMMAND
2024
running command...
2125
$ csdx (-v|--version|version)
22-
@contentstack/cli-cm-regex-validate/1.0.0 linux-x64 node-v10.19.0
26+
@contentstack/cli-cm-regex-validate/1.0.2 darwin-x64 node-v16.17.0
2327
$ csdx --help [COMMAND]
2428
USAGE
2529
$ csdx COMMAND
2630
...
2731
```
32+
2833
<!-- usagestop -->
34+
2935
# Commands
36+
3037
<!-- commands -->
31-
* [`csdx cm:stacks:validate-regex`](#csdx-cmstacksvalidate-regex)
38+
39+
- [`csdx cm:stacks:validate-regex`](#csdx-cmstacksvalidate-regex)
3240

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

@@ -59,5 +67,6 @@ EXAMPLES
5967
$ csdx cm:stacks:validate-regex -a <management_token_alias> -c -g -f <path/to/the/directory>
6068
```
6169

62-
_See code: [src/commands/cm/stacks/validate-regex.ts](https://github.com/contentstack/cli-cm-regex-validate/blob/v1.0.0/src/commands/cm/stacks/validate-regex.ts)_
70+
_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)_
71+
6372
<!-- commandsstop -->

SECURITY.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Security
2+
3+
Contentstack takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations.
4+
5+
If you believe you have found a security vulnerability in any Contentstack-owned repository, please report it to us as described below.
6+
7+
## Reporting Security Issues
8+
9+
**Please do not report security vulnerabilities through public GitHub issues.**
10+
11+
Send email to [[email protected]](mailto:[email protected]).
12+
13+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
14+
15+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
16+
17+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
18+
- Full paths of source file(s) related to the manifestation of the issue
19+
- The location of the affected source code (tag/branch/commit or direct URL)
20+
- Any special configuration required to reproduce the issue
21+
- Step-by-step instructions to reproduce the issue
22+
- Proof-of-concept or exploit code (if possible)
23+
- Impact of the issue, including how an attacker might exploit the issue
24+
25+
This information will help us triage your report more quickly.
26+
27+
[https://www.contentstack.com/trust/](https://www.contentstack.com/trust/)

messages/index.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"validateRegex": {
3-
"command":{
4-
"description": "This command is used to find all the invalid regexes present in the content types and global fields of your stack.",
5-
"alias": "Alias (name) assigned to the management token",
6-
"contentTypes": "To find invalid regexes within the content types",
7-
"globalFields": "To find invalid regexes within the global fields",
8-
"filePath": "[optional] The path or the location in your file system where the CSV output file should be stored.",
9-
"help": "To show the flags that can be used with this CLI command",
10-
"login": "https://www.contentstack.com/docs/developers/cli/authenticate-with-the-cli/#login",
11-
"addManagementToken": "https://www.contentstack.com/docs/developers/cli/authenticate-with-the-cli/#add-management-token"
12-
},
13-
"interactive": {
14-
"requireToken": "Enter management token alias:",
15-
"required": "Required.",
16-
"selectSchema": "Select the module you need to check.",
17-
"selectOne": "Select at least one option."
18-
},
19-
"cliAction": {
20-
"connectStackStart": "Connecting stack",
21-
"connectStackStop": "Stack connection established. Time taken: ",
22-
"processStackStart": "Processing stack",
23-
"processStackStop": "Stack processing completed. Time taken: "
24-
},
25-
"errors": {
26-
"login": "Could not log in as authorization failed. Log in using csdx auth:login",
27-
"tokenNotFound": "Token not found. Add a token using csdx auth:tokens:add",
28-
"stack": {
29-
"fetch": "Error in connecting to the stack. Please try again.",
30-
"apiKey": "Invalid stack API Key provided.",
31-
"contentTypes": "Error in querying content types.",
32-
"globalFields": "Error in querying global fields."
33-
},
34-
"csvOutput": "Failed to generate CSV output."
35-
},
36-
"output":{
37-
"tableOutput": "The following table shows the invalid regexes present in your stack.",
38-
"csvOutput": "CSV output stored successfully at:",
39-
"noInvalidRegex": "There are no invalid regexes in your stack.",
40-
"docsLink": "To know more, visit our documentation site on catastrophic-backtracking: https://www.contentstack.com/docs/developers/create-content-types/validation-regex/#prevent-catastrophic-backtracking"
41-
}
2+
"validateRegex": {
3+
"command": {
4+
"description": "This command is used to find all the invalid regexes present in the content types and global fields of your stack.",
5+
"alias": "Alias (name) assigned to the management token",
6+
"contentTypes": "To find invalid regexes within the content types",
7+
"globalFields": "To find invalid regexes within the global fields",
8+
"filePath": "[optional] The path or the location in your file system where the CSV output file should be stored.",
9+
"help": "To show the flags that can be used with this CLI command",
10+
"login": "https://www.contentstack.com/docs/developers/cli/cli-authentication/#login",
11+
"addManagementToken": "https://www.contentstack.com/docs/developers/cli/cli-authentication/#add-management-token"
12+
},
13+
"interactive": {
14+
"requireToken": "Enter management token alias:",
15+
"required": "Required.",
16+
"selectSchema": "Select the module you need to check.",
17+
"selectOne": "Select at least one option."
18+
},
19+
"cliAction": {
20+
"connectStackStart": "Connecting stack",
21+
"connectStackStop": "Stack connection established. Time taken: ",
22+
"processStackStart": "Processing stack",
23+
"processStackStop": "Stack processing completed. Time taken: "
24+
},
25+
"errors": {
26+
"login": "Could not log in as authorization failed. Log in using csdx auth:login",
27+
"tokenNotFound": "Token not found. Add a token using csdx auth:tokens:add",
28+
"stack": {
29+
"fetch": "Error in connecting to the stack. Please try again.",
30+
"apiKey": "Invalid stack API Key provided.",
31+
"contentTypes": "Error in querying content types.",
32+
"globalFields": "Error in querying global fields."
33+
},
34+
"csvOutput": "Failed to generate CSV output."
35+
},
36+
"output": {
37+
"tableOutput": "The following table shows the invalid regexes present in your stack.",
38+
"csvOutput": "CSV output stored successfully at:",
39+
"noInvalidRegex": "There are no invalid regexes in your stack.",
40+
"docsLink": "To know more, visit our documentation site on catastrophic-backtracking: https://www.contentstack.com/docs/developers/create-content-types/validation-regex/#prevent-catastrophic-backtracking"
4241
}
42+
}
4343
}

0 commit comments

Comments
 (0)