@vee-stack/delta-cli 2.0.5 â 2.0.6
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/dist/commands/analyze.js
CHANGED
|
@@ -22,6 +22,26 @@ function extractApiErrorPayload(payload) {
|
|
|
22
22
|
}
|
|
23
23
|
export async function analyzeCommand(projectPath, options) {
|
|
24
24
|
const targetPath = path.resolve(projectPath);
|
|
25
|
+
// Check authentication FIRST if upload is requested
|
|
26
|
+
if (options.upload) {
|
|
27
|
+
printInfo('đ Checking authentication...');
|
|
28
|
+
const config = await loadConfig();
|
|
29
|
+
const pat = await SecureTokenStore.getAccessToken();
|
|
30
|
+
if (!pat) {
|
|
31
|
+
console.error();
|
|
32
|
+
console.error(chalk.red('â Error: You must be logged in to upload reports.'));
|
|
33
|
+
console.error();
|
|
34
|
+
console.error(chalk.yellow('Please authenticate first:'));
|
|
35
|
+
console.error(chalk.cyan(' delta login'));
|
|
36
|
+
console.error();
|
|
37
|
+
console.error(chalk.dim('Or use --upload with a valid PAT:'));
|
|
38
|
+
console.error(chalk.cyan(' delta analyze . --upload --token <your-pat>'));
|
|
39
|
+
console.error();
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
printSuccess('â Authenticated');
|
|
43
|
+
console.log();
|
|
44
|
+
}
|
|
25
45
|
printInfo('đ Starting Delta Analysis Engine...');
|
|
26
46
|
printDivider();
|
|
27
47
|
console.log(`${icons.folder} Project: ${chalk.cyan(targetPath)}`);
|
|
@@ -165,6 +185,7 @@ export async function analyzeCommand(projectPath, options) {
|
|
|
165
185
|
console.log(`${icons.rocket} Uploading to Delta Cloud...`);
|
|
166
186
|
await uploadReport(report);
|
|
167
187
|
}
|
|
188
|
+
process.exit(0);
|
|
168
189
|
}
|
|
169
190
|
async function uploadReport(report) {
|
|
170
191
|
const config = await loadConfig();
|
package/dist/commands/auth.js
CHANGED
|
@@ -44,7 +44,7 @@ export const authCommands = {
|
|
|
44
44
|
console.log();
|
|
45
45
|
printCommandHint('delta whoami', 'to see account details');
|
|
46
46
|
printCommandHint('delta analyze', 'to start analyzing code');
|
|
47
|
-
|
|
47
|
+
process.exit(0);
|
|
48
48
|
}
|
|
49
49
|
// PAT Token flow (when token is provided)
|
|
50
50
|
// Validate token format
|
|
@@ -102,6 +102,7 @@ export const authCommands = {
|
|
|
102
102
|
console.log();
|
|
103
103
|
printCommandHint('delta whoami', 'to see full account details');
|
|
104
104
|
printCommandHint('delta analyze', 'to start analyzing code');
|
|
105
|
+
process.exit(0);
|
|
105
106
|
}
|
|
106
107
|
catch (error) {
|
|
107
108
|
stopSpinner(false, 'Authentication failed');
|
package/dist/commands/config.js
CHANGED
|
@@ -13,7 +13,7 @@ export async function configCommand(options) {
|
|
|
13
13
|
else {
|
|
14
14
|
console.log(`${options.get}: (not set)`);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
process.exit(0);
|
|
17
17
|
}
|
|
18
18
|
if (options.set) {
|
|
19
19
|
const [key, value] = options.set.split('=');
|
|
@@ -28,7 +28,7 @@ export async function configCommand(options) {
|
|
|
28
28
|
};
|
|
29
29
|
await saveConfig(newConfig);
|
|
30
30
|
console.log(`â
Set ${key} = ${value}`);
|
|
31
|
-
|
|
31
|
+
process.exit(0);
|
|
32
32
|
}
|
|
33
33
|
if (options.list || (!options.get && !options.set)) {
|
|
34
34
|
console.log('đ§ Delta CLI Configuration');
|
|
@@ -45,6 +45,7 @@ export async function configCommand(options) {
|
|
|
45
45
|
if (config.lastUsedAt) {
|
|
46
46
|
console.log(` Last used: ${new Date(config.lastUsedAt).toLocaleString()}`);
|
|
47
47
|
}
|
|
48
|
+
process.exit(0);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
//# sourceMappingURL=config.js.map
|
package/dist/commands/logout.js
CHANGED
|
@@ -9,7 +9,7 @@ export async function logoutCommand() {
|
|
|
9
9
|
const hasToken = await SecureTokenStore.hasTokens();
|
|
10
10
|
if (!hasToken) {
|
|
11
11
|
console.log('âšī¸ Not currently authenticated');
|
|
12
|
-
|
|
12
|
+
process.exit(0);
|
|
13
13
|
}
|
|
14
14
|
// Clear tokens from keychain and remove config file
|
|
15
15
|
await SecureTokenStore.clearTokens();
|
|
@@ -21,6 +21,7 @@ export async function logoutCommand() {
|
|
|
21
21
|
}
|
|
22
22
|
console.log('â
Successfully logged out');
|
|
23
23
|
console.log(' Authentication data removed');
|
|
24
|
+
process.exit(0);
|
|
24
25
|
}
|
|
25
26
|
catch (error) {
|
|
26
27
|
console.error('â Error during logout:', error instanceof Error ? error.message : String(error));
|
package/dist/commands/whoami.js
CHANGED