Skip to content

Commit 3b31b09

Browse files
Roshan NikamRoshan Nikam
authored andcommitted
added the constant for redacted string
1 parent 716bb15 commit 3b31b09

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

bin/helpers/constants.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ const LATEST_VERSION_SYNTAX_REGEX = /\d*.latest(.\d*)?/gm
211211

212212
const ERROR_EXIT_CODE = 1;
213213

214+
const REDACTED = "[REDACTED]";
215+
214216
module.exports = Object.freeze({
215217
syncCLI,
216218
userMessages,
@@ -228,5 +230,6 @@ module.exports = Object.freeze({
228230
METADATA_CHAR_BUFFER_PER_SPEC,
229231
usageReportingConstants,
230232
LATEST_VERSION_SYNTAX_REGEX,
231-
ERROR_EXIT_CODE
233+
ERROR_EXIT_CODE,
234+
REDACTED
232235
});

bin/helpers/usageReporting.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const cp = require("child_process"),
88
const config = require('./config'),
99
fileLogger = require('./logger').fileLogger,
1010
utils = require('./utils');
11+
12+
const { REDACTED } = require("./constants");
1113

1214
function get_version(package_name) {
1315
try {
@@ -181,8 +183,8 @@ function send(args) {
181183
data.cypress_version = bsConfig.run_settings.cypress_version
182184
}
183185

184-
bsConfig['auth']['username'] = "[REDACTED]"
185-
bsConfig['auth']['access_key'] = "[REDACTED]"
186+
bsConfig['auth']['username'] = REDACTED
187+
bsConfig['auth']['access_key'] = REDACTED
186188

187189
delete args.bstack_config;
188190

0 commit comments

Comments
 (0)