@contentstack/cli-audit 1.16.1 → 1.16.2

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Contentstack
3
+ Copyright (c) 2026 Contentstack
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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.16.1 linux-x64 node-v22.21.1
22
+ @contentstack/cli-audit/1.16.2 linux-x64 node-v22.21.1
23
23
  $ csdx --help [COMMAND]
24
24
  USAGE
25
25
  $ csdx COMMAND
@@ -12,10 +12,6 @@ export declare abstract class AuditBaseCommand extends BaseCommand<typeof AuditB
12
12
  get: (row: any) => string;
13
13
  };
14
14
  };
15
- /**
16
- * Create audit context object similar to export command
17
- */
18
- private createAuditContext;
19
15
  /**
20
16
  * The `start` function performs an audit on content types, global fields, entries, and workflows and displays
21
17
  * any missing references.
@@ -33,19 +33,6 @@ class AuditBaseCommand extends base_command_1.BaseCommand {
33
33
  },
34
34
  };
35
35
  }
36
- /**
37
- * Create audit context object similar to export command
38
- */
39
- createAuditContext(moduleName) {
40
- var _a, _b, _c;
41
- return {
42
- command: ((_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.command) || 'cm:stacks:audit',
43
- module: moduleName || 'audit',
44
- email: cli_utilities_1.configHandler.get('email') || '',
45
- sessionId: ((_c = this.context) === null || _c === void 0 ? void 0 : _c.sessionId) || '',
46
- authenticationMethod: cli_utilities_1.configHandler.get('authenticationMethod') || '',
47
- };
48
- }
49
36
  /**
50
37
  * The `start` function performs an audit on content types, global fields, entries, and workflows and displays
51
38
  * any missing references.
@@ -53,9 +40,11 @@ class AuditBaseCommand extends base_command_1.BaseCommand {
53
40
  * being executed.
54
41
  */
55
42
  async start(command) {
43
+ var _a, _b;
56
44
  this.currentCommand = command;
57
- // Initialize audit context
58
- this.auditContext = this.createAuditContext();
45
+ // Initialize audit context (reused, no need to call again in scanAndFix)
46
+ (0, cli_utilities_1.createLogContext)((_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.command, '', cli_utilities_1.configHandler.get('authenticationMethod'));
47
+ this.auditContext = { module: 'audit' };
59
48
  cli_utilities_1.log.debug(`Starting audit command: ${command}`, this.auditContext);
60
49
  cli_utilities_1.log.info(`Starting audit command: ${command}`, this.auditContext);
61
50
  await this.promptQueue();
@@ -154,7 +143,7 @@ class AuditBaseCommand extends base_command_1.BaseCommand {
154
143
  cli_utilities_1.log.debug(`Data module wise: ${JSON.stringify(dataModuleWise)}`, this.auditContext);
155
144
  for (const module of this.sharedConfig.flags.modules || this.sharedConfig.modules) {
156
145
  // Update audit context with current module
157
- this.auditContext = this.createAuditContext(module);
146
+ this.auditContext = { module: module };
158
147
  cli_utilities_1.log.debug(`Starting audit for module: ${module}`, this.auditContext);
159
148
  cli_utilities_1.log.info(`Starting audit for module: ${module}`, this.auditContext);
160
149
  (0, log_1.print)([
@@ -1,8 +1,3 @@
1
1
  export interface AuditContext {
2
- command: string;
3
2
  module: string;
4
- email: string | undefined;
5
- sessionId: string | undefined;
6
- clientId?: string;
7
- authenticationMethod?: string;
8
3
  }
@@ -344,5 +344,5 @@
344
344
  ]
345
345
  }
346
346
  },
347
- "version": "1.16.1"
347
+ "version": "1.16.2"
348
348
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/cli-audit",
3
- "version": "1.16.1",
3
+ "version": "1.16.2",
4
4
  "description": "Contentstack audit plugin",
5
5
  "author": "Contentstack CLI",
6
6
  "homepage": "https://github.com/contentstack/cli",
@@ -18,8 +18,8 @@
18
18
  "/oclif.manifest.json"
19
19
  ],
20
20
  "dependencies": {
21
- "@contentstack/cli-command": "~1.7.0",
22
- "@contentstack/cli-utilities": "~1.15.0",
21
+ "@contentstack/cli-command": "~1.7.1",
22
+ "@contentstack/cli-utilities": "~1.16.0",
23
23
  "@oclif/core": "^4.3.0",
24
24
  "@oclif/plugin-help": "^6.2.28",
25
25
  "@oclif/plugin-plugins": "^5.4.54",