@annexfour/cli 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/bin/index.js +19 -3
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -83,6 +83,22 @@ program
83
83
  }
84
84
  }
85
85
 
86
+ // 3. Project Name (Required for authenticated scans)
87
+ const projectName = options.projectName;
88
+ let finalProjectName = projectName;
89
+
90
+ if (!finalProjectName) {
91
+ const projectAnswer = await inquirer.prompt([
92
+ {
93
+ type: 'input',
94
+ name: 'name',
95
+ message: 'Project Name:',
96
+ default: path.basename(scanPath)
97
+ }
98
+ ]);
99
+ finalProjectName = projectAnswer.name;
100
+ }
101
+
86
102
  const scanPath = targetPath ? path.resolve(targetPath) : process.cwd();
87
103
 
88
104
  // Construct Docker arguments
@@ -102,9 +118,9 @@ program
102
118
  if (options.token) {
103
119
  dockerArgs.push('--token', options.token);
104
120
  }
105
- if (options.projectName) {
106
- dockerArgs.push('--project-name', options.projectName);
107
- }
121
+
122
+ // Always pass project name now that we've ensured we have one
123
+ dockerArgs.push('--project-name', finalProjectName);
108
124
 
109
125
  console.log(`[*] Launching Scanner via Docker...`);
110
126
  // console.log(`DEBUG: docker ${dockerArgs.join(' ')}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annexfour/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AnnexFour Compliance Scanner CLI Wrapper",
5
5
  "main": "bin/index.js",
6
6
  "bin": {