Skip to content

Commit c863bd7

Browse files
author
naman-contentstack
committed
resolved comments
1 parent 2ed881e commit c863bd7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/contentstack-audit/src/audit-base-command.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
5959
*/
6060
async start(command: CommandNames): Promise<boolean> {
6161
this.currentCommand = command;
62-
// Initialize audit context
63-
createLogContext(this.context?.info?.command,'', configHandler.get('authenticationMethod'));
62+
// Initialize audit context (reused, no need to call again in scanAndFix)
63+
createLogContext(this.context?.info?.command, '', configHandler.get('authenticationMethod'));
6464
this.auditContext = { module: 'audit' };
6565
log.debug(`Starting audit command: ${command}`, this.auditContext);
6666
log.info(`Starting audit command: ${command}`, this.auditContext);
@@ -213,7 +213,6 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
213213
log.debug(`Data module wise: ${JSON.stringify(dataModuleWise)}`, this.auditContext);
214214
for (const module of this.sharedConfig.flags.modules || this.sharedConfig.modules) {
215215
// Update audit context with current module
216-
createLogContext(this.context?.info?.command, '', configHandler.get('authenticationMethod'));
217216
this.auditContext = { module: module };
218217
log.debug(`Starting audit for module: ${module}`, this.auditContext);
219218
log.info(`Starting audit for module: ${module}`, this.auditContext);

packages/contentstack/src/hooks/prerun/latest-version-warning.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export default async function (_opts): Promise<void> {
1111
const logger: LoggerService = new LoggerService(process.env.CS_CLI_LOG_PATH || process.cwd(), 'cli-log');
1212
let cache: IVersionUpgradeCache = { lastChecked: 0, lastWarnedDate: '', latestVersion: '' };
1313

14-
if(!configHandler.get('CLI_VERSION') || configHandler.get('CLI_VERSION') !== this.config.version) { // if CLI_VERSION is not set or is not the same as the current version, set it
14+
// if CLI_VERSION is not set or is not the same as the current version, set it
15+
if (!configHandler.get('CLI_VERSION') || configHandler.get('CLI_VERSION') !== this.config.version) {
1516
configHandler.set('CLI_VERSION', this.config.version); // set current version in configHandler
1617
}
1718

0 commit comments

Comments
 (0)