Skip to content

Commit d8bc8e3

Browse files
committed
Updated CLI UI Text Messages
1 parent 9698a0a commit d8bc8e3

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
/tmp
77
/yarn.lock
88
node_modules
9+
/coverage
910
results.csv

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fileignoreconfig:
22
- filename: messages/index.json
3-
checksum: 92a487ae670cb1937b9ebda35204fcecf73125a552c4b2c016ce7aedc8376f49
3+
checksum: 625754a9f5ac2ddf6b55f4566b02a9b5ddfc8538eb92ecc6a03b5810f3aca198
44
- filename: package-lock.json
55
checksum: e0238d0ed7be92e45c5b4f700230dd7b9887d945d24f3dcbaf062154df8856f3
66
- filename: src/commands/cm/stacks/validate-regex.ts

messages/index.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"validateRegex": {
3-
"requireToken": "Enter Token Alias to be used",
3+
"requireToken": "Enter Management Token Alias:",
44
"required": "Required",
55
"tokenDetails": "Token Details: ",
6-
"selectSchema": "Select Schema to be Checked",
7-
"selectOne": "Select atleast one Option",
6+
"selectSchema": "Select the module you need to check.",
7+
"selectOne": "Select atleast one option",
88
"cliAction": {
99
"connectStackStart": "Connecting Stack",
1010
"connectStackStop": "Stack Connection Established. Time taken: ",
1111
"processStackStart": "Processing Stack",
1212
"processStackStop": "Stack Processing Completed. Time taken: "
1313
},
1414
"errors": {
15-
"login": "Authorization failed, you're not logged in, login using csdx auth:login",
16-
"tokenNotFound": "Management Token Alias not found, save using csdx auth:tokens:add",
15+
"login": "Authorization failed, you're not logged in. Login using csdx auth:login",
16+
"tokenNotFound": "Token not found, add token using csdx auth:tokens:add",
1717
"stack": {
18-
"fetch": "Error in connecting to Stack",
19-
"apiKey": "Invalid API Key"
18+
"fetch": "Error in connecting to the stack",
19+
"apiKey": "Invalid stack API Key"
2020
},
21-
"contentTypes": "Error in Querying Content Types",
22-
"globalFields": "Error in Querying Global Fields",
21+
"contentTypes": "Error in querying content types.",
22+
"globalFields": "Error in querying global fields.",
2323
"csvOutput": "Generate CSV Output failed"
2424
},
25-
"tableOutput": "The following Table shows the details of Invalid Regex in your Stack",
26-
"csvOutput": "Csv Output stored successfully at:",
27-
"noInvalidRegex": "There are no Invalid Regex in your Stack",
28-
"docsLink": "To know more, check out our Official Documentation: https://www.contentstack.com/docs/developers/create-content-types/validation-regex/#prevent-catastrophic-backtracking"
25+
"tableOutput": "The following table shows the invalid regexes present in your stack.",
26+
"csvOutput": "Csv output stored successfully at:",
27+
"noInvalidRegex": "There are no invalid regexes in your stack.",
28+
"docsLink": "To know more, visit our documentation site: https://www.contentstack.com/docs/developers/create-content-types/validation-regex/#prevent-catastrophic-backtracking"
2929
}
3030
}

src/commands/cm/stacks/validate-regex.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import connectStack from '../../../utils/connect-stack'
66
const regexMessages = require('../../../../messages/index.json').validateRegex
77

88
export default class CmStacksValidateRegex extends Command {
9-
static description = 'This command is used to check for Invalid Regex in all the Content Types & Global Fields'
9+
static description = 'This command is used to check for all the invalid regexes present in the content types and global fields of your stack.'
1010

1111
static flags = {
1212
help: flags.help({char: 'h'}),
13-
alias: flags.string({char: 'a', description: 'Alias to the token for referring it with other commands.'}),
14-
contentType: flags.boolean({char: 'c', description: 'Add to check Invalid Regex for Content Types'}),
15-
globalField: flags.boolean({char: 'g', description: 'Add to check Invalid Regex for Global Fields'}),
16-
filePath: flags.string({char: 'f', description: 'Mention the path where the Output File will be stored'}),
13+
alias: flags.string({char: 'a', description: 'Alias to the token for referring it with other commands'}),
14+
contentType: flags.boolean({char: 'c', description: 'To check invalid regexes within the content types'}),
15+
globalField: flags.boolean({char: 'g', description: 'To check invalid regexes within the global fields'}),
16+
filePath: flags.string({char: 'f', description: 'The path or the location in your file system where the CSV output file should be stored, e.g., -f "C:\\Users\\Name\\Desktop\\cli\\csv"'}),
1717
}
1818

19-
static usage = 'cm:stacks:validate-regex --alias=[ALIAS_NAME] --contentType --globalField --filePath=[FILE_PATH]'
19+
static usage = '$ csdx cm:stacks:validate-regex --alias=[ALIAS_NAME] --contentType --globalField --filePath=[FILE_PATH]'
2020

2121
static examples = [
2222
'$ csdx cm:stacks:validate-regex',

0 commit comments

Comments
 (0)