@contentstack/cli-audit 1.6.4 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
19
19
  $ csdx COMMAND
20
20
  running command...
21
21
  $ csdx (--version|-v)
22
- @contentstack/cli-audit/1.6.4 linux-x64 node-v18.20.4
22
+ @contentstack/cli-audit/1.6.5 linux-x64 node-v18.20.4
23
23
  $ csdx --help [COMMAND]
24
24
  USAGE
25
25
  $ csdx COMMAND
@@ -267,7 +267,7 @@ EXAMPLES
267
267
  $ csdx plugins
268
268
  ```
269
269
 
270
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/index.ts)_
270
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/index.ts)_
271
271
 
272
272
  ## `csdx plugins:add PLUGIN`
273
273
 
@@ -341,7 +341,7 @@ EXAMPLES
341
341
  $ csdx plugins:inspect myplugin
342
342
  ```
343
343
 
344
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/inspect.ts)_
344
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/inspect.ts)_
345
345
 
346
346
  ## `csdx plugins:install PLUGIN`
347
347
 
@@ -390,7 +390,7 @@ EXAMPLES
390
390
  $ csdx plugins:install someuser/someplugin
391
391
  ```
392
392
 
393
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/install.ts)_
393
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/install.ts)_
394
394
 
395
395
  ## `csdx plugins:link PATH`
396
396
 
@@ -420,7 +420,7 @@ EXAMPLES
420
420
  $ csdx plugins:link myplugin
421
421
  ```
422
422
 
423
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/link.ts)_
423
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/link.ts)_
424
424
 
425
425
  ## `csdx plugins:remove [PLUGIN]`
426
426
 
@@ -461,7 +461,7 @@ FLAGS
461
461
  --reinstall Reinstall all plugins after uninstalling.
462
462
  ```
463
463
 
464
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/reset.ts)_
464
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/reset.ts)_
465
465
 
466
466
  ## `csdx plugins:uninstall [PLUGIN]`
467
467
 
@@ -489,7 +489,7 @@ EXAMPLES
489
489
  $ csdx plugins:uninstall myplugin
490
490
  ```
491
491
 
492
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/uninstall.ts)_
492
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/uninstall.ts)_
493
493
 
494
494
  ## `csdx plugins:unlink [PLUGIN]`
495
495
 
@@ -533,5 +533,5 @@ DESCRIPTION
533
533
  Update installed plugins.
534
534
  ```
535
535
 
536
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.9/src/commands/plugins/update.ts)_
536
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/update.ts)_
537
537
  <!-- commandsstop -->
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tableColumnDescriptions = exports.auditFixMsg = exports.auditMsg = exports.commonMsg = exports.errors = exports.$t = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const memoize_1 = tslib_1.__importDefault(require("lodash/memoize"));
6
- const cli_utilities_1 = require("@contentstack/cli-utilities");
7
6
  const errors = {};
8
7
  exports.errors = errors;
9
8
  const tableColumnDescriptions = {
@@ -50,7 +49,7 @@ const auditFixMsg = {
50
49
  AUDIT_FIX_CMD_DESCRIPTION: 'Perform audits and fix possible errors in the exported Contentstack data.',
51
50
  WF_FIX_MSG: 'Successfully removed the workflow {uid} named {name}.',
52
51
  ENTRY_MANDATORY_FIELD_FIX: `Removing the publish details from the entry with UID '{uid}' in Locale '{locale}'...`,
53
- ENTRY_SELECT_FIELD_FIX: `Adding the value '{value}' in the select field of entry UID '{uid}'...`
52
+ ENTRY_SELECT_FIELD_FIX: `Adding the value '{value}' in the select field of entry UID '{uid}'...`,
54
53
  };
55
54
  exports.auditFixMsg = auditFixMsg;
56
55
  const messages = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, errors), commonMsg), auditMsg), auditFixMsg), tableColumnDescriptions);
@@ -68,13 +67,9 @@ function $t(msg, args) {
68
67
  if (!msg)
69
68
  return '';
70
69
  for (const key of Object.keys(args)) {
71
- const escapedKey = (0, cli_utilities_1.escapeRegExp)(key);
72
- const escapedKeyRegex = new RegExp(`{${escapedKey}}`, 'g');
73
- let { status } = (0, cli_utilities_1.validateRegex)(escapedKeyRegex);
74
- if (status === 'safe') {
75
- const sanitizedValue = args[key] ? (0, cli_utilities_1.escapeRegExp)(args[key]) : '';
76
- msg = msg.replace(escapedKeyRegex, sanitizedValue || escapedKey);
77
- }
70
+ const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
71
+ const placeholder = `{${escapedKey}}`;
72
+ msg = msg.split(placeholder).join(args[key]);
78
73
  }
79
74
  return msg;
80
75
  });
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.4",
2
+ "version": "1.6.5",
3
3
  "commands": {
4
4
  "cm:stacks:audit:fix": {
5
5
  "id": "cm:stacks:audit:fix",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/cli-audit",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "Contentstack audit plugin",
5
5
  "author": "Contentstack CLI",
6
6
  "homepage": "https://github.com/contentstack/cli",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@contentstack/cli-command": "~1.2.19",
22
- "@contentstack/cli-utilities": "~1.7.0",
22
+ "@contentstack/cli-utilities": "~1.7.1",
23
23
  "@oclif/plugin-help": "^5",
24
24
  "@oclif/plugin-plugins": "^5.0.0",
25
25
  "chalk": "^4.1.2",
@@ -86,4 +86,4 @@
86
86
  "keywords": [
87
87
  "oclif"
88
88
  ]
89
- }
89
+ }